pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27368 )
Change subject: gsm: lapd_core: Change log line NOTICE->INFO
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
I'll keep it this way (INFO) for now as I see it matches better other related log level information around same file. If someones needs it can further improve in a more fine-grained way in the future.
This is mostly to avoid having logs clogged with this stuff.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27368
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I71f014645b4b487bf91499a1da9ed2d3032d7e40
Gerrit-Change-Number: 27368
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 10:27:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27384 )
Change subject: MGCP_Test: ensure PT translation works when converting AMR bwe/oa
......................................................................
MGCP_Test: ensure PT translation works when converting AMR bwe/oa
The tests that test the conversion from AMR octet-aligned to AMR
bandwith-efficient use the same payload type number on both ends. This
does match the reality. Typically the BSS uses 96 as payload type
internally, while 3gpp specifies a payload type of 112 on the link
between BSS and CN. To reflect those conditions in the test as well,
lets use 96 on one RTP end and 112 on the other.
This also increses the test coverage as we now test if PT translation
and bwe/oa conversion work together.
Change-Id: Id734b6954098130bba02f8cdf1b06e0080c3e915
Related: OS#5461
---
M mgw/MGCP_Test.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/84/27384/1
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 9defea7..935ee97 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -2200,7 +2200,7 @@
f_init(ep);
/* Connection #0 (Bidirectional) */
- flow[0] := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 112, "AMR/8000"));
+ flow[0] := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 96, "AMR/8000"));
/* bind local RTP emulation sockets */
flow[0].em.portnr := 10000;
flow[0].rtp_cfg := c_RtpemDefaultCfg;
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27384
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: Id734b6954098130bba02f8cdf1b06e0080c3e915
Gerrit-Change-Number: 27384
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27383 )
Change subject: bitvec2freq_list(): fix handling of E-GSM ARFCNs
......................................................................
bitvec2freq_list(): fix handling of E-GSM ARFCNs
According to 3GPP TS 44.018, section 10.5.2.1b.2, only ARFCN values
in range 1..124 can be encoded using the 'bit map 0' format. Before
this patch, ARFCN values belonging to E-GSM band (0, 975..1023) were
ignored in bitvec2freq_list(), and thus not present in the resulting
Cell Channel Description IE.
Change-Id: I17739e6845cd84e2a81bc406dd532541f7c52cb6
Related: SYS#5854
---
M src/osmo-bsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 19 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/83/27383/1
diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c
index 974af3a..e1b369d 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -504,20 +504,29 @@
bool pgsm = false;
memset(chan_list, 0, 16);
- if (bts->band == GSM_BAND_900
- && bts->c0->arfcn >= 1 && bts->c0->arfcn <= 124)
+ /* According to 3GPP TS 44.018, section 10.5.2.1b.2, only ARFCN values
+ * in range 1..124 can be encoded using the 'bit map 0' format. */
+ if (bts->band == GSM_BAND_900)
pgsm = true;
+ /* Check presence of E-GSM ARFCN 0 */
+ if (pgsm && bitvec_get_bit_pos(bv, 0) == ONE)
+ pgsm = false;
+ /* Check presence of E-GSM ARFCNs 975..1023 */
+ for (i = 975; pgsm && i <= 1023; i++) {
+ if (bitvec_get_bit_pos(bv, i) == ONE)
+ pgsm = false;
+ }
+
/* P-GSM-only handsets only support 'bit map 0 format' */
if (!bis && !ter && pgsm) {
chan_list[0] = 0;
- for (i = 0; i < bv->data_len*8; i++) {
- if (i >= 1 && i <= 124
- && bitvec_get_bit_pos(bv, i)) {
- rc = freq_list_bm0_set_arfcn(chan_list, i);
- if (rc < 0)
- return rc;
- }
+ for (i = 1; i <= 124; i++) {
+ if (!bitvec_get_bit_pos(bv, i))
+ continue;
+ rc = freq_list_bm0_set_arfcn(chan_list, i);
+ if (rc < 0)
+ return rc;
}
return 0;
}
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 26ec931..1a8389d 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -191,6 +191,6 @@
Testing generation of the Cell Channel Description IE:
Case a) only the BCCH carrier: 10
Case b) more carriers from P-GSM band: 1 3 10 64 99 124
-Case c) more carriers from E-GSM band: 1 3 10 64 99 124
+Case c) more carriers from E-GSM band: 0 3 10 64 99 124 975 1001 1023
BTS deallocated OK in test_cell_chan_desc()
Done.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27383
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: 2021q4
Gerrit-Change-Id: I17739e6845cd84e2a81bc406dd532541f7c52cb6
Gerrit-Change-Number: 27383
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27382 )
Change subject: tests/gsm0408: add testing coverage for generate_cell_chan_list()
......................................................................
tests/gsm0408: add testing coverage for generate_cell_chan_list()
This commit demonstrates what happens when a cell has channels in
both P-GSM and E-GSM bands (case 'c'). As can be seen from:
Case a) only the BCCH carrier: 10
Case b) more carriers from P-GSM band: 1 3 10 64 99 124
Case c) more carriers from E-GSM band: 1 3 10 64 99 124
in both cases 'b' and 'c' we have the same set of ARFCNs. Carriers
from the E-GSM band are not present at all. This is wrong and will
be fixed in the follow up change(s).
Change-Id: Ied0519c70501f105673a9b36657101063d275058
Related: SYS#5854
---
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 74 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/82/27382/1
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 90b294e..a7270a4 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -29,6 +29,7 @@
#include <osmocom/bsc/system_information.h>
#include <osmocom/bsc/abis_rsl.h>
#include <osmocom/bsc/bts.h>
+#include <osmocom/bsc/bss.h>
#include <osmocom/core/application.h>
#include <osmocom/core/byteswap.h>
@@ -555,6 +556,71 @@
msgb_free(msg);
}
+/* Similar to list_arfcn() from system_information.c, but uses printf().
+ * Another difference is that the text is printed even if n is 0. */
+static void print_cell_chan_desc(uint8_t *cd, const char *text)
+{
+ struct gsm_sysinfo_freq freq[1024];
+ unsigned int n = 0, i;
+
+ memset(freq, 0, sizeof(freq));
+ gsm48_decode_freq_list(freq, cd, 16, 0xce, 1);
+
+ printf("%s:", text);
+ for (i = 0; i < 1024; i++) {
+ if (!freq[i].mask)
+ continue;
+ printf(" %u", i);
+ n++;
+ }
+ if (!n)
+ printf(" (empty set)");
+ printf("\n");
+}
+
+static void test_cell_chan_desc(struct gsm_network *net)
+{
+ struct gsm_bts *bts = bts_init(net);
+ uint8_t cell_chan_desc[16];
+
+ printf("Testing generation of the Cell Channel Description IE:\n");
+
+ bts_model_unknown_init();
+ bts->type = GSM_BTS_TYPE_UNKNOWN;
+ bts->model = bts_model_find(bts->type);
+ OSMO_ASSERT(bts->model != NULL);
+
+ bts->band = GSM_BAND_900;
+ bts->c0->arfcn = 10; /* BCCH carrier */
+
+ /* Case a) only the BCCH carrier */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, bts->c0->arfcn, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case a) only the BCCH carrier");
+
+ /* Case b) more carriers from P-GSM band */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 3, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 64, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 99, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 124, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case b) more carriers from P-GSM band");
+
+ /* Case c) more carriers from E-GSM band */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 0, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 975, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1001, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1023, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case c) more carriers from E-GSM band");
+
+ bts_del(bts);
+}
+
static const struct log_info_cat log_categories[] = {
};
@@ -591,6 +657,8 @@
test_gsm48_multirate_config();
+ test_cell_chan_desc(net);
+
printf("Done.\n");
return EXIT_SUCCESS;
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 0bb7ee0..26ec931 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -187,4 +187,10 @@
gsm48_multirate_config(): rc=0, lv=0520340bf330
gsm48_multirate_config(): rc=0, lv=0420140bf0
gsm48_multirate_config(): rc=0, lv=022004
+BTS allocation OK in test_cell_chan_desc()
+Testing generation of the Cell Channel Description IE:
+Case a) only the BCCH carrier: 10
+Case b) more carriers from P-GSM band: 1 3 10 64 99 124
+Case c) more carriers from E-GSM band: 1 3 10 64 99 124
+BTS deallocated OK in test_cell_chan_desc()
Done.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27382
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: 2021q4
Gerrit-Change-Id: Ied0519c70501f105673a9b36657101063d275058
Gerrit-Change-Number: 27382
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27380 )
Change subject: tests/gsm0408: add testing coverage for generate_cell_chan_list()
......................................................................
tests/gsm0408: add testing coverage for generate_cell_chan_list()
This commit demonstrates what happens when a cell has channels in
both P-GSM and E-GSM bands (case 'c'). As can be seen from:
Case a) only the BCCH carrier: 10
Case b) more carriers from P-GSM band: 1 3 10 64 99 124
Case c) more carriers from E-GSM band: 1 3 10 64 99 124
in both cases 'b' and 'c' we have the same set of ARFCNs. Carriers
from the E-GSM band are not present at all. This is wrong and will
be fixed in the follow up change(s).
Change-Id: Ied0519c70501f105673a9b36657101063d275058
Related: SYS#5854
---
M tests/gsm0408/Makefile.am
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
3 files changed, 75 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/80/27380/1
diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am
index 571e7e6..b5a1ae5 100644
--- a/tests/gsm0408/Makefile.am
+++ b/tests/gsm0408/Makefile.am
@@ -29,6 +29,7 @@
$(top_builddir)/src/osmo-bsc/gsm_04_08_rr.o \
$(top_builddir)/src/osmo-bsc/arfcn_range_encode.o \
$(top_builddir)/src/osmo-bsc/bts.o \
+ $(top_builddir)/src/osmo-bsc/bts_unknown.o \
$(top_builddir)/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.o \
$(top_builddir)/src/osmo-bsc/bts_sm.o \
$(top_builddir)/src/osmo-bsc/bts_trx.o \
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 9a1d3cf..2018e53 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -30,6 +30,7 @@
#include <osmocom/bsc/system_information.h>
#include <osmocom/bsc/abis_rsl.h>
#include <osmocom/bsc/bts.h>
+#include <osmocom/bsc/bss.h>
#include <osmocom/core/application.h>
#include <osmocom/core/byteswap.h>
@@ -878,6 +879,71 @@
OSMO_ASSERT(rc == -EINVAL);
}
+/* Similar to list_arfcn() from system_information.c, but uses printf().
+ * Another difference is that the text is printed even if n is 0. */
+static void print_cell_chan_desc(uint8_t *cd, const char *text)
+{
+ struct gsm_sysinfo_freq freq[1024];
+ unsigned int n = 0, i;
+
+ memset(freq, 0, sizeof(freq));
+ gsm48_decode_freq_list(freq, cd, 16, 0xce, 1);
+
+ printf("%s:", text);
+ for (i = 0; i < 1024; i++) {
+ if (!freq[i].mask)
+ continue;
+ printf(" %u", i);
+ n++;
+ }
+ if (!n)
+ printf(" (empty set)");
+ printf("\n");
+}
+
+static void test_cell_chan_desc(struct gsm_network *net)
+{
+ struct gsm_bts *bts = bts_init(net);
+ uint8_t cell_chan_desc[16];
+
+ printf("Testing generation of the Cell Channel Description IE:\n");
+
+ bts_model_unknown_init();
+ bts->type = GSM_BTS_TYPE_UNKNOWN;
+ bts->model = bts_model_find(bts->type);
+ OSMO_ASSERT(bts->model != NULL);
+
+ bts->band = GSM_BAND_900;
+ bts->c0->arfcn = 10; /* BCCH carrier */
+
+ /* Case a) only the BCCH carrier */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, bts->c0->arfcn, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case a) only the BCCH carrier");
+
+ /* Case b) more carriers from P-GSM band */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 3, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 64, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 99, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 124, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case b) more carriers from P-GSM band");
+
+ /* Case c) more carriers from E-GSM band */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 0, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 975, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1001, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1023, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case c) more carriers from E-GSM band");
+
+ bts_del(bts);
+}
+
static const struct log_info_cat log_categories[] = {
};
@@ -919,6 +985,8 @@
test_gsm48_multirate_config();
+ test_cell_chan_desc(net);
+
printf("Done.\n");
return EXIT_SUCCESS;
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index f1aa463..38b5b4b 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -243,4 +243,10 @@
gsm48_multirate_config(): rc=0, lv=0520340bf330
gsm48_multirate_config(): rc=0, lv=0420140bf0
gsm48_multirate_config(): rc=0, lv=022004
+BTS allocation OK in test_cell_chan_desc()
+Testing generation of the Cell Channel Description IE:
+Case a) only the BCCH carrier: 10
+Case b) more carriers from P-GSM band: 1 3 10 64 99 124
+Case c) more carriers from E-GSM band: 1 3 10 64 99 124
+BTS deallocated OK in test_cell_chan_desc()
Done.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27380
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: 2021q1
Gerrit-Change-Id: Ied0519c70501f105673a9b36657101063d275058
Gerrit-Change-Number: 27380
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27381 )
Change subject: bitvec2freq_list(): fix handling of E-GSM ARFCNs
......................................................................
bitvec2freq_list(): fix handling of E-GSM ARFCNs
According to 3GPP TS 44.018, section 10.5.2.1b.2, only ARFCN values
in range 1..124 can be encoded using the 'bit map 0' format. Before
this patch, ARFCN values belonging to E-GSM band (0, 975..1023) were
ignored in bitvec2freq_list(), and thus not present in the resulting
Cell Channel Description IE.
Change-Id: I17739e6845cd84e2a81bc406dd532541f7c52cb6
Related: SYS#5854
---
M src/osmo-bsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 19 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/81/27381/1
diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c
index 7ec613c..20685a9 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -504,20 +504,29 @@
bool pgsm = false;
memset(chan_list, 0, 16);
- if (bts->band == GSM_BAND_900
- && bts->c0->arfcn >= 1 && bts->c0->arfcn <= 124)
+ /* According to 3GPP TS 44.018, section 10.5.2.1b.2, only ARFCN values
+ * in range 1..124 can be encoded using the 'bit map 0' format. */
+ if (bts->band == GSM_BAND_900)
pgsm = true;
+ /* Check presence of E-GSM ARFCN 0 */
+ if (pgsm && bitvec_get_bit_pos(bv, 0) == ONE)
+ pgsm = false;
+ /* Check presence of E-GSM ARFCNs 975..1023 */
+ for (i = 975; pgsm && i <= 1023; i++) {
+ if (bitvec_get_bit_pos(bv, i) == ONE)
+ pgsm = false;
+ }
+
/* P-GSM-only handsets only support 'bit map 0 format' */
if (!bis && !ter && pgsm) {
chan_list[0] = 0;
- for (i = 0; i < bv->data_len*8; i++) {
- if (i >= 1 && i <= 124
- && bitvec_get_bit_pos(bv, i)) {
- rc = freq_list_bm0_set_arfcn(chan_list, i);
- if (rc < 0)
- return rc;
- }
+ for (i = 1; i <= 124; i++) {
+ if (!bitvec_get_bit_pos(bv, i))
+ continue;
+ rc = freq_list_bm0_set_arfcn(chan_list, i);
+ if (rc < 0)
+ return rc;
}
return 0;
}
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 38b5b4b..264a9c7 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -247,6 +247,6 @@
Testing generation of the Cell Channel Description IE:
Case a) only the BCCH carrier: 10
Case b) more carriers from P-GSM band: 1 3 10 64 99 124
-Case c) more carriers from E-GSM band: 1 3 10 64 99 124
+Case c) more carriers from E-GSM band: 0 3 10 64 99 124 975 1001 1023
BTS deallocated OK in test_cell_chan_desc()
Done.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27381
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: 2021q1
Gerrit-Change-Id: I17739e6845cd84e2a81bc406dd532541f7c52cb6
Gerrit-Change-Number: 27381
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/27369 )
Change subject: rsl: Conditionally decrease log level if cause is normal event
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/27369
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I0ce78c52644983220f5810bc5c661b07afd9e543
Gerrit-Change-Number: 27369
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 09:59:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27368 )
Change subject: gsm: lapd_core: Change log line NOTICE->INFO
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
this is happening in normal operation during almost every radio channel esetablishment, so I would argue it could even go to DEBUG.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27368
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I71f014645b4b487bf91499a1da9ed2d3032d7e40
Gerrit-Change-Number: 27368
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 09:58:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/27379 )
Change subject: lint: checkpatch: don't require space in T=-1234
......................................................................
lint: checkpatch: don't require space in T=-1234
Inside struct osmo_tdef we write non-spec timers as T=-1234. Do not
complain about having no space before the minus character.
Example:
{ .T=-25, .default_val=5, .desc="Timeout for ..." },
Note that the Linux kernel coding style also requires spaces around the
equals signs. We follow that everywhere except for struct osmo_tdef,
and the linter has already been adjusted for that in
I1f0b9ed5bd49ef9b5ab0e347b9260e71df34ff9c.
Change-Id: I0885e84ad99c7d333a5930c411fd1273badb0fcb
---
M lint/checkpatch/checkpatch.pl
1 file changed, 10 insertions(+), 5 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl
index d98d79c..eada2a9 100755
--- a/lint/checkpatch/checkpatch.pl
+++ b/lint/checkpatch/checkpatch.pl
@@ -5077,11 +5077,16 @@
$opv eq '*U' || $opv eq '-U' ||
$opv eq '&U') { # Osmocom specific: &&U removed
if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
- if (ERROR("SPACING",
- "space required before that '$op' $at\n" . $hereptr)) {
- if ($n != $last_after + 2) {
- $good = $fix_elements[$n] . " " . ltrim($fix_elements[$n + 1]);
- $line_fixed = 1;
+ # Osmocom specific: inside struct osmo_tdef we write non-spec timers as
+ # T=-1234. Do not complain about having no space before the minus
+ # character.
+ if ($opline !~ /\.T=/) {
+ if (ERROR("SPACING",
+ "space required before that '$op' $at\n" . $hereptr)) {
+ if ($n != $last_after + 2) {
+ $good = $fix_elements[$n] . " " . ltrim($fix_elements[$n + 1]);
+ $line_fixed = 1;
+ }
}
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/27379
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I0885e84ad99c7d333a5930c411fd1273badb0fcb
Gerrit-Change-Number: 27379
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: osmith.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/27379 )
Change subject: lint: checkpatch: don't require space in T=-1234
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/27379
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I0885e84ad99c7d333a5930c411fd1273badb0fcb
Gerrit-Change-Number: 27379
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 09:57:28 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27371 )
Change subject: add counter for inter-BSC incoming Handover Request
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
in general I find it completely strange that the type of SCCP transport layer message is part of the name of a BSSAP statistics item. Not sure what rationale this is following. I mean, if you count the number of HTTP GET requests in a web server, yo uwould also not put the TCP flags of the TCP header into the packet...
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27371
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icdde2bb339a5e367a4d297802214a1ef3f36eefa
Gerrit-Change-Number: 27371
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 09:49:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/27379 )
Change subject: lint: checkpatch: don't require space in T=-1234
......................................................................
lint: checkpatch: don't require space in T=-1234
Inside struct osmo_tdef we write non-spec timers as T=-1234. Do not
complain about having no space before the minus character.
Example:
{ .T=-25, .default_val=5, .desc="Timeout for ..." },
Note that the Linux kernel coding style also requires spaces around the
equals signs. We follow that everywhere except for struct osmo_tdef,
and the linter has already been adjusted for that in
I1f0b9ed5bd49ef9b5ab0e347b9260e71df34ff9c.
Change-Id: I0885e84ad99c7d333a5930c411fd1273badb0fcb
---
M lint/checkpatch/checkpatch.pl
1 file changed, 10 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/79/27379/1
diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl
index d98d79c..eada2a9 100755
--- a/lint/checkpatch/checkpatch.pl
+++ b/lint/checkpatch/checkpatch.pl
@@ -5077,11 +5077,16 @@
$opv eq '*U' || $opv eq '-U' ||
$opv eq '&U') { # Osmocom specific: &&U removed
if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
- if (ERROR("SPACING",
- "space required before that '$op' $at\n" . $hereptr)) {
- if ($n != $last_after + 2) {
- $good = $fix_elements[$n] . " " . ltrim($fix_elements[$n + 1]);
- $line_fixed = 1;
+ # Osmocom specific: inside struct osmo_tdef we write non-spec timers as
+ # T=-1234. Do not complain about having no space before the minus
+ # character.
+ if ($opline !~ /\.T=/) {
+ if (ERROR("SPACING",
+ "space required before that '$op' $at\n" . $hereptr)) {
+ if ($n != $last_after + 2) {
+ $good = $fix_elements[$n] . " " . ltrim($fix_elements[$n + 1]);
+ $line_fixed = 1;
+ }
}
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/27379
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I0885e84ad99c7d333a5930c411fd1273badb0fcb
Gerrit-Change-Number: 27379
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: neels.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27371 )
Change subject: add counter for inter-BSC incoming Handover Request
......................................................................
Patch Set 2: Code-Review-1
(2 comments)
Patchset:
PS2:
-1 to avoid fixeria's +2 to get this merged before addressing the naming issue
File src/osmo-bsc/osmo_bsc_msc.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/27371/comment/24a02c30_3becbe5f
PS2, Line 58: [MSC_CTR_BSSMAP_RX_DT1_HANDOVER_RQST] = {"bssmap:rx:dt1:handover:rqst", "Number of received BSSMAP DT1 HANDOVER RQST messages"},
is the description and naming correct here? Are we really only counting those handover requests which we receive in DT1 vs. those that we receive directly in CR?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27371
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icdde2bb339a5e367a4d297802214a1ef3f36eefa
Gerrit-Change-Number: 27371
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 09:46:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27376 )
Change subject: bsc: inter-BSC incoming HO in with empty SCCP CR
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27376
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: I6732153cdd0d529bfaf0925387e765f3403a756b
Gerrit-Change-Number: 27376
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 09:44:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: neels, fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27247 )
Change subject: bsc: add TC_ho_into_this_bsc_a5_mismatch
......................................................................
Patch Set 4: Code-Review+2
(1 comment)
File bsc/BSC_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27247/comment/36eef0e5_db51…
PS2, Line 6032: BSSAP.receive(tr_BSSMAP_HandoverRequestAcknowledge(?)) -> value rx_bssap;
> to me it looks more noisy...
I'm with vadim, the proper way of receiving multiple alternates [possibly with a guard expression] is an alt statement. A separate guard time or other options can be added easily this way at a later point, if neded. Not sure what our overall guard timer is, and whether it makes sense to have a shorter one here.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27247
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: I44b464a0bedbff09c467c4bccd7c985480fb883a
Gerrit-Change-Number: 27247
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 09:44:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27357 )
Change subject: bitvec2freq_list(): determine empty set by checking the ARFCN count
......................................................................
bitvec2freq_list(): determine empty set by checking the ARFCN count
I find it cleaner to relay on the counter ('arfcns' in this case) to
check if the set is empty, rather than checking one of the resulting
values ('max'). There is just a cosmetic change.
Change-Id: I29ca51461beec053bcb8b8210f0ad24bb8c7765f
Related: SYS#5854
---
M src/osmo-bsc/system_information.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c
index 1ebfe5c..93bce77 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -553,7 +553,7 @@
max = i;
}
- if (max == -1) {
+ if (arfcns == 0) {
/* Empty set, use 'bit map 0 format' */
chan_list[0] = 0;
return 0;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27357
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I29ca51461beec053bcb8b8210f0ad24bb8c7765f
Gerrit-Change-Number: 27357
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27378 )
Change subject: tests/gsm0408: add testing coverage for generate_cell_chan_list()
......................................................................
tests/gsm0408: add testing coverage for generate_cell_chan_list()
This commit demonstrates what happens when a cell has channels in
both P-GSM and E-GSM bands (case 'c'). As can be seen from:
Case a) only the BCCH carrier: 10
Case b) more carriers from P-GSM band: 1 3 10 64 99 124
Case c) more carriers from E-GSM band: 1 3 10 64 99 124
in both cases 'b' and 'c' we have the same set of ARFCNs. Carriers
from the E-GSM band are not present at all. This is wrong and will
be fixed in the follow up change(s).
Change-Id: Ied0519c70501f105673a9b36657101063d275058
Related: SYS#5854
---
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 74 insertions(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 90b294e..a7270a4 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -29,6 +29,7 @@
#include <osmocom/bsc/system_information.h>
#include <osmocom/bsc/abis_rsl.h>
#include <osmocom/bsc/bts.h>
+#include <osmocom/bsc/bss.h>
#include <osmocom/core/application.h>
#include <osmocom/core/byteswap.h>
@@ -555,6 +556,71 @@
msgb_free(msg);
}
+/* Similar to list_arfcn() from system_information.c, but uses printf().
+ * Another difference is that the text is printed even if n is 0. */
+static void print_cell_chan_desc(uint8_t *cd, const char *text)
+{
+ struct gsm_sysinfo_freq freq[1024];
+ unsigned int n = 0, i;
+
+ memset(freq, 0, sizeof(freq));
+ gsm48_decode_freq_list(freq, cd, 16, 0xce, 1);
+
+ printf("%s:", text);
+ for (i = 0; i < 1024; i++) {
+ if (!freq[i].mask)
+ continue;
+ printf(" %u", i);
+ n++;
+ }
+ if (!n)
+ printf(" (empty set)");
+ printf("\n");
+}
+
+static void test_cell_chan_desc(struct gsm_network *net)
+{
+ struct gsm_bts *bts = bts_init(net);
+ uint8_t cell_chan_desc[16];
+
+ printf("Testing generation of the Cell Channel Description IE:\n");
+
+ bts_model_unknown_init();
+ bts->type = GSM_BTS_TYPE_UNKNOWN;
+ bts->model = bts_model_find(bts->type);
+ OSMO_ASSERT(bts->model != NULL);
+
+ bts->band = GSM_BAND_900;
+ bts->c0->arfcn = 10; /* BCCH carrier */
+
+ /* Case a) only the BCCH carrier */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, bts->c0->arfcn, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case a) only the BCCH carrier");
+
+ /* Case b) more carriers from P-GSM band */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 3, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 64, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 99, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 124, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case b) more carriers from P-GSM band");
+
+ /* Case c) more carriers from E-GSM band */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 0, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 975, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1001, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1023, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case c) more carriers from E-GSM band");
+
+ bts_del(bts);
+}
+
static const struct log_info_cat log_categories[] = {
};
@@ -591,6 +657,8 @@
test_gsm48_multirate_config();
+ test_cell_chan_desc(net);
+
printf("Done.\n");
return EXIT_SUCCESS;
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 0bb7ee0..26ec931 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -187,4 +187,10 @@
gsm48_multirate_config(): rc=0, lv=0520340bf330
gsm48_multirate_config(): rc=0, lv=0420140bf0
gsm48_multirate_config(): rc=0, lv=022004
+BTS allocation OK in test_cell_chan_desc()
+Testing generation of the Cell Channel Description IE:
+Case a) only the BCCH carrier: 10
+Case b) more carriers from P-GSM band: 1 3 10 64 99 124
+Case c) more carriers from E-GSM band: 1 3 10 64 99 124
+BTS deallocated OK in test_cell_chan_desc()
Done.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27378
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ied0519c70501f105673a9b36657101063d275058
Gerrit-Change-Number: 27378
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27377 )
Change subject: system_information: fix unused 'mask' parameter in list_arfcn()
......................................................................
system_information: fix unused 'mask' parameter in list_arfcn()
The callers of this function do pass different mask values, which
should be passed to gsm48_decode_freq_list(). Instead, 0xce was
passed regardless of the given mask value.
Change-Id: I47f2eab54ef8487b14992fd7a69d5c9ccbb3f5cf
---
M src/osmo-bsc/system_information.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c
index 974af3a..1ebfe5c 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -709,7 +709,7 @@
struct gsm_sysinfo_freq freq[1024];
memset(freq, 0, sizeof(freq));
- gsm48_decode_freq_list(freq, chan_list, 16, 0xce, 1);
+ gsm48_decode_freq_list(freq, chan_list, 16, mask, 1);
for (i = 0; i < 1024; i++) {
if (freq[i].mask) {
if (!n)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27377
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I47f2eab54ef8487b14992fd7a69d5c9ccbb3f5cf
Gerrit-Change-Number: 27377
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: fixeria.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27357 )
Change subject: bitvec2freq_list(): determine empty set by checking the ARFCN count
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Patchset:
PS1:
> I find it cleaner to relay on the counter ('arfcns' in this case) to check if the set is empty, rath […]
both methods work. but I think for something like this you need to put this explanation in the commit log. Or maybe mark it as cosmetic if it's no logical change.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27357
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I29ca51461beec053bcb8b8210f0ad24bb8c7765f
Gerrit-Change-Number: 27357
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 09:42:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, pespin.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27356
to look at the new patch set (#4).
Change subject: bitvec2freq_list(): fix handling of E-GSM ARFCNs
......................................................................
bitvec2freq_list(): fix handling of E-GSM ARFCNs
According to 3GPP TS 44.018, section 10.5.2.1b.2, only ARFCN values
in range 1..124 can be encoded using the 'bit map 0' format. Before
this patch, ARFCN values belonging to E-GSM band (0, 975..1023) were
ignored in bitvec2freq_list(), and thus not present in the resulting
Cell Channel Description IE.
Change-Id: I17739e6845cd84e2a81bc406dd532541f7c52cb6
Related: SYS#5854
---
M src/osmo-bsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 19 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/56/27356/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27356
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I17739e6845cd84e2a81bc406dd532541f7c52cb6
Gerrit-Change-Number: 27356
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27356 )
Change subject: bitvec2freq_list(): fix handling of E-GSM ARFCNs
......................................................................
Patch Set 3:
(1 comment)
File src/osmo-bsc/system_information.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/27356/comment/9ec8f98f_0ca571a7
PS1, Line 508: && bts->c0->arfcn >= 1 && bts->c0->arfcn <= 124)
: pgsm = true;
> Ok, I agree. Will rework the patch to do what you suggest.
The patch was reworked, so that pgsm flag is never be set in a situation where E-GSM channels are used.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27356
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I17739e6845cd84e2a81bc406dd532541f7c52cb6
Gerrit-Change-Number: 27356
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 09:03:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, pespin.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27356
to look at the new patch set (#3).
Change subject: bitvec2freq_list(): fix handling of E-GSM ARFCNs
......................................................................
bitvec2freq_list(): fix handling of E-GSM ARFCNs
According to 3GPP TS 44.018, section 10.5.2.1b.2, only ARFCN values
in range 1..124 can be encoded using the 'bit map 0' format. Before
this patch, ARFCN values belonging to E-GSM band (0, 975..1023) were
ignored in bitvec2freq_list(), and thus not present in the resulting
Cell Channel Description IE.
Change-Id: I17739e6845cd84e2a81bc406dd532541f7c52cb6
Related: SYS#5854
---
M src/osmo-bsc/system_information.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 18 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/56/27356/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27356
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I17739e6845cd84e2a81bc406dd532541f7c52cb6
Gerrit-Change-Number: 27356
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27356 )
Change subject: bitvec2freq_list(): fix handling of E-GSM ARFCNs
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
> I will add testing coverage in the next patchset version.
We have a basic unit test coverage now. This patch was intentionally kept unchanged to prove that it fixes the problem. I am reworking it now...
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27356
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I17739e6845cd84e2a81bc406dd532541f7c52cb6
Gerrit-Change-Number: 27356
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 03 Mar 2022 08:33:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27357 )
Change subject: bitvec2freq_list(): determine empty set by checking the ARFCN count
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
> I find it cleaner to relay on the counter ('arfcns' in this case) to check if the set is empty, rath […]
Commit message updated.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27357
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I29ca51461beec053bcb8b8210f0ad24bb8c7765f
Gerrit-Change-Number: 27357
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 03 Mar 2022 08:20:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27378 )
Change subject: tests/gsm0408: add testing coverage for generate_cell_chan_list()
......................................................................
tests/gsm0408: add testing coverage for generate_cell_chan_list()
This commit demonstrates what happens when a cell has channels in
both P-GSM and E-GSM bands (case 'c'). As can be seen from:
Case a) only the BCCH carrier: 10
Case b) more carriers from P-GSM band: 1 3 10 64 99 124
Case c) more carriers from E-GSM band: 1 3 10 64 99 124
in both cases 'b' and 'c' we have the same set of ARFCNs. Carriers
from the E-GSM band are not present at all. This is wrong and will
be fixed in the follow up change(s).
Change-Id: Ied0519c70501f105673a9b36657101063d275058
Related: SYS#5854
---
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 74 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/27378/1
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index 90b294e..a7270a4 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -29,6 +29,7 @@
#include <osmocom/bsc/system_information.h>
#include <osmocom/bsc/abis_rsl.h>
#include <osmocom/bsc/bts.h>
+#include <osmocom/bsc/bss.h>
#include <osmocom/core/application.h>
#include <osmocom/core/byteswap.h>
@@ -555,6 +556,71 @@
msgb_free(msg);
}
+/* Similar to list_arfcn() from system_information.c, but uses printf().
+ * Another difference is that the text is printed even if n is 0. */
+static void print_cell_chan_desc(uint8_t *cd, const char *text)
+{
+ struct gsm_sysinfo_freq freq[1024];
+ unsigned int n = 0, i;
+
+ memset(freq, 0, sizeof(freq));
+ gsm48_decode_freq_list(freq, cd, 16, 0xce, 1);
+
+ printf("%s:", text);
+ for (i = 0; i < 1024; i++) {
+ if (!freq[i].mask)
+ continue;
+ printf(" %u", i);
+ n++;
+ }
+ if (!n)
+ printf(" (empty set)");
+ printf("\n");
+}
+
+static void test_cell_chan_desc(struct gsm_network *net)
+{
+ struct gsm_bts *bts = bts_init(net);
+ uint8_t cell_chan_desc[16];
+
+ printf("Testing generation of the Cell Channel Description IE:\n");
+
+ bts_model_unknown_init();
+ bts->type = GSM_BTS_TYPE_UNKNOWN;
+ bts->model = bts_model_find(bts->type);
+ OSMO_ASSERT(bts->model != NULL);
+
+ bts->band = GSM_BAND_900;
+ bts->c0->arfcn = 10; /* BCCH carrier */
+
+ /* Case a) only the BCCH carrier */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, bts->c0->arfcn, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case a) only the BCCH carrier");
+
+ /* Case b) more carriers from P-GSM band */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 3, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 64, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 99, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 124, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case b) more carriers from P-GSM band");
+
+ /* Case c) more carriers from E-GSM band */
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 0, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 975, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1001, ONE);
+ bitvec_set_bit_pos(&bts->si_common.cell_alloc, 1023, ONE);
+
+ OSMO_ASSERT(generate_cell_chan_list(&cell_chan_desc[0], bts) == 0);
+ print_cell_chan_desc(&cell_chan_desc[0], "Case c) more carriers from E-GSM band");
+
+ bts_del(bts);
+}
+
static const struct log_info_cat log_categories[] = {
};
@@ -591,6 +657,8 @@
test_gsm48_multirate_config();
+ test_cell_chan_desc(net);
+
printf("Done.\n");
return EXIT_SUCCESS;
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index 0bb7ee0..26ec931 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -187,4 +187,10 @@
gsm48_multirate_config(): rc=0, lv=0520340bf330
gsm48_multirate_config(): rc=0, lv=0420140bf0
gsm48_multirate_config(): rc=0, lv=022004
+BTS allocation OK in test_cell_chan_desc()
+Testing generation of the Cell Channel Description IE:
+Case a) only the BCCH carrier: 10
+Case b) more carriers from P-GSM band: 1 3 10 64 99 124
+Case c) more carriers from E-GSM band: 1 3 10 64 99 124
+BTS deallocated OK in test_cell_chan_desc()
Done.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27378
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ied0519c70501f105673a9b36657101063d275058
Gerrit-Change-Number: 27378
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27377 )
Change subject: system_information: fix unused 'mask' parameter in list_arfcn()
......................................................................
system_information: fix unused 'mask' parameter in list_arfcn()
The callers of this function do pass different mask values, which
should be passed to gsm48_decode_freq_list(). Instead, 0xce was
passed regardless of the given mask value.
Change-Id: I47f2eab54ef8487b14992fd7a69d5c9ccbb3f5cf
---
M src/osmo-bsc/system_information.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/27377/1
diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c
index 974af3a..1ebfe5c 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -709,7 +709,7 @@
struct gsm_sysinfo_freq freq[1024];
memset(freq, 0, sizeof(freq));
- gsm48_decode_freq_list(freq, chan_list, 16, 0xce, 1);
+ gsm48_decode_freq_list(freq, chan_list, 16, mask, 1);
for (i = 0; i < 1024; i++) {
if (freq[i].mask) {
if (!n)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27377
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I47f2eab54ef8487b14992fd7a69d5c9ccbb3f5cf
Gerrit-Change-Number: 27377
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/27357
to look at the new patch set (#2).
Change subject: bitvec2freq_list(): determine empty set by checking the ARFCN count
......................................................................
bitvec2freq_list(): determine empty set by checking the ARFCN count
I find it cleaner to relay on the counter ('arfcns' in this case) to
check if the set is empty, rather than checking one of the resulting
values ('max'). There is just a cosmetic change.
Change-Id: I29ca51461beec053bcb8b8210f0ad24bb8c7765f
Related: SYS#5854
---
M src/osmo-bsc/system_information.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/57/27357/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27357
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I29ca51461beec053bcb8b8210f0ad24bb8c7765f
Gerrit-Change-Number: 27357
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset