Attention is currently required from: dexter, neels, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/36361?usp=email )
Change subject: Change msgb ownership in processing of received msgb ...................................................................... Patch Set 3: (3 comments) File TODO-RELEASE: https://gerrit.osmocom.org/c/osmo-mgw/+/36361/comment/a5bb56bf_d1a998f9 PS3, Line 42: libosmocore bump_dep; workaround Bump libosmocore version dependency after I68328adb952ca8833ba047cb3b49ccc6f8a1f1b5 > I'd usually simply write: […] I might simply remove the line and keep the local copy function, if we don't want to change msgb_copy semantics itself. File src/libosmo-mgcp/mgcp_network.c: https://gerrit.osmocom.org/c/osmo-mgw/+/36361/comment/d60898b6_08eb543a PS3, Line 75: static inline struct msgb *mgw_msgb_copy_c(void *ctx, struct msgb *msg, const char *name) > AS I mentioned in that patch, it may be worth having this API as a separate > function in libosmocore. yes; even in that case, I'd introduce a local version here until those changes in libosmocore materialize. https://gerrit.osmocom.org/c/osmo-mgw/+/36361/comment/1b66b8b5_88cb1ca2 PS3, Line 1375: if (conn_dst == conn) > I think if you do this, then you can drop the entire block of code spanning > lines 1360-1365: […] I think it would have to be the other way around: ``` switch (conn_dst->mode) { case MGCP_CONN_SEND_ONLY: case MGCP_CONN_RECV_SEND: if (conn_dst == conn) continue; /* fall-through */ case MGCP_CONN_CONFECHO: /* we have multiple recipients and must make copies for each recipient */ msg2 = mgw_msgb_copy_c(conn_dst, msg, "RTP Tx copy"); if (OSMO_LIKELY(msg2)) rc = mgcp_conn_rtp_dispatch_rtp(&conn_dst->u.rtp, msg2); ``` In any case, that's a separate optimization and not related to changing msgb ownership. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/36361?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I6a331f3c6b2eb51ea312ac6ef8c357185ddb79cf Gerrit-Change-Number: 36361 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <[email protected]> Gerrit-Reviewer: fixeria <[email protected]> Gerrit-Reviewer: jolly <[email protected]> Gerrit-Reviewer: neels <[email protected]> Gerrit-Reviewer: pespin <[email protected]> Gerrit-Attention: neels <[email protected]> Gerrit-Attention: pespin <[email protected]> Gerrit-Attention: dexter <[email protected]> Gerrit-Comment-Date: Wed, 20 Mar 2024 13:04:35 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <[email protected]> Gerrit-MessageType: comment
