Attention is currently required from: arehbein.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31533 )
Change subject: common: Have PCU socket connection use osmo_wqueue ......................................................................
Patch Set 3: Code-Review-1
(3 comments)
File src/common/pcu_sock.c:
https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/71841978_da3ed4aa PS2, Line 1092: return -1;
It doesn't change the control flow afaik (I looked at `osmo_wqueue_bfd_cb()`). […]
osmo_wqueue_bfd_cb: if (rc == -EBADF) goto err_badfd; You have to return -EBADF while handling the socket fd if you close/free it, otherwise osmo_wqueue_bfd_cb() continues using it and potentially calling the write_cb for a fd/mem which is no longer existing which can cause problems.
https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/1c4ccd75_92870a87 PS2, Line 1102: osmo_fd_write_disable(&state->upqueue.bfd);
From my understanding/by looking at this code, it looks like `osmo_fd_write_disable()` is meant to p […]
that's not to prevent concurrent write-access. It's to manage the main loop poll() to tell the kernel to trigger us when the socket is available for writing again.
https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/be99ebb8_52a56719 PS2, Line 1181: osmo_wqueue_init(&state->upqueue, PCU_SOCK_QLENGTH_MAX_DEFAULT);
No it's not possible, with the current code the current length of the wqueue is always incremented/t […]
I'm fine with whatever but use WQUEUE instead of the QLENGTH stuff :)