pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26719 )
Change subject: RTP_Emulation: Several fixes and improvements for IuUP streams
......................................................................
RTP_Emulation: Several fixes and improvements for IuUP streams
* Immediate tx of IuUP (N)ACK control packets. Without this, INIT ACK
is delayed until the TX side of the RTP endpoint is enabled.
* Allow and handle IuUP control messages even if g_rx_enabled is false.
* Properly validate user data payload if IuUP is in use.
Change-Id: Id4f8b02a8123bb30b659c40148c8ab4c7c2078a1
---
M library/RTP_Emulation.ttcn
1 file changed, 26 insertions(+), 6 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
dexter: Looks good to me, but someone else must approve
diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
index bdca75d..8c5dbc9 100644
--- a/library/RTP_Emulation.ttcn
+++ b/library/RTP_Emulation.ttcn
@@ -502,9 +502,22 @@
}
- /* simply ignore any RTTP/RTP if receiver not enabled */
- [not g_rx_enabled] RTP.receive(tr_rtp) {
- g_stats_rtp.num_pkts_rx_err_disabled := g_stats_rtp.num_pkts_rx_err_disabled+1;
+ /* simply ignore any RTCP/RTP if receiver not enabled */
+ [not g_rx_enabled] RTP.receive(tr_rtp) -> value rx_rtp {
+ /* In IuUP we need to decode possible Control packets, such as INIT-ACK: */
+ if (g_cfg.iuup_mode) {
+ /* In IuUP we need to decode possible Control packets, such as INIT-ACK: */
+ rx_rtp.msg.rtp.data := f_IuUP_Em_rx_decaps(g_iuup_ent, rx_rtp.msg.rtp.data);
+ if (lengthof(rx_rtp.msg.rtp.data) != 0) {
+ /* Unexpected RTP payload (user data) arrived: */
+ g_stats_rtp.num_pkts_rx_err_disabled := g_stats_rtp.num_pkts_rx_err_disabled+1;
+ } else if (isvalue(g_iuup_ent.pending_tx_pdu)) {
+ /* IuUP Control packet was received and requires sending back something: */
+ f_tx_rtp(''O);
+ }
+ } else {
+ g_stats_rtp.num_pkts_rx_err_disabled := g_stats_rtp.num_pkts_rx_err_disabled+1;
+ }
}
[not g_rx_enabled] RTCP.receive(tr_rtcp) {
g_stats_rtcp.num_pkts_rx_err_disabled := g_stats_rtcp.num_pkts_rx_err_disabled+1;
@@ -519,11 +532,18 @@
g_stats_rtp.num_pkts_rx := g_stats_rtp.num_pkts_rx+1;
g_stats_rtp.bytes_payload_rx := g_stats_rtp.bytes_payload_rx +
lengthof(rx_rtp.msg.rtp.data);
- if (ispresent(g_cfg.rx_fixed_payload) and rx_rtp.msg.rtp.data != g_cfg.rx_fixed_payload) {
- g_stats_rtp.num_pkts_rx_err_payload := g_stats_rtp.num_pkts_rx_err_payload + 1;
- }
if (g_cfg.iuup_mode) {
rx_rtp.msg.rtp.data := f_IuUP_Em_rx_decaps(g_iuup_ent, rx_rtp.msg.rtp.data);
+ /* IuUP Control packet was received which may require sending back something: */
+ if (lengthof(rx_rtp.msg.rtp.data) == 0) {
+ if (isvalue(g_iuup_ent.pending_tx_pdu)) {
+ f_tx_rtp(''O);
+ }
+ repeat;
+ }
+ }
+ if (ispresent(g_cfg.rx_fixed_payload) and rx_rtp.msg.rtp.data != g_cfg.rx_fixed_payload) {
+ g_stats_rtp.num_pkts_rx_err_payload := g_stats_rtp.num_pkts_rx_err_payload + 1;
}
if (DATA.checkstate("Connected")) {
DATA.send(rx_rtp.msg.rtp);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26719
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id4f8b02a8123bb30b659c40148c8ab4c7c2078a1
Gerrit-Change-Number: 26719
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26720 )
Change subject: mgw: Introduce test TC_two_crcx_mdcx_and_iuup
......................................................................
Patch Set 2: Code-Review+2
Re-adding +2, I fixed the spelling typo found by the linter.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26720
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0866fb499c6d426386d9811d075a7fe8386c5cb1
Gerrit-Change-Number: 26720
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 05 Jan 2022 10:30:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/26657 )
Change subject: conv: Fix the traceback for tail biting codes
......................................................................
Patch Set 3:
Heh, I don't like the linter comments and it makes it inconsistent with the surrouding code :/
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/26657
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I87e51d3880c0fe7bf3d6cd08fd46517a424a230c
Gerrit-Change-Number: 26657
Gerrit-PatchSet: 3
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 05 Jan 2022 10:06:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment