Attention is currently required from: fixeria, osmith.
falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/36975?usp=email )
Change subject: build config: add --disable-ortp option
......................................................................
Patch Set 3:
(1 comment)
This change is ready for review.
File configure.ac:
https://gerrit.osmocom.org/c/libosmo-abis/+/36975/comment/739c6cb6_6dec6ecc
PS2, Line 150: _cflags_save=$CFLAGS
> You are right, thanks for the catch! The current patch works in that the build passes with --disable […]
This issue should be fixed in the new patch revision.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36975?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I554260483b94d812ac3a957c969a902870f53883
Gerrit-Change-Number: 36975
Gerrit-PatchSet: 3
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 26 Jun 2024 20:33:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: falconia <falcon(a)freecalypso.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: falconia.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-mgw/+/37299?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: E1: support HRv1 codec on both 16k and 8k subslots
......................................................................
E1: support HRv1 codec on both 16k and 8k subslots
HRv1 support in OsmoMGW-E1 was previously broken (couldn't work
on either 16k or 8k subslots) because of inconsistency: the TRAU
frame type was set to OSMO_TRAU16_FT_HR, but the TRAU sync pattern
was set to OSMO_TRAU_SYNCP_8_HR. However, now that libosmotrau
has proper support for HRv1 TRAU frame encoding and RTP conversion
in both 16k and 8k formats, drive it correctly in OsmoMGW-E1.
While at it, change the code structure to avoid else-after-return.
Was the original code written and merged in a time before strict
linter checks?
Change-Id: Ifadbdc68905178c6ffdd673a6fb71c18610c9847
---
M src/libosmo-mgcp/mgcp_e1.c
1 file changed, 56 insertions(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/99/37299/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/37299?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: Ifadbdc68905178c6ffdd673a6fb71c18610c9847
Gerrit-Change-Number: 37299
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-MessageType: newpatchset
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37299?usp=email )
Change subject: E1: support HRv1 codec on both 16k and 8k subslots
......................................................................
Patch Set 1:
(2 comments)
File src/libosmo-mgcp/mgcp_e1.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-16868):
https://gerrit.osmocom.org/c/osmo-mgw/+/37299/comment/9d0bad4a_34973f6b
PS1, Line 475: else {
else is not generally useful after a break or return
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-16868):
https://gerrit.osmocom.org/c/osmo-mgw/+/37299/comment/62728d45_73bde42a
PS1, Line 518: else {
else is not generally useful after a break or return
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/37299?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: Ifadbdc68905178c6ffdd673a6fb71c18610c9847
Gerrit-Change-Number: 37299
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 26 Jun 2024 17:38:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37299?usp=email )
Change subject: E1: support HRv1 codec on both 16k and 8k subslots
......................................................................
E1: support HRv1 codec on both 16k and 8k subslots
HRv1 support in OsmoMGW-E1 was previously broken (couldn't work
on either 16k or 8k subslots) because of inconsistency: the TRAU
frame type was set to OSMO_TRAU16_FT_HR, but the TRAU sync pattern
was set to OSMO_TRAU_SYNCP_8_HR. However, now that libosmotrau
has proper support for HRv1 TRAU frame encoding and RTP conversion
in both 16k and 8k formats, drive it correctly in OsmoMGW-E1.
Change-Id: Ifadbdc68905178c6ffdd673a6fb71c18610c9847
---
M src/libosmo-mgcp/mgcp_e1.c
1 file changed, 38 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/99/37299/1
diff --git a/src/libosmo-mgcp/mgcp_e1.c b/src/libosmo-mgcp/mgcp_e1.c
index 20aff95..28d943d 100644
--- a/src/libosmo-mgcp/mgcp_e1.c
+++ b/src/libosmo-mgcp/mgcp_e1.c
@@ -467,9 +467,17 @@
return OSMO_TRAU16_FT_FR;
else if (strcmp(sdp_subtype_name, "GSM-EFR") == 0)
return OSMO_TRAU16_FT_EFR;
- else if (strcmp(sdp_subtype_name, "GSM-HR-08") == 0)
- return OSMO_TRAU16_FT_HR;
- else if (strcmp(sdp_subtype_name, "AMR") == 0) {
+ else if (strcmp(sdp_subtype_name, "GSM-HR-08") == 0) {
+ if (i460_rate == OSMO_I460_RATE_16k)
+ return OSMO_TRAU16_FT_HR;
+ else if (i460_rate == OSMO_I460_RATE_8k)
+ return OSMO_TRAU8_SPEECH;
+ else {
+ LOGPENDP(endp, DE1, LOGL_ERROR,
+ "E1-TRAU-TX: unsupported or illegal I.460 rate for HR\n");
+ return OSMO_TRAU_FT_NONE;
+ }
+ } else if (strcmp(sdp_subtype_name, "AMR") == 0) {
if (i460_rate == OSMO_I460_RATE_8k) {
switch (amr_ft) {
case AMR_4_75:
@@ -502,9 +510,17 @@
return OSMO_TRAU_SYNCP_16_FR_EFR;
else if (strcmp(sdp_subtype_name, "GSM-EFR") == 0)
return OSMO_TRAU_SYNCP_16_FR_EFR;
- else if (strcmp(sdp_subtype_name, "GSM-HR-08") == 0)
- return OSMO_TRAU_SYNCP_8_HR;
- else if (strcmp(sdp_subtype_name, "AMR") == 0) {
+ else if (strcmp(sdp_subtype_name, "GSM-HR-08") == 0) {
+ if (i460_rate == OSMO_I460_RATE_16k)
+ return OSMO_TRAU_SYNCP_16_FR_EFR;
+ else if (i460_rate == OSMO_I460_RATE_8k)
+ return OSMO_TRAU_SYNCP_8_HR;
+ else {
+ LOGPENDP(endp, DE1, LOGL_ERROR,
+ "E1-TRAU-TX: unsupported or illegal I.460 rate for HR\n");
+ return OSMO_TRAU_SYNCP_16_FR_EFR;
+ }
+ } else if (strcmp(sdp_subtype_name, "AMR") == 0) {
if (i460_rate == OSMO_I460_RATE_8k) {
switch (amr_ft) {
case AMR_4_75:
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/37299?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: Ifadbdc68905178c6ffdd673a6fb71c18610c9847
Gerrit-Change-Number: 37299
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria, neels, pespin.
falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/36975?usp=email )
Change subject: build config: add --disable-ortp option
......................................................................
Patch Set 2:
(1 comment)
File configure.ac:
https://gerrit.osmocom.org/c/libosmo-abis/+/36975/comment/eea85380_2cc3418c
PS2, Line 150: _cflags_save=$CFLAGS
> I believe these API quirks should not be executed if `ENABLE_ORTP = no`?
You are right, thanks for the catch! The current patch works in that the build passes with --disable-ortp and no ortp present, but those now-bogus tests still run, setting variables which then remain unused.
I will revise my patch to conditionalize the tests in question.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/36975?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I554260483b94d812ac3a957c969a902870f53883
Gerrit-Change-Number: 36975
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 26 Jun 2024 16:13:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37286?usp=email )
Change subject: trau_frame: fix 8k decoding
......................................................................
trau_frame: fix 8k decoding
osmo_trau_frame_decode_8k() API was broken for most TRAU frame types:
the processing begins with identifying the sync pattern, but the check
for the leading 8 zeros in HRv1, AMR-low and AMR-6k7 formats was
broken in that it was checking for 16 zero bits instead of 8.
While at it, fix global namespace pollution: the bit8_0[] datum
used in this logic was defined as global when it should be static.
Change-Id: Idabc1283d477473b479f2d76d783ca9aeaf0af5d
---
M src/trau/trau_frame.c
1 file changed, 18 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c
index 389495c..98e26da 100644
--- a/src/trau/trau_frame.c
+++ b/src/trau/trau_frame.c
@@ -1360,7 +1360,7 @@
#define TRAU8_FT_AMR_NO_SPEECH_CMR 0x14 /* 1, 0, 1, 0, 0 */
#define TRAU8_FT_AMR_475_515_590 0..7
-const uint8_t bit8_0[16] = { 0, };
+static const uint8_t bit8_0[8] = { 0, };
/*!< check sync pattern for hr/data/oam */
static bool is_hr(const ubit_t *bits)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37286?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Idabc1283d477473b479f2d76d783ca9aeaf0af5d
Gerrit-Change-Number: 37286
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37285?usp=email )
Change subject: {de,en}code8_hr: fix totally broken functions
......................................................................
{de,en}code8_hr: fix totally broken functions
The functions decode8_hr() and encode8_hr() in trau_frame.c (encoding
and decoding HRv1 TRAU frames in 8 kbit/s format) are available via
osmo_trau_frame_decode_8k() and osmo_trau_frame_encode() public APIs,
but they are not currently used anywhere in Osmocom. (OsmoMGW-E1 has
no working support for HR codec, and there is no support for HRv1-8k
in the TRAU<->RTP layer until next patch in this series.) Study of
the code reveals that these functions were totally broken prior to
this change:
* The movement of Dn bits between trau_bits and fr->d_bits used wrong
offsets for some of the bits (and even missed one group of bits
entirely in the encoding direction), producing garbled codec frames.
* The filling of XCn bits in the encoding direction was likewise
garbled by use of wrong offset.
* When encoding TRAU-UL frames in this format, bit C5 (odd parity)
was set incorrectly.
* The order of bits in fr->crc_bits array (Osmocom internal) was
opposite the order needed for osmo_crc8gen_check_bits() and
osmo_crc8gen_set_bits() functions - contrast with HRv1-16k functions
that use sensible bit order for this fr->crc_bits array.
Given that this HRv1-8k mode within TRAU frame encoding and decoding
API was totally broken and not used anywhere, there are no compatibility
concerns with changing aspects of this API such as CRC bit order.
Change-Id: I7cf0275f2ff212e001db38d7b090f222f292cdb0
---
M src/trau/trau_frame.c
1 file changed, 49 insertions(+), 11 deletions(-)
Approvals:
falconia: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c
index 0be005a..389495c 100644
--- a/src/trau/trau_frame.c
+++ b/src/trau/trau_frame.c
@@ -780,15 +780,14 @@
}
/* CRC0 .. CRC2 */
- fr->crc_bits[2] = trau_bits[82];
- fr->crc_bits[1] = trau_bits[83];
- fr->crc_bits[0] = trau_bits[84];
+ memcpy(fr->crc_bits, trau_bits + 73, 3);
/* D45 .. D48 */
- memcpy(fr->d_bits + d_idx, trau_bits + 85, 4);
+ memcpy(fr->d_bits + d_idx, trau_bits + 76, 4);
+ d_idx += 4;
/* D49 .. D111 */
- for (i = 10; i < 10 + 10; i++) {
+ for (i = 10; i < 10 + 9; i++) {
int offset = i * 8;
memcpy(fr->d_bits + d_idx, trau_bits + offset + 1, 7);
d_idx += 7;
@@ -843,7 +842,7 @@
cbits_out[1] = 0;
cbits_out[2] = 0;
cbits_out[3] = 1;
- cbits_out[4] = 1;
+ cbits_out[4] = 0;
} else {
cbits_out[0] = 0;
cbits_out[1] = 0;
@@ -855,7 +854,7 @@
/* XC1 .. XC2 */
memcpy(trau_bits + 1 * 8 + 6, fr->xc_bits, 2);
/* XC3 .. XC6 */
- memcpy(trau_bits + 2 * 8 + 2, fr->xc_bits, 4);
+ memcpy(trau_bits + 2 * 8 + 2, fr->xc_bits + 2, 4);
/* D1 .. D2 */
memcpy(trau_bits + 2 * 8 + 6, fr->d_bits, 2);
d_idx += 2;
@@ -868,12 +867,14 @@
};
/* CRC0 .. CRC2 */
- trau_bits[82] = fr->crc_bits[2];
- trau_bits[83] = fr->crc_bits[1];
- trau_bits[84] = fr->crc_bits[0];
+ memcpy(trau_bits + 73, fr->crc_bits, 3);
+
+ /* D45 .. D48 */
+ memcpy(trau_bits + 76, fr->d_bits + d_idx, 4);
+ d_idx += 4;
/* D49 .. D111 */
- for (i = 10; i < 10 + 10; i++) {
+ for (i = 10; i < 10 + 9; i++) {
int offset = i * 8;
memcpy(trau_bits + offset + 1, fr->d_bits + d_idx, 7);
d_idx += 7;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37285?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I7cf0275f2ff212e001db38d7b090f222f292cdb0
Gerrit-Change-Number: 37285
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
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.
falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37285?usp=email )
Change subject: {de,en}code8_hr: fix totally broken functions
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
> This shows one more reason to have unit tests (see my other related comment to another patch in this […]
I hope you realize that when someone uses their non-funded spare time to make improvements to retronetworking functionality, they cannot be held to the same standard (w.r.t. unit test requirements) as paid employees working on functionality that has commercial backing. That being said, if and when I receive that promised InSite BTS from @osmocom.account@tbspace.de, once I get it running and capture some real-life TRAU-UL traffic (plus real-life TRAU-DL output from the TCSM2 TRAU I already have), I will look into putting together some unit tests based on those real-life traffic examples.
Meanwhile, on the present patch, seeing 3 CR+1's including yours, I will go ahead and CR+2 it, then merge the series in which the other two patches already got CR+2.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37285?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I7cf0275f2ff212e001db38d7b090f222f292cdb0
Gerrit-Change-Number: 37285
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
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: Wed, 26 Jun 2024 15:53:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment