Attention is currently required from: fixeria.

pespin has posted comments on this change by fixeria. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/43112?usp=email )

Change subject: libosmo-trx/ep: flush pending TRXC messages on endpoint teardown
......................................................................


Patch Set 2:

(2 comments)

File libosmo-trx/src/trx_ep.c:

https://gerrit.osmocom.org/c/osmo-trx/+/43112/comment/a1437bbd_df468fb3?usp=email
 :
PS2, 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.


https://gerrit.osmocom.org/c/osmo-trx/+/43112/comment/8a909ae3_9405e418?usp=email
 :
PS2, 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 https://gerrit.osmocom.org/c/osmo-trx/+/43112?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I69e6a3bcf49afc3cfca4a72afdf459625cb91e56
Gerrit-Change-Number: 43112
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <[email protected]>
Gerrit-Attention: fixeria <[email protected]>
Gerrit-Comment-Date: Tue, 04 Aug 2026 11:17:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Reply via email to