Attention is currently required from: fixeria.
2 comments:
File libosmo-trx/src/trx_ep.c:
Patch Set #2, Line 245: if (res > 0 && osmo_iofd_txqueue_len(iofd) > 0)
in io_uring backend, with asynchronous write operations, the fact that the userspace iofd txqueue is empty doesn't necessarily mean that the write operation has finished.
freeing the iofd at that point could probably turn into the write being cancelled, etc.
As mentioned imho you need to track count of wrote (completed) bytes vs enqueued bytes, in order to figure out whether the stream is really done.
Patch Set #2, Line 269: talloc_steal(OTC_GLOBAL, iofd);
IMHO this is not a good idea, since you are keeping a socket alive without the data domain of the program knowing about it, hidding it to the user. For instance, my program does osmo_trx_ep_close() and then since according to the API it's closed, I do a open(), which will potentially fail because the ocal bound addr+port is still in use by the older socket.
You should incorporate the logic of "closing" being a known state into the public API, so the user of the ep can figure out when it can eg. re-open it or free it.
This can be seen in the osmo-pcap wrf structure I mentioned.
To view, visit change 43112. To unsubscribe, or for help writing mail filters, visit settings.