laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/27394 )
Change subject: host: Always initialize libosmocore logging before using it
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/27394
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I611c435516856c5c8928d7810fd9a9b831adc199
Gerrit-Change-Number: 27394
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 03 Mar 2022 14:31:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/simtrace2/+/27000
to look at the new patch set (#3).
Change subject: simtrace2-cardem-pcsc: Move all logging into libosmocore
......................................................................
simtrace2-cardem-pcsc: Move all logging into libosmocore
* drop log statements that are already in libosmo-simtrace2
* don't printf directly, but go via LOGCI
* make LOGCI use libosmocore logging
* configure libosmocore logging in a 'convenient' way
Change-Id: I6fa0da966e6d8e723c187404c17e90cfb3f3dd9f
---
M host/src/simtrace2-cardem-pcsc.c
1 file changed, 19 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/00/27000/3
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/27000
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I6fa0da966e6d8e723c187404c17e90cfb3f3dd9f
Gerrit-Change-Number: 27000
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
Attention is currently required from: Hoernchen, lynxis lazus.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/26995 )
Change subject: cardem: set more reasonable interrupt priorities
......................................................................
Patch Set 3: Code-Review+2
(1 comment)
Patchset:
PS2:
> I'd prefer a less scatted approach to setting the priorities, since anyone ever cares about are the […]
I agree. Unfortunately I have not been able to find time during recent weeks to implement and test this. So as this commit fixes a real-world bug, I would like to merge it and hopefully revisit the topic of centralized IRQ priorities-setting at a not too distant later point in time.
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26995
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: Ie6c97d61d8da3990b6e44144f36cb6d37d194307
Gerrit-Change-Number: 26995
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 03 Mar 2022 14:20:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge.
Hello Jenkins Builder, neels, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27081
to look at the new patch set (#13).
Change subject: stats: new trackers for lchan life duration
......................................................................
stats: new trackers for lchan life duration
This patch adds two stats which track cummulative lchan lifetime by
type TCH and SDCCH. These new counters will accomplish two things:
1) Provide a glanceable way to see if lchan durations look healthy. When
examining a site, short-lived (<5s) and long-lived (>30s) TCH lchans
are difficult to tell apart. If we only see short-lived TCH lchans,
there is most likely an RF or signaling problem to investigate. This
new counter will expose channel ages in the VTY output
2) Provide a more accurate count for Erlangs per site. Currently, we
are basing Erlangs on active TCH channel counts per stats period. This
method skews high very quickly. Each active TCH in that period
translates into the full 10s of activity. This counter should improve
accuracy by two orders of magnitude.
Change-Id: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347
---
M include/osmocom/bsc/bts.h
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_trx_vty.c
M src/osmo-bsc/bts_vty.c
M src/osmo-bsc/gsm_data.c
M src/osmo-bsc/lchan_fsm.c
7 files changed, 91 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/81/27081/13
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27081
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347
Gerrit-Change-Number: 27081
Gerrit-PatchSet: 13
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/27390 )
Change subject: mgcp_network: fix typo
......................................................................
mgcp_network: fix typo
Change-Id: I23f6672338b26eb74f6d3a753a3863e02af24ae0
---
M src/libosmo-mgcp/mgcp_network.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/90/27390/1
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index 0ea8c25..3f41418 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -1532,7 +1532,7 @@
/* If AMR is configured for the ingress connection a conversion of the
* framing mode (octet-aligned vs. bandwith-efficient is explicitly
- * define, then we check if the incoming payload matches that
+ * defined, then we check if the incoming payload matches that
* expectation. */
if (amr_oa_bwe_convert_indicated(conn_src->end.codec)) {
int oa = amr_oa_check((char*)msgb_data(msg), msgb_length(msg));
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/27390
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I23f6672338b26eb74f6d3a753a3863e02af24ae0
Gerrit-Change-Number: 27390
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-mgw/+/27392 )
Change subject: mgcp_codec: fix oa/bwe comparison in mgcp_codec_pt_translate()
......................................................................
mgcp_codec: fix oa/bwe comparison in mgcp_codec_pt_translate()
The function mgcp_codec_pt_translate is very strict when comparing the
codecs to each other to find a matching payload type number to be used
on the egress side.
This poses a problem when one side uses AMR in bandwith-efficient, while
the other side uses AMR in octet-aligned payload type format. To the pt
translate function the difference in the payload format will appear as
if the codec were different and eventually the payload type number
cannot be translated.
since osmo-mgw offers conversion between the payload type format it
would be no problem to ignore the payload type format when making the
translation decision. The only exception here would be if one side would
announce AMR two times, the first time with octet-aligned and the second
time with bandwith-efficient format. Then we would have to use the
payload type number from the exact match. (and skip any formatconversion)
To archive such an optimized decision we will first go through the codec
lists and perform an exact match. If we don't get a match we go through
the codec lists a second time, but this time we ignore the payload
format.
Change-Id: Ifbd201a2749009a4644a29bd77e1d0fc0c124a9d
Related: OS#5461
---
M src/libosmo-mgcp/mgcp_codec.c
M tests/mgcp/mgcp_test.c
M tests/mgcp/mgcp_test.ok
3 files changed, 88 insertions(+), 26 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/92/27392/1
diff --git a/src/libosmo-mgcp/mgcp_codec.c b/src/libosmo-mgcp/mgcp_codec.c
index 6b8d14a..0b806d9 100644
--- a/src/libosmo-mgcp/mgcp_codec.c
+++ b/src/libosmo-mgcp/mgcp_codec.c
@@ -364,9 +364,9 @@
return codec->param.amr_octet_aligned;
}
-/* Compare two codecs, all parameters must match up, except for the payload type
- * number. */
-static bool codecs_same(struct mgcp_rtp_codec *codec_a, struct mgcp_rtp_codec *codec_b)
+/* Compare two codecs, all parameters must match up, except for the payload type number. When comparing two codecs,
+ * we have the option to match the payload format as well. */
+static bool codecs_same(struct mgcp_rtp_codec *codec_a, struct mgcp_rtp_codec *codec_b, bool match_pload_fmt)
{
if (codec_a->rate != codec_b->rate)
return false;
@@ -378,7 +378,7 @@
return false;
if (strcmp(codec_a->subtype_name, codec_b->subtype_name))
return false;
- if (!strcmp(codec_a->subtype_name, "AMR")) {
+ if (match_pload_fmt && !strcmp(codec_a->subtype_name, "AMR")) {
if (mgcp_codec_amr_is_octet_aligned(codec_a) != mgcp_codec_amr_is_octet_aligned(codec_b))
return false;
}
@@ -417,16 +417,28 @@
if (!codec_src)
return -EINVAL;
- /* Use the codec information from the source and try to find the
- * equivalent of it on the destination side */
+ /* Use the codec information from the source and try to find the equivalent of it on the destination side. In
+ * the first run we will look for an exact match. */
codecs_assigned = rtp_dst->codecs_assigned;
OSMO_ASSERT(codecs_assigned <= MGCP_MAX_CODECS);
for (i = 0; i < codecs_assigned; i++) {
- if (codecs_same(codec_src, &rtp_dst->codecs[i])) {
+ if (codecs_same(codec_src, &rtp_dst->codecs[i], true)) {
codec_dst = &rtp_dst->codecs[i];
break;
}
}
+
+ /* In case we weren't able to find an exact match, we will try to find a match that is the same codec, but the
+ * payload format may be different. This alternative will require a frame format conversion (i.e. bwe->oe) */
+ if (!codec_dst) {
+ for (i = 0; i < codecs_assigned; i++) {
+ if (codecs_same(codec_src, &rtp_dst->codecs[i], false)) {
+ codec_dst = &rtp_dst->codecs[i];
+ break;
+ }
+ }
+ }
+
if (!codec_dst)
return -EINVAL;
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index 9b4933c..ea45b22 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -1850,6 +1850,7 @@
{ .payload_type_map = {96, 97}, },
{ .payload_type_map = {97, 96}, },
{ .payload_type_map = {0, 0}, },
+ { .payload_type_map = {123, -EINVAL} },
{ .end = true },
},
},
@@ -1906,31 +1907,63 @@
.expect = {
{ .payload_type_map = {111, 121}, },
{ .payload_type_map = {112, 122} },
+ { .payload_type_map = {123, -EINVAL} },
{ .end = true },
},
},
{
- .descr = "test AMR with missing octet-aligned settings (defaults to 0)",
+ .descr = "test AMR with missing octet-aligned settings (oa <-> unset)",
.codecs = {
{
{ 111, "AMR/8000", &amr_param_octet_aligned_true, },
- { 112, "AMR/8000", &amr_param_octet_aligned_false, },
},
{
{ 122, "AMR/8000", &amr_param_octet_aligned_unset, },
},
},
.expect = {
- { .payload_type_map = {111, -EINVAL}, },
- { .payload_type_map = {112, 122} },
+ { .payload_type_map = {111, 122}, },
+ { .payload_type_map = {55, -EINVAL}, },
{ .end = true },
},
},
{
- .descr = "test AMR with NULL param (defaults to 0)",
+ .descr = "test AMR with missing octet-aligned settings (bwe <-> unset)",
.codecs = {
{
- { 111, "AMR/8000", &amr_param_octet_aligned_true, },
+ { 111, "AMR/8000", &amr_param_octet_aligned_false, },
+ },
+ {
+ { 122, "AMR/8000", &amr_param_octet_aligned_unset, },
+ },
+ },
+ .expect = {
+ { .payload_type_map = {111, 122}, },
+ { .payload_type_map = {55, -EINVAL}, },
+ { .end = true },
+ },
+ },
+ {
+ .descr = "test AMR with NULL param (oa <-> null)",
+ .codecs = {
+ {
+ { 112, "AMR/8000", &amr_param_octet_aligned_true, },
+ },
+ {
+ { 122, "AMR/8000", NULL, },
+ },
+ },
+ .expect = {
+ /* Note: Both 111, anbd 112 will translate to 122. The translation from 112 */
+ { .payload_type_map = {112, 122} },
+ { .payload_type_map = {55, -EINVAL}, },
+ { .end = true },
+ },
+ },
+ {
+ .descr = "test AMR with NULL param (bwe <-> null)",
+ .codecs = {
+ {
{ 112, "AMR/8000", &amr_param_octet_aligned_false, },
},
{
@@ -1938,8 +1971,9 @@
},
},
.expect = {
- { .payload_type_map = {111, -EINVAL}, },
+ /* Note: Both 111, anbd 112 will translate to 122. The translation from 112 */
{ .payload_type_map = {112, 122} },
+ { .payload_type_map = {55, -EINVAL}, },
{ .end = true },
},
},
diff --git a/tests/mgcp/mgcp_test.ok b/tests/mgcp/mgcp_test.ok
index 94fada3..8b3b3d1 100644
--- a/tests/mgcp/mgcp_test.ok
+++ b/tests/mgcp/mgcp_test.ok
@@ -1324,6 +1324,7 @@
- mgcp_codec_pt_translate(conn1, conn0, 96) -> 97
- mgcp_codec_pt_translate(conn0, conn1, 0) -> 0
- mgcp_codec_pt_translate(conn1, conn0, 0) -> 0
+ - mgcp_codec_pt_translate(conn0, conn1, 123) -> -22
#3: conn0 has no codecs
- add codecs on conn0:
(none)
@@ -1355,25 +1356,40 @@
- mgcp_codec_pt_translate(conn1, conn0, 121) -> 111
- mgcp_codec_pt_translate(conn0, conn1, 112) -> 122
- mgcp_codec_pt_translate(conn1, conn0, 122) -> 112
-#6: test AMR with missing octet-aligned settings (defaults to 0)
+ - mgcp_codec_pt_translate(conn0, conn1, 123) -> -22
+#6: test AMR with missing octet-aligned settings (oa <-> unset)
- add codecs on conn0:
0: 111 AMR/8000 octet-aligned=1 -> rc=0
- 1: 112 AMR/8000 octet-aligned=0 -> rc=0
- add codecs on conn1:
0: 122 AMR/8000 octet-aligned=unset -> rc=0
- - mgcp_codec_pt_translate(conn0, conn1, 111) -> -22
- - mgcp_codec_pt_translate(conn0, conn1, 112) -> 122
- - mgcp_codec_pt_translate(conn1, conn0, 122) -> 112
-#7: test AMR with NULL param (defaults to 0)
+ - mgcp_codec_pt_translate(conn0, conn1, 111) -> 122
+ - mgcp_codec_pt_translate(conn1, conn0, 122) -> 111
+ - mgcp_codec_pt_translate(conn0, conn1, 55) -> -22
+#7: test AMR with missing octet-aligned settings (bwe <-> unset)
- add codecs on conn0:
- 0: 111 AMR/8000 octet-aligned=1 -> rc=0
- 1: 112 AMR/8000 octet-aligned=0 -> rc=0
+ 0: 111 AMR/8000 octet-aligned=0 -> rc=0
+ - add codecs on conn1:
+ 0: 122 AMR/8000 octet-aligned=unset -> rc=0
+ - mgcp_codec_pt_translate(conn0, conn1, 111) -> 122
+ - mgcp_codec_pt_translate(conn1, conn0, 122) -> 111
+ - mgcp_codec_pt_translate(conn0, conn1, 55) -> -22
+#8: test AMR with NULL param (oa <-> null)
+ - add codecs on conn0:
+ 0: 112 AMR/8000 octet-aligned=1 -> rc=0
- add codecs on conn1:
0: 122 AMR/8000 -> rc=0
- - mgcp_codec_pt_translate(conn0, conn1, 111) -> -22
- mgcp_codec_pt_translate(conn0, conn1, 112) -> 122
- mgcp_codec_pt_translate(conn1, conn0, 122) -> 112
-#8: match FOO/8000/1 and FOO/8000 as identical, single channel is implicit
+ - mgcp_codec_pt_translate(conn0, conn1, 55) -> -22
+#9: test AMR with NULL param (bwe <-> null)
+ - add codecs on conn0:
+ 0: 112 AMR/8000 octet-aligned=0 -> rc=0
+ - add codecs on conn1:
+ 0: 122 AMR/8000 -> rc=0
+ - mgcp_codec_pt_translate(conn0, conn1, 112) -> 122
+ - mgcp_codec_pt_translate(conn1, conn0, 122) -> 112
+ - mgcp_codec_pt_translate(conn0, conn1, 55) -> -22
+#10: match FOO/8000/1 and FOO/8000 as identical, single channel is implicit
- add codecs on conn0:
0: 0 PCMU/8000/1 -> rc=0
1: 111 GSM-HR-08/8000/1 -> rc=0
@@ -1389,7 +1405,7 @@
- mgcp_codec_pt_translate(conn0, conn1, 111) -> 97
- mgcp_codec_pt_translate(conn1, conn0, 97) -> 111
- mgcp_codec_pt_translate(conn0, conn1, 123) -> -22
-#9: match FOO/8000/1 and FOO as identical, 8k and single channel are implicit
+#11: match FOO/8000/1 and FOO as identical, 8k and single channel are implicit
- add codecs on conn0:
0: 0 PCMU/8000/1 -> rc=0
1: 111 GSM-HR-08/8000/1 -> rc=0
@@ -1405,7 +1421,7 @@
- mgcp_codec_pt_translate(conn0, conn1, 111) -> 97
- mgcp_codec_pt_translate(conn1, conn0, 97) -> 111
- mgcp_codec_pt_translate(conn0, conn1, 123) -> -22
-#10: test whether channel number matching is waterproof
+#12: test whether channel number matching is waterproof
- add codecs on conn0:
0: 111 GSM-HR-08/8000 -> rc=0
1: 112 GSM-HR-08/8000/2 -> rc=-22
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/27392
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ifbd201a2749009a4644a29bd77e1d0fc0c124a9d
Gerrit-Change-Number: 27392
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange