Attention is currently required from: osmith, Hoernchen, neels, laforge, pespin, fixeria.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30934 )
Change subject: Add osmo_io with initial poll backend ......................................................................
Patch Set 6:
(6 comments)
Patchset:
PS3:
Are you talking about a map file for all of libosmocore or just a libosmoio map file?
We have a libosmocore.map file now
File include/osmocom/core/osmo_io.h:
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/a894a935_681ff3b8 PS5, Line 57: int osmo_iofd_sendto_msgb(struct osmo_io_fd *iofd, struct msgb *msg, int flags,
maybe name it sendto_flags to clarify what are the flags for, but not that important.
Done
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/74a82377_353ddfb5 PS5, Line 210: * If there are bytes left over *pending_out will point to a msgb with the remaining data.
" If there are bytes left over, *pending_out will" (see extra comma)
Done
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/32c493f5_ebe9662c PS5, Line 426: if (!osmo_iofd_ops.close || (osmo_iofd_ops.close && osmo_iofd_ops.close(iofd)))
There seems to be a lot of expected stuff happening here with regards to struct configuration and re […]
I reworked this and now have separate free and close functions which also works with (un-)registering an iofd so users don't need to go through free/alloc every time a connection is reconnected (e.g. by libosmo-netif).
File src/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/803e3585_bf78bf05 PS3, Line 157: */
not critical: I usually put the end-of-comment on the previous line to save extraneous lines in the […]
I actually prefer it like this if you don't mind. In select.c both styles are used throughout the file.
File src/osmo_io_poll.c:
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/8baf0854_c27cc953 PS3, Line 84: /
Ack
This seems to map to a POLLPRI event in poll()
man poll says this: ``` POLLPRI There is some exceptional condition on the file descriptor. Possibilities include:
• There is out-of-band data on a TCP socket (see tcp(7)).
• A pseudoterminal master in packet mode has seen a state change on the slave (see ioctl_tty(2)).
• A cgroup.events file has been modified (see cgroups(7)). ``` I don't see this being relevant for us in any way so I don't think we need to support FD_EXCEPT here.