Attention is currently required from: pespin.
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/33892 )
Change subject: bsc (WIP): Make socket queue max. length configurable ......................................................................
Patch Set 1:
(4 comments)
File include/osmocom/bsc/pcu_if.h:
https://gerrit.osmocom.org/c/osmo-bsc/+/33892/comment/5a9e10ac_b8308d02 PS1, Line 12: #define BSC_CFG_PCU_SOCK_WQUEUE_LEN_MAX_MAX 2147483646
I don't really think this is really needed, just use the value directly.
Oh yeah, this is something left over from previous iterations of this patch where I used this value in another place as well
File src/osmo-bsc/bsc_vty.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/33892/comment/6c4f1134_55a7bb15 PS1, Line 2487: if (fd >= 0 && ((ofd = osmo_fd_get_by_fd(fd)) != NULL)) {
why do you need this? I don't see the point.
This is to check whether or not the socket and hence has been (properly) opened via `pcu_sock_init`, in which case `net->pcu_state` should exist.
If this is not the case, then the update in line 2487 will suffice.
https://gerrit.osmocom.org/c/osmo-bsc/+/33892/comment/5e880d1d_900d529c PS1, Line 2491: }
btw, if the queue is already created you should update the max len there.
That's what this does; osmo write queue code (the code in `osmo_wqueue_bfd_cb()`) will use the address of `pcu_state->upqueue.bfd` (the pointer passed on `osmo_fd_setup()` in `pcu_sock_init()` along with `osmo_wqueue_bfd_cb()` as callback) to come back to `&pcu_state->upqueue` via `container_of()`
File src/osmo-bsc/pcu_sock.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/33892/comment/367c0aea_c00188dc PS1, Line 956: net->pcu_sock_fd = rc;
this looks really unrelated.
it enables the check commented on [above](https://gerrit.osmocom.org/c/osmo-bsc/+/33892/comments/406fedbe_14fc66e8)