Attention is currently required from: pespin.
fixeria 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 5:
(4 comments)
This change is ready for review.
File libosmo-trx/src/trx_ep.c:
https://gerrit.osmocom.org/c/osmo-trx/+/43112/comment/f930184d_65a54552?usp=... : 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 […]
Acknowledged
https://gerrit.osmocom.org/c/osmo-trx/+/43112/comment/09201978_8f638352?usp=... : PS2, Line 269: talloc_steal(OTC_GLOBAL, iofd);
This patch is set Work-in-Progress and I never marked this thread as resolved, so no surprise here.
Done
File libosmo-trx/src/trx_ep.c:
https://gerrit.osmocom.org/c/osmo-trx/+/43112/comment/d4024963_e50ae451?usp=... : PS4, Line 285: if (res > 0 && flush->wr_completed < flush->wr_offset)
FIXME: take into account variable wrap around (feel free to submit to osmo-pcap too ;).
I've changed the logic to use a single counter instead. It gets incremented when `osmo_iofd_write_msgb()` is called, and decremented in `trx_ep_ctrl_write_cb()`/`trx_ep_ctrl_flush_write_cb()`. This way, and given the low volumes of TRXC traffic, a wrap around is unlikely to happen.
https://gerrit.osmocom.org/c/osmo-trx/+/43112/comment/b185cf44_5564dbf2?usp=... : PS4, Line 305: if (chan->ctrl_wr_completed >= chan->ctrl_wr_offset) {
FIXME: take into account variable wrap around (feel free to submit to osmo-pcap too ;).
See my other comment.