Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-netif/+/29468
to look at the new patch set (#2).
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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/68/29468/2
--
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-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29468 )
Change subject: osmux: osmux_xfrm_input(): Propagate error code to inform caller
......................................................................
Patch Set 1:
(1 comment)
File src/osmux.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-libosmo-netif-lint-71):
https://gerrit.osmocom.org/c/libosmo-netif/+/29468/comment/dd026f63_f1bacfac
PS1, Line 759: * If negative value is returned, an error occured and the message has been
'occured' may be misspelled - perhaps 'occurred'?
--
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: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Fri, 23 Sep 2022 15:43:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/68/29468/1
diff --git a/src/osmux.c b/src/osmux.c
index f54de7f..da826ad 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 occured 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: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/66/29466/1
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-MessageType: newchange
Attention is currently required from: msuraev.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/29464 )
Change subject: scripts/obs: make shallow git clones
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
nice! I considered this as well but thought it would run into problems when building the latest tag instead of nightly. But with --no-single-branch this still works as expected.
$ ./build_srcpkg.py -f latest libosmocore
libosmocore: cloning https://gerrit.osmocom.org/libosmocore
libosmocore: 'git clean -ffxd'
libosmocore: 'git checkout -f 1.7.0'
libosmocore: 'git reset --hard 1.7.0'
libosmocore: building source package 1.7.0
libosmocore: building debian source package
libosmocore: generating rpm spec file
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29464
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I71629c244d2c29728a88871e83b20493341321c8
Gerrit-Change-Number: 29464
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 23 Sep 2022 15:09:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/29464 )
Change subject: scripts/obs: make shallow git clones
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/29464
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I71629c244d2c29728a88871e83b20493341321c8
Gerrit-Change-Number: 29464
Gerrit-PatchSet: 1
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 23 Sep 2022 14:41:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment