Commit Graph

7 Commits

Author SHA1 Message Date
Andreas Eversberg 1fc35d2557 osmo_io: Use poll/select to notify socket connection at osmo_io_uring.c
In order to receive a connect notification from SCTP socket,
poll/select event must be used instead of a write notification via
io_uring completion event.

Once the connect notification has been received, subsequent write
notifications via io_uring are used.

Change-Id: I4eca9ea72beb0d6ea4d44cce81ed620033f07270
Related: OS#5751
2024-02-23 18:01:36 +01:00
Harald Welte 26c4362cce osmo_io: sendmsg/recvmsg support
Add support osmo_io operations resembling sendmsg() and recvmsg() socket
operations.  This is what will enable the implementation of higher-layer
functions like equivalents of sctp_recvmsg() and sctp_send() in
libosmo-netif and/or other users.

Change-Id: I89eb519b22d21011d61a7855b2364bc3c295df82
Related: OS#5751
2024-02-23 18:01:36 +01:00
Andreas Eversberg 3ecc733147 osmo_io: Move notify_connected function to backend
This relocation is necessary as the backend (osmo_io_fd or
osmo_io_uring) requires a different approach in handling connect
notifications. As a result, a function call has been introduced to
struct iofd_backend_ops.

In a subsequent patch, the process for the osmo_io_uring backend will
be modified to handle SCTP connect notifications using poll/select.

If connect notification is requested using poll/select, the file
descriptior must be registered to osmo_fd, using osmo_fd_register. If
read / write notification is requested by application, the file
descriptior must be registered also. A flag is used prevent calling
osmo_fd_register / osmo_fd_unregister multiple times, which would cause
a crash.

Change-Id: I905ec85210570aff8addadfc9603335d04eb057a
Related: OS#5751
2024-02-23 18:01:36 +01:00
Daniel Willmann 84611881c9 osmo_io: Factor out and use common send function from backend
This handles reenqueuing a message on EAGAIN and incomplete write

Change-Id: I6da2653d32aedd0e7872be0cf90a841b56462e59
2023-11-30 14:27:39 +01:00
Harald Welte 987a86af88 io_uring: add some more source code comments/docs
Change-Id: I8ba77a18b51f67a9edbd1fa488b9791f8bf6e40a
2023-11-22 12:20:12 +00:00
Daniel Willmann ec7d491589 osmo_io: Use local variable to reference msghdr->msg
Change-Id: I336ef7a5460dd18bf8e0f4ac5e97747f9fec5a35
2023-08-31 14:28:13 +00:00
Daniel Willmann f91d2aac9d osmo_io: Add io_uring backend
Change-Id: I5152129eb84b31ccc9e02bc2a5c5bdb046d331bc
2023-08-24 17:33:19 +02:00