Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29462 )
Change subject: osmux: Rename field osmux usage policy and define it with proper type
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
> Inconsistent naming: osmux use vs usage in enum name vs struct member name.
I'll rename the type to usage as a follow-up patch.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29462
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I7f41a443f488b75df792597ec3cec8f7e97a7411
Gerrit-Change-Number: 29462
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Sat, 24 Sep 2022 22:03:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29468 )
Change subject: osmux: osmux_xfrm_input(): Propagate error code to inform caller
......................................................................
osmux: osmux_xfrm_input(): Propagate error code to inform caller
This way the caller can log or make statistics based on the return code.
All known implementations simply check the return code to be >0, so we
are fine here.
Change-Id: I981cc7e560cd9c792a8a2a219b3612f9834296ce
---
M src/osmux.c
1 file changed, 8 insertions(+), 6 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/src/osmux.c b/src/osmux.c
index f54de7f..4851998 100644
--- a/src/osmux.c
+++ b/src/osmux.c
@@ -754,9 +754,11 @@
* osmux_xfrm_input - add RTP message to OSmux batch
* \param msg: RTP message that you want to batch into one OSmux message
*
- * If 0 is returned, this indicates that the message has been batched or that
- * an error occured and we have skipped the message. If 1 is returned, you
- * have to invoke osmux_xfrm_input_deliver and try again.
+ * If 0 is returned, this indicates that the message has been batched and the
+ * msgb is now owned by the osmux layer.
+ * If negative value is returned, an error occurred and the message has been
+ * dropped (and freed).
+ * If 1 is returned, you have to invoke osmux_xfrm_input_deliver and try again.
*
* The function takes care of releasing the messages in case of error and
* when building the batch.
@@ -774,14 +776,14 @@
LOGP(DLMUX, LOGL_NOTICE, "RTP payload too big (%u) for configured batch size (%u)\n",
msg->len, h->batch_size);
msgb_free(msg);
- return 0;
+ return -1;
}
rtph = osmo_rtp_get_hdr(msg);
if (rtph == NULL) {
LOGP(DLMUX, LOGL_NOTICE, "msg not containing an RTP header\n");
msgb_free(msg);
- return 0;
+ return -1;
}
switch(rtph->payload_type) {
@@ -805,7 +807,7 @@
*/
LOGP(DLMUX, LOGL_DEBUG, "Dropping RTP packet instead of adding to batch\n");
msgb_free(msg);
- return 0;
+ return ret;
}
h->stats.input_rtp_msgs++;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29468
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I981cc7e560cd9c792a8a2a219b3612f9834296ce
Gerrit-Change-Number: 29468
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29466 )
Change subject: tests/osmo-pcap-test/osmux_test: Fix return condition check for osmux_xfrm_input()
......................................................................
tests/osmo-pcap-test/osmux_test: Fix return condition check for osmux_xfrm_input()
According to API doc and implementation, it never returns >1.
Do as done in all other places where this API is used, that this check
for >0.
Change-Id: If23dfecb566f590b7a898356469df6e322f57653
---
M tests/osmo-pcap-test/osmux_test.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/tests/osmo-pcap-test/osmux_test.c b/tests/osmo-pcap-test/osmux_test.c
index e6bbeb1..a1aa199 100644
--- a/tests/osmo-pcap-test/osmux_test.c
+++ b/tests/osmo-pcap-test/osmux_test.c
@@ -124,7 +124,7 @@
if (ccid < 0)
register_ccid(rtph->ssrc);
- while ((ret = osmux_xfrm_input(&h_input, msg, ccid)) > 1) {
+ while ((ret = osmux_xfrm_input(&h_input, msg, ccid)) > 0) {
/* batch full, deliver it */
osmux_xfrm_input_deliver(&h_input);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29466
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: If23dfecb566f590b7a898356469df6e322f57653
Gerrit-Change-Number: 29466
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29467 )
Change subject: osmux: Improve logging non-usual conditions
......................................................................
Patch Set 1: Code-Review+2
(2 comments)
Patchset:
PS1:
> Shouldn't we have rate counters for events like nvalid packets?
That requires adding rate counters to libosmo-netif osmux implementation which is something which can be looked up later.
PS1:
t
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29467
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I854b0ae78e7e701ec3cb0525063f7292185d05a3
Gerrit-Change-Number: 29467
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Sat, 24 Sep 2022 22:02:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/29469 )
Change subject: osmux: Fix incorrect rate_ctr_group used in mgcp_osmux.c
......................................................................
Patch Set 1: Code-Review+1
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmo-mgw/+/29469/comment/daf613a6_b3529652
PS1, Line 9: During development of the coutners, they were first added to the same
counters
https://gerrit.osmocom.org/c/osmo-mgw/+/29469/comment/51b1fff2_e3148665
PS1, Line 10: RTP counter group and later on splitted, but some places still used the
Just "split" imho
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/29469
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia2e5601c7d476b79afd95032dbc019517f8209af
Gerrit-Change-Number: 29469
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 24 Sep 2022 14:17:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment