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