neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30466 )
Change subject: fix tunmap: mixup of Access/Core side FAR rules
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
I noticed that half the error fixed here is caused by a patch from this series. I squashed this patch into 'fix access/core mixup of PDR IDs / tunmap FAR'.
@arehbein i've redacted the ascii chart there, hopefully to make more sense
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30466
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I66babdfe4c1746bd3bf259342ce80dae2661de8c
Gerrit-Change-Number: 30466
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Dec 2022 05:00:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: dexter.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/30523 )
Change subject: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload
......................................................................
Patch Set 1:
(4 comments)
File include/osmo-bts/bts.h:
https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/ec5073fd_a8923b8a
PS1, Line 68: prefers
"Prefers" implies that it supports both but simply has a preference.
I guess "supports" is a better fit here?
https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/188a59e1_da4e9035
PS1, Line 72: BTS_INTERNAL_FLAG_SPEECH_H_V1_RFC5993
I suggest to use slightly different, consistent naming here:
* BTS_INTERNAL_FLAG_HR_FMT_ETSI_TS101318
* BTS_INTERNAL_FLAG_HR_FMT_RFC5993
File src/common/l1sap.c:
https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/d0238346_72356564
PS1, Line 1920: if (bts_internal_flag_get(lchan->ts->trx->bts, BTS_INTERNAL_FLAG_SPEECH_H_V1_RFC5993)
I believe it should be clarified in a comment that the only difference between the two formats is basically presence of a header in front of the actual speech payload. The bit ordering is the same for both.
https://gerrit.osmocom.org/c/osmo-bts/+/30523/comment/6f87d51b_16456128
PS1, Line 1925: memcpy(msgb_put(msg, 1), "\x00", 1);
msgb_put_u8(msg, 0x00)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30523
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c
Gerrit-Change-Number: 30523
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 08 Dec 2022 17:15:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/30523 )
Change subject: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload
......................................................................
l1sap: Accept RFC5993 and TS 101.318 HR GSM payload
Unfotunately there are two different RTP formats for HR GSM specified
and it is unclear which should be used with GSM networks. Also esch BTS
model may have a preference for either one or the other format.
Lets set internal flags to determine the preference for each BTS model
and then lets use this information to convert incoming RTP packets into
the prefered format. Doing so we will make sure that always both formats
are accepted.
Related: OS#5688
Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c
---
M include/osmo-bts/bts.h
M src/common/l1sap.c
M src/osmo-bts-lc15/main.c
M src/osmo-bts-oc2g/main.c
M src/osmo-bts-sysmo/main.c
M src/osmo-bts-trx/main.c
6 files changed, 64 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/23/30523/1
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index b1a594c..99c5da1 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -65,6 +65,11 @@
#define BTS_INTERNAL_FLAG_NM_RCHANNEL_DEPENDS_RCARRIER (1 << 2)
/* Whether the BTS model reports interference measurements to L1SAP. */
#define BTS_INTERNAL_FLAG_INTERF_MEAS (1 << 3)
+/* Whether the BTS model prefers HR GSM RTP payload in
+ * GSM ETSI TS.101.138 (TIPHON) format */
+#define BTS_INTERNAL_FLAG_HR_GSM_TS101318 (1 << 4)
+/* Whether the BTS model prefers HR GSM RTP payload in RFC 5883 format */
+#define BTS_INTERNAL_FLAG_SPEECH_H_V1_RFC5993 (1 << 5)
/* BTS implementation flags (internal use, not exposed via OML) */
#define bts_internal_flag_get(bts, flag) \
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 22b5e8c..f8bb23f 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1253,6 +1253,28 @@
osmo_hexdump(resp_msg->data, resp_msg->len));
return false;
}
+
+ /* Avoid sending an incompatible HR GSM RTP format to lower layers. Two
+ * formats exist: ETSI TS 101.318 and RFC 5993. This check is only
+ * carried out when the BTS model explicitly states a preference. */
+ if (lchan->tch_mode == GSM48_CMODE_SPEECH_V1 && lchan->type == GSM_LCHAN_TCH_H) {
+ if (bts_internal_flag_get(lchan->ts->trx->bts, BTS_INTERNAL_FLAG_SPEECH_H_V1_RFC5993)) {
+ if (resp_msg->len != GSM_HR_BYTES + 1) {
+ LOGPLCHAN(lchan, DL1P, LOGL_NOTICE,
+ "RTP->L1: Dropping unexpected HR GSM encoding (expected RFC 5993, got TS 101.318?) %s\n",
+ osmo_hexdump(resp_msg->data, resp_msg->len));
+ return false;
+ }
+ } else if (bts_internal_flag_get(lchan->ts->trx->bts, BTS_INTERNAL_FLAG_HR_GSM_TS101318)) {
+ if (resp_msg->len != GSM_HR_BYTES) {
+ LOGPLCHAN(lchan, DL1P, LOGL_NOTICE,
+ "RTP->L1: Dropping unexpected HR GSM encoding (expected TS 101.318, got RFC 5993?) %s\n",
+ osmo_hexdump(resp_msg->data, resp_msg->len));
+ return false;
+ }
+ }
+ }
+
return true;
}
@@ -1888,10 +1910,39 @@
if (lchan->loopback)
return;
- msg = l1sap_msgb_alloc(rtp_pl_len);
- if (!msg)
- return;
- memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len);
+ /* There are two different specifications that describe how HR GSM
+ * audio should be encapsulated in RTP frames: RFC 5993 and
+ * ETSI TS 101.318 (TIPHON). In order to be able to accept both formats
+ * we convert them on reception depending on what the particular BTS
+ * model prefers. In case no preference is set, it will be assumed that
+ * the BTS model is fine with both formats. */
+ if (lchan->tch_mode == GSM48_CMODE_SPEECH_V1 && lchan->type == GSM_LCHAN_TCH_H) {
+ if (bts_internal_flag_get(lchan->ts->trx->bts, BTS_INTERNAL_FLAG_SPEECH_H_V1_RFC5993)
+ && rtp_pl_len == GSM_HR_BYTES) {
+ msg = l1sap_msgb_alloc(rtp_pl_len + 1);
+ if (!msg)
+ return;
+ memcpy(msgb_put(msg, 1), "\x00", 1);
+ memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len);
+ } else if (bts_internal_flag_get(lchan->ts->trx->bts, BTS_INTERNAL_FLAG_HR_GSM_TS101318)
+ && rtp_pl_len == GSM_HR_BYTES + 1) {
+ msg = l1sap_msgb_alloc(rtp_pl_len - 1);
+ if (!msg)
+ return;
+ memcpy(msgb_put(msg, rtp_pl_len - 1), rtp_pl + 1, rtp_pl_len - 1);
+ } else {
+ msg = l1sap_msgb_alloc(rtp_pl_len);
+ if (!msg)
+ return;
+ memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len);
+ }
+ } else {
+ msg = l1sap_msgb_alloc(rtp_pl_len);
+ if (!msg)
+ return;
+ memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len);
+ }
+
msgb_pull(msg, sizeof(struct osmo_phsap_prim));
/* Store RTP header Marker bit in control buffer */
diff --git a/src/osmo-bts-lc15/main.c b/src/osmo-bts-lc15/main.c
index cb2a9ac..dd82f5e 100644
--- a/src/osmo-bts-lc15/main.c
+++ b/src/osmo-bts-lc15/main.c
@@ -113,6 +113,7 @@
bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP);
bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_NM_RCHANNEL_DEPENDS_RCARRIER);
+ bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_SPEECH_H_V1_TS101318);
return 0;
}
diff --git a/src/osmo-bts-oc2g/main.c b/src/osmo-bts-oc2g/main.c
index 4484d58..560c6c3 100644
--- a/src/osmo-bts-oc2g/main.c
+++ b/src/osmo-bts-oc2g/main.c
@@ -114,6 +114,7 @@
bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP);
bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_NM_RCHANNEL_DEPENDS_RCARRIER);
+ bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_SPEECH_H_V1_TS101318);
return 0;
}
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index 95492eb..02a2551 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -81,6 +81,7 @@
bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB);
bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP);
bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_NM_RCHANNEL_DEPENDS_RCARRIER);
+ bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_HR_GSM_TS101318);
return 0;
}
diff --git a/src/osmo-bts-trx/main.c b/src/osmo-bts-trx/main.c
index 4bd7f0f..19aaa8c 100644
--- a/src/osmo-bts-trx/main.c
+++ b/src/osmo-bts-trx/main.c
@@ -157,6 +157,7 @@
bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB);
bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_INTERF_MEAS);
+ bts_internal_flag_set(bts, BTS_INTERNAL_FLAG_SPEECH_H_V1_RFC5993);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30523
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c
Gerrit-Change-Number: 30523
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/30522 )
Change subject: l1sap: remove unused pointer variable
......................................................................
l1sap: remove unused pointer variable
The pointer variable l1sap is only used to determine the size of the
related struct but for nothing else. We can use the struct name in
sizeof also directly and get rid of it.
Change-Id: I93abdce1dec60d53ddceb1fce6e9e7451ba6283a
---
M src/common/l1sap.c
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/22/30522/1
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 8bcd417..22b5e8c 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1882,7 +1882,6 @@
{
struct gsm_lchan *lchan = rs->priv;
struct msgb *msg;
- struct osmo_phsap_prim *l1sap;
/* if we're in loopback mode, we don't accept frames from the
* RTP socket anymore */
@@ -1893,7 +1892,7 @@
if (!msg)
return;
memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len);
- msgb_pull(msg, sizeof(*l1sap));
+ msgb_pull(msg, sizeof(struct osmo_phsap_prim));
/* Store RTP header Marker bit in control buffer */
rtpmsg_marker_bit(msg) = marker;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30522
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I93abdce1dec60d53ddceb1fce6e9e7451ba6283a
Gerrit-Change-Number: 30522
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30515 )
Change subject: obs: build_deb/rpm: show contents after build
......................................................................
obs: build_deb/rpm: show contents after build
After building packages with the OBS scripts, show their contents. This
allows easy checking if config files were correctly packaged etc. By
adding it here, it will also show up at the end of the related jenkins
jobs for gerrit verifications.
Related: OS#5817
Change-Id: Ie30b07f35f7e41990fa352523427d86458291d4d
---
M scripts/obs/data/build_deb.sh
M scripts/obs/data/build_rpm.sh
2 files changed, 12 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/scripts/obs/data/build_deb.sh b/scripts/obs/data/build_deb.sh
index 0030278..11eb36f 100755
--- a/scripts/obs/data/build_deb.sh
+++ b/scripts/obs/data/build_deb.sh
@@ -12,3 +12,9 @@
$apt_get update
$apt_get build-dep .
su "$BUILDUSER" -c "dpkg-buildpackage -us -uc -j$JOBS"
+
+# Show contents
+cd ..
+for i in *.deb; do
+ dpkg -c "$i"
+done
diff --git a/scripts/obs/data/build_rpm.sh b/scripts/obs/data/build_rpm.sh
index 3ade17e..77efef2 100755
--- a/scripts/obs/data/build_rpm.sh
+++ b/scripts/obs/data/build_rpm.sh
@@ -29,3 +29,9 @@
if [ -n "$INSIDE_DOCKER" ]; then
su "$BUILDUSER" -c "mv ~/rpmbuild/RPMS/*/*.rpm _temp/binpkgs/"
fi
+
+# Show contents
+cd _temp/binpkgs
+for i in *.rpm; do
+ rpm -qlp "$i"
+done
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/30515
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Ie30b07f35f7e41990fa352523427d86458291d4d
Gerrit-Change-Number: 30515
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged