Attention is currently required from: arehbein, laforge, pespin.

fixeria 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 6: Code-Review-1

(3 comments)

File src/common/pcu_sock.c:

https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/e28d7635_9bd0d65c
PS6, Line 990:          pcu_sock_close(state);
> I think you need to free msgb in this code path. […]
Indeed, the API doc clearly states:

  \returns 0 on success; negative on error (MESSAGE NOT FREED IN CASE OF ERROR)

so pespin is right here, please add `msgb_free(msg)`.


https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/f1a8cf00_cb863ff4
PS6, Line 1093: struct msgb *m
I would keep the usual naming, i.e. `msg`. Not critical, but this way the 
patch/diff is easier to read.


https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/13779f69_adf0eef9
PS6, Line 1106:                         rc = 
osmo_wqueue_enqueue(&state->upqueue, m);
> You mean at the beginning of the queue?
Yes, this is likely what pespin meant. When this callback is called, it gets a 
msgb from the head (beginning) of the queue. But here you're putting it back at 
the tail, changing the ordering.

Take a look at the `osmo_wqueue_bfd_cb()` in libosmocore.git. You don't really 
need to enqueue the msgb back yourself, just return `-EAGAIN` and the calling 
function will enqueue it back for you.



--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31533
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ia6e61dda4b3cd4bba76e6acb7771d70335062fe1
Gerrit-Change-Number: 31533
Gerrit-PatchSet: 6
Gerrit-Owner: arehbein <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-CC: laforge <[email protected]>
Gerrit-Attention: arehbein <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Attention: pespin <[email protected]>
Gerrit-Comment-Date: Tue, 09 May 2023 11:07:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: arehbein <[email protected]>
Comment-In-Reply-To: pespin <[email protected]>
Gerrit-MessageType: comment

Reply via email to