lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

October 2022

  • 2 participants
  • 2331 discussions
Change in docker-playground[master]: osmo-ggsn-master: split RUN command
by msuraev 21 Oct '22

21 Oct '22
Attention is currently required from: osmith. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/docker-playground/+/29840 ) Change subject: osmo-ggsn-master: split RUN command ...................................................................... Patch Set 1: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/29840 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I014cb5499820a26b46714fee1a55381e9013cdad Gerrit-Change-Number: 29840 Gerrit-PatchSet: 1 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Fri, 21 Oct 2022 13:43:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: Call ms_store->get_ms() with GSM_RESERVED_TMSI instead of 0
by pespin 21 Oct '22

21 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29839 ) Change subject: Call ms_store->get_ms() with GSM_RESERVED_TMSI instead of 0 ...................................................................... Call ms_store->get_ms() with GSM_RESERVED_TMSI instead of 0 That's the special value checked in the implementation of get_ms() to skip lookups based on TLLI. This should save some cicles trying to match TLLI 0. Change-Id: I364d238ff8a82abb14281140fe18b273c0e8f541 --- M src/bts.cpp M src/pcu_vty_functions.cpp M src/tbf.cpp M src/tbf_dl.cpp M tests/ms/MsTest.cpp M tests/tbf/TbfTest.cpp 6 files changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/39/29839/1 diff --git a/src/bts.cpp b/src/bts.cpp index f77c5a2..df08cc6 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1389,7 +1389,7 @@ struct GprsMs *bts_ms_by_imsi(struct gprs_rlcmac_bts *bts, const char *imsi) { - return bts_ms_store(bts)->get_ms(0, 0, imsi); + return bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi); } const struct llist_head* bts_ms_list(struct gprs_rlcmac_bts *bts) diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp index 1745eea..28ecebf 100644 --- a/src/pcu_vty_functions.cpp +++ b/src/pcu_vty_functions.cpp @@ -236,7 +236,7 @@ int pcu_vty_show_ms_by_imsi(struct vty *vty, struct gprs_rlcmac_bts *bts, const char *imsi) { - GprsMs *ms = bts_ms_store(bts)->get_ms(0, 0, imsi); + GprsMs *ms = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi); if (!ms) { vty_out(vty, "Unknown IMSI '%s'.%s", imsi, VTY_NEWLINE); return CMD_WARNING; diff --git a/src/tbf.cpp b/src/tbf.cpp index d15cd3d..cb5d9f3 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -225,7 +225,7 @@ if (!ms_check_tlli(ms(), tlli)) { GprsMs *old_ms; - old_ms = bts_ms_store(bts)->get_ms(tlli, 0, NULL); + old_ms = bts_ms_store(bts)->get_ms(tlli, GSM_RESERVED_TMSI, NULL); if (old_ms) ms_merge_and_clear_ms(ms(), old_ms); } diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 9c99cf6..67ac573 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -295,7 +295,7 @@ /* If we got MS by TLLI above let's see if we already have another MS * object identified by IMSI and merge them */ if (ms && !ms_imsi_is_valid(ms) && imsi) { - ms_old = bts_ms_store(bts)->get_ms(0, 0, imsi); + ms_old = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi); if (ms_old && ms_old != ms) { /* The TLLI has changed (RAU), so there are two MS * objects for the same MS */ diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp index 2ff2fc2..cbafee9 100644 --- a/tests/ms/MsTest.cpp +++ b/tests/ms/MsTest.cpp @@ -416,10 +416,10 @@ OSMO_ASSERT(ms == ms_tmp); OSMO_ASSERT(ms_tlli(ms) == tlli + 0); - ms_tmp = store.get_ms(0, 0, imsi1); + ms_tmp = store.get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi1); OSMO_ASSERT(ms == ms_tmp); OSMO_ASSERT(strcmp(ms_imsi(ms), imsi1) == 0); - ms_tmp = store.get_ms(0, 0, imsi2); + ms_tmp = store.get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi2); OSMO_ASSERT(ms_tmp == NULL); ms = prepare_ms(&store, tlli + 1, GPRS_RLCMAC_UL_TBF); @@ -432,10 +432,10 @@ OSMO_ASSERT(ms == ms_tmp); OSMO_ASSERT(ms_tlli(ms) == tlli + 1); - ms_tmp = store.get_ms(0, 0, imsi1); + ms_tmp = store.get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi1); OSMO_ASSERT(ms_tmp != NULL); OSMO_ASSERT(ms_tmp != ms); - ms_tmp = store.get_ms(0, 0, imsi2); + ms_tmp = store.get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi2); OSMO_ASSERT(ms == ms_tmp); OSMO_ASSERT(strcmp(ms_imsi(ms), imsi2) == 0); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 116b234..c18fa77 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -450,7 +450,7 @@ dl_tbf[1]->update_ms(0xf1000002, GPRS_RLCMAC_DL_TBF); ms_set_imsi(dl_tbf[0]->ms(), "001001000000001"); - ms1 = bts_ms_store(bts)->get_ms(0, 0, "001001000000001"); + ms1 = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000001"); OSMO_ASSERT(ms1 != NULL); ms2 = bts_ms_store(bts)->get_ms(0xf1000001); OSMO_ASSERT(ms2 != NULL); @@ -459,9 +459,9 @@ /* change the IMSI on TBF 0 */ ms_set_imsi(dl_tbf[0]->ms(), "001001000000002"); - ms1 = bts_ms_store(bts)->get_ms(0, 0, "001001000000001"); + ms1 = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000001"); OSMO_ASSERT(ms1 == NULL); - ms1 = bts_ms_store(bts)->get_ms(0, 0, "001001000000002"); + ms1 = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000002"); OSMO_ASSERT(ms1 != NULL); OSMO_ASSERT(strcmp(ms_imsi(ms2), "001001000000002") == 0); OSMO_ASSERT(ms1 == ms2); @@ -470,7 +470,7 @@ { ms_ref(ms2); ms_set_imsi(dl_tbf[1]->ms(), "001001000000002"); - ms1 = bts_ms_store(bts)->get_ms(0, 0, "001001000000002"); + ms1 = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000002"); OSMO_ASSERT(ms1 != NULL); OSMO_ASSERT(ms1 != ms2); OSMO_ASSERT(strcmp(ms_imsi(ms1), "001001000000002") == 0); @@ -482,7 +482,7 @@ OSMO_ASSERT(ms2 == NULL); tbf_free(dl_tbf[1]); - ms1 = bts_ms_store(bts)->get_ms(0, 0, "001001000000002"); + ms1 = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000002"); OSMO_ASSERT(ms1 == NULL); TALLOC_FREE(the_pcu); @@ -565,7 +565,7 @@ delay_csec, buf, sizeof(buf)); OSMO_ASSERT(rc >= 0); - ms = bts_ms_store(bts)->get_ms(0, 0, imsi); + ms = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi); OSMO_ASSERT(ms != NULL); OSMO_ASSERT(ms_dl_tbf(ms) != NULL); ms_dl_tbf(ms)->set_ta(0); @@ -1708,7 +1708,7 @@ { GprsMs *ms, *ms2; - ms = bts_ms_store(bts)->get_ms(tlli, 0, imsi); + ms = bts_ms_store(bts)->get_ms(tlli, GSM_RESERVED_TMSI, imsi); dl_tbf_handle(bts, tlli, 0, imsi, 0, 0, 1000, data, data_size); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29839 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I364d238ff8a82abb14281140fe18b273c0e8f541 Gerrit-Change-Number: 29839 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: bts_rcv_imm_ass_cnf(): Improve logging
by pespin 21 Oct '22

21 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29718 ) Change subject: bts_rcv_imm_ass_cnf(): Improve logging ...................................................................... bts_rcv_imm_ass_cnf(): Improve logging Related: OS#5700 Change-Id: I29a290d1e8b6e237a74ac8fab8dd5e5e5db71796 --- M src/bts.cpp 1 file changed, 10 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index 646dc76..f77c5a2 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -666,7 +666,7 @@ int bts_rcv_imm_ass_cnf(struct gprs_rlcmac_bts *bts, const uint8_t *data, uint32_t fn) { - struct gprs_rlcmac_dl_tbf *dl_tbf = NULL; + struct gprs_rlcmac_dl_tbf *dl_tbf; const struct gsm48_imm_ass *imm_ass = (struct gsm48_imm_ass *)data; uint8_t plen; uint32_t tlli; @@ -681,9 +681,9 @@ data += 1 + plen; if ((*data & 0xf0) != 0xd0) { - LOGP(DRLCMAC, LOGL_ERROR, "Got IMM.ASS confirm, but rest " + LOGP(DTBFDL, LOGL_ERROR, "FN=%u Got IMM.ASS confirm, but rest " "octets do not start with bit sequence 'HH01' " - "(Packet Downlink Assignment)\n"); + "(Packet Downlink Assignment)\n", fn); return -EINVAL; } @@ -695,15 +695,17 @@ tlli |= (*data++) >> 4; ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI); - if (ms) - dl_tbf = ms_dl_tbf(ms); + if (!ms) { + LOGP(DTBFDL, LOGL_ERROR, "FN=%u Got IMM.ASS confirm for unknown MS with TLLI=%08x\n", fn, tlli); + return -EINVAL; + } + dl_tbf = ms_dl_tbf(ms); if (!dl_tbf) { - LOGP(DRLCMAC, LOGL_ERROR, "Got IMM.ASS confirm, but TLLI=%08x " - "does not exit\n", tlli); + LOGPMS(ms, DTBFDL, LOGL_ERROR, "FN=%u Got IMM.ASS confirm, but MS has no DL TBF!\n", fn); return -EINVAL; } - LOGP(DRLCMAC, LOGL_DEBUG, "Got IMM.ASS confirm for TLLI=%08x\n", tlli); + LOGPTBFDL(dl_tbf, LOGL_DEBUG, "FN=%u Got IMM.ASS confirm\n", fn); osmo_fsm_inst_dispatch(dl_tbf->state_fsm.fi, TBF_EV_ASSIGN_PCUIF_CNF, NULL); return 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29718 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I29a290d1e8b6e237a74ac8fab8dd5e5e5db71796 Gerrit-Change-Number: 29718 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: keith <keith(a)rhizomatica.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-pcu[master]: cosmetic: Update reference to func renamed in the past
by pespin 21 Oct '22

21 Oct '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29835 ) Change subject: cosmetic: Update reference to func renamed in the past ...................................................................... cosmetic: Update reference to func renamed in the past Fixes: 8a35e640a33373ea137125a5654bd9ae445b3769 Change-Id: I86d1fa1f3ea96ca06f3e8c8f07b8d5b14cf098c7 --- M src/tbf.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/tbf.cpp b/src/tbf.cpp index 2c68ede..d15cd3d 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -221,7 +221,7 @@ /* TODO: When the TLLI does not match the ms, check if there is another * MS object that belongs to that TLLI and if yes make sure one of them * gets deleted. This is the same problem that can arise with - * IMSI in gprs_rlcmac_dl_tbf::handle() so there should be a unified solution */ + * IMSI in dl_tbf_handle() so there should be a unified solution */ if (!ms_check_tlli(ms(), tlli)) { GprsMs *old_ms; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29835 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I86d1fa1f3ea96ca06f3e8c8f07b8d5b14cf098c7 Gerrit-Change-Number: 29835 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-pcu[master]: gprs_ms: Document functions setting/updating TLLI
by pespin 21 Oct '22

21 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29838 ) Change subject: gprs_ms: Document functions setting/updating TLLI ...................................................................... gprs_ms: Document functions setting/updating TLLI Based on information from original commit introducing the functions (939904672961fa7e28397e27f942a7d1fff4bbdf) and looking at the current code. Change-Id: Ia440c672a8d2e11169b41f787239bfbba0989231 --- M src/gprs_ms.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/38/29838/1 diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 3ed4244..8453f20 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -419,6 +419,7 @@ ms_unref(old_ms); } +/* Set/update the MS object TLLI based on knowledge gained from the MS side (Uplink direction) */ void ms_set_tlli(struct GprsMs *ms, uint32_t tlli) { if (tlli == ms->tlli || tlli == ms->new_ul_tlli) @@ -443,6 +444,7 @@ ms->new_ul_tlli = GSM_RESERVED_TMSI; } +/* Set/update the MS object TLLI based on knowledge gained from the SGSN side (Downlink direction) */ bool ms_confirm_tlli(struct GprsMs *ms, uint32_t tlli) { if (tlli == ms->tlli || tlli == ms->new_dl_tlli) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29838 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ia440c672a8d2e11169b41f787239bfbba0989231 Gerrit-Change-Number: 29838 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: bts_rcv_imm_ass_cnf(): Improve logging
by osmith 21 Oct '22

21 Oct '22
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29718 ) Change subject: bts_rcv_imm_ass_cnf(): Improve logging ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29718 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I29a290d1e8b6e237a74ac8fab8dd5e5e5db71796 Gerrit-Change-Number: 29718 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: keith <keith(a)rhizomatica.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 21 Oct 2022 12:02:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: cosmetic: Update reference to func renamed in the past
by osmith 21 Oct '22

21 Oct '22
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29835 ) Change subject: cosmetic: Update reference to func renamed in the past ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29835 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I86d1fa1f3ea96ca06f3e8c8f07b8d5b14cf098c7 Gerrit-Change-Number: 29835 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 21 Oct 2022 12:00:51 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: BSC: add TC_meas_rep_multi_band
by osmith 21 Oct '22

21 Oct '22
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837 to look at the new patch set (#2). Change subject: BSC: add TC_meas_rep_multi_band ...................................................................... BSC: add TC_meas_rep_multi_band Related: OS#5717 Related: osmo-bsc Ic5e4f0531e08685460948b102367825588d839ba Change-Id: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286 --- M bsc/BSC_Tests.ttcn M library/BSSMAP_Templates.ttcn 2 files changed, 97 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/29837/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837 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: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286 Gerrit-Change-Number: 29837 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-ttcn3-hacks[master]: BSC: add TC_meas_rep_multi_band
by osmith 21 Oct '22

21 Oct '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837 ) Change subject: BSC: add TC_meas_rep_multi_band ...................................................................... BSC: add TC_meas_rep_multi_band Related: OS#5717 Related: osmo-bsc Ic5e4f0531e08685460948b102367825588d839ba Change-Id: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286 --- M bsc/BSC_Tests.ttcn M library/BSSMAP_Templates.ttcn 2 files changed, 98 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/29837/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index a150310..7dcf196 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -5851,16 +5851,19 @@ } } -private function f_ho_out_of_this_bsc(template (omit) BSSMAP_oldToNewBSSIEs exp_oldToNewBSSIEs := omit) runs on MSC_ConnHdlr { +private function f_ho_out_of_this_bsc(template (omit) BSSMAP_oldToNewBSSIEs exp_oldToNewBSSIEs := omit, + boolean skip_meas_rep := false) runs on MSC_ConnHdlr { - var NcellReports neighbor_rep := { - { rxlev := 20, bcch_freq := 0, bsic := 11 } - }; - var octetstring l3_mr := enc_GsmRrL3Message(valueof(ts_MEAS_REP(true, 8, 8, reps := neighbor_rep))); - RSL.send(ts_RSL_MEAS_RES(g_chan_nr, 0, ts_RSL_IE_UplinkMeas, ts_RSL_IE_BS_Power(0), ts_RSL_IE_L1Info, - l3_mr, 0)); + if (not skip_meas_rep) { + var NcellReports neighbor_rep := { + { rxlev := 20, bcch_freq := 0, bsic := 11 } + }; + var octetstring l3_mr := enc_GsmRrL3Message(valueof(ts_MEAS_REP(true, 8, 8, reps := neighbor_rep))); + RSL.send(ts_RSL_MEAS_RES(g_chan_nr, 0, ts_RSL_IE_UplinkMeas, ts_RSL_IE_BS_Power(0), ts_RSL_IE_L1Info, + l3_mr, 0)); - BSSAP.receive(tr_BSSMAP_HandoverRequired(exp_oldToNewBSSIEs)); + BSSAP.receive(tr_BSSMAP_HandoverRequired(exp_oldToNewBSSIEs)); + } f_sleep(0.5); /* The MSC negotiates Handover Request and Handover Request Ack with @@ -11814,6 +11817,86 @@ f_shutdown_helper(); } +private function f_tc_ho_meas_rep_multi_band(charstring id) runs on MSC_ConnHdlr { + g_pars := f_gen_test_hdlr_pars(); + var PDU_BSSAP ass_req := f_gen_ass_req(); + ass_req.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType); + ass_req.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR})); + var template PDU_BSSAP exp_compl := f_gen_exp_compl(); + f_establish_fully(ass_req, exp_compl); + + /* Send a measurement report with bad rxlev except on 3rd entry. The + * measurement report is divided into two sub lists, as described in + * 3GPP TS 04.08 § 10.5.2.20. */ + var NcellReports neighbor_rep := { + /* Sub list 1: same band */ + { rxlev := 0, bcch_freq := 0, bsic := 11 }, /* ARFCN 700, band 1800, LAC 96 */ + { rxlev := 0, bcch_freq := 1, bsic := 12 }, /* ARFCN 800, band 1800, LAC 98 */ + /* Sub list 2: different band */ + { rxlev := 40, bcch_freq := 2, bsic := 13 }, /* ARFCN 200, band 850, LAC 97 */ + { rxlev := 0, bcch_freq := 3, bsic := 14 } /* ARFCN 1000, band 900, LAC 99 */ + }; + var octetstring l3_mr := enc_GsmRrL3Message(valueof(ts_MEAS_REP(true, 8, 8, reps := neighbor_rep))); + RSL.send(ts_RSL_MEAS_RES(g_chan_nr, 0, ts_RSL_IE_UplinkMeas, ts_RSL_IE_BS_Power(0), ts_RSL_IE_L1Info, + l3_mr, 0)); + + /* Expect a handover to the third entry. If the BSC parsed the report + * correctly, the third entry has LAC 97. Before this was fixed, the + * measurement report was parsed as one list sorted by ARFCN + * (200, 700, 800, 1000), which would result in LAC 98. */ + var template BSSMAP_FIELD_CellIdentificationList cid_list := { + cIl_LAC := { ts_BSSMAP_CI_LAC(97) } + }; + alt { + [] BSSAP.receive(tr_BSSMAP_HandoverRequired(cid_list := cid_list)) { + setverdict(pass); + } + [] BSSAP.receive(tr_BSSMAP_HandoverRequired()) { + setverdict(fail, "Handover has unexpected LAC in Cell Identification List. The BSC probably" + & " didn't parse the multi-band measurement report correctly."); + } + } + + f_ho_out_of_this_bsc(skip_meas_rep := true); +} +testcase TC_ho_meas_rep_multi_band() runs on test_CT { + /* Verify that the BSC parses the measurement report correctly when + * neighbors in multiple bands are configured (OS#5717). See + * gsm_arfcn2band_rc() in libosmocore src/gsm/gsm_utils.c for the + * ARFCN -> band mapping. The MS is connected to band 1800. */ + var MSC_ConnHdlr vc_conn; + + f_init_vty(); + f_bts_0_cfg(BSCVTY, + {"neighbor-list mode automatic", + "handover 1", + "handover algorithm 2", + "handover2 window rxlev averaging 1", + "no neighbors", + "neighbor lac 99 arfcn 1000 bsic any", /* band 900 */ + "neighbor lac 98 arfcn 800 bsic any", /* band 1800 */ + "neighbor lac 97 arfcn 200 bsic any", /* band 850 */ + "neighbor lac 96 arfcn 700 bsic any"}); /* band 1800 */ + f_vty_transceive(BSCVTY, "drop bts connection 0 oml"); + + f_init(1, true); + f_sleep(1.0); + + f_ctrs_bsc_and_bts_handover_init(); + + vc_conn := f_start_handler(refers(f_tc_ho_meas_rep_multi_band)); + vc_conn.done; + + f_ctrs_bsc_and_bts_add(0, "assignment:attempted"); + f_ctrs_bsc_and_bts_add(0, "assignment:completed"); + f_ctrs_bsc_and_bts_add(0, "handover:attempted"); + f_ctrs_bsc_and_bts_add(0, "handover:completed"); + f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:attempted"); + f_ctrs_bsc_and_bts_add(0, "interbsc_ho_out:completed"); + f_ctrs_bsc_and_bts_verify(); + f_shutdown_helper(); +} + control { /* CTRL interface testing */ execute( TC_ctrl_msc_connection_status() ); @@ -12148,6 +12231,8 @@ execute( TC_chan_alloc_algo_descending() ); execute( TC_chan_alloc_algo_ass_dynamic() ); + execute( TC_ho_meas_rep_multi_band() ); + /* Run TC_ho_out_of_this_bsc last, because it may trigger a segfault before osmo-bsc's patch * with change-id I5a3345ab0005a73597f5c27207480912a2f5aae6 */ execute( TC_ho_out_of_this_bsc() ); diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn index 26f7ed9..90cee6e 100644 --- a/library/BSSMAP_Templates.ttcn +++ b/library/BSSMAP_Templates.ttcn @@ -894,11 +894,15 @@ } -template PDU_BSSAP tr_BSSMAP_HandoverRequired(template BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := *) modifies tr_BSSAP_BSSMAP := { +template PDU_BSSAP tr_BSSMAP_HandoverRequired(template BSSMAP_oldToNewBSSIEs oldToNewBSSIEs := *, + template BSSMAP_FIELD_CellIdentificationList cid_list := *) modifies tr_BSSAP_BSSMAP := { pdu := { bssmap := { handoverRequired := { messageType := '11'O, + cellIdentifierList := { + cellIdentificationList := cid_list + }, oldToNewBSSInfo := f_tr_BSSMAP_IE_OldToNewBSSInfo(oldToNewBSSIEs) } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29837 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: I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286 Gerrit-Change-Number: 29837 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: gsm48_parse_meas_rep: fix parsing multi-band list
by osmith 21 Oct '22

21 Oct '22
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29836 ) Change subject: gsm48_parse_meas_rep: fix parsing multi-band list ...................................................................... gsm48_parse_meas_rep: fix parsing multi-band list When looking up "BCCH-FREQ-NCELL i" from the measurement report, don't treat the BCCH channel list as one list sorted by ascending ARFCN. Instead, treat it as two sub lists, one for the same band, and one for channels in different bands, as described in 3GPP TS 04.08 § 10.5.2.20. This fixes getting the wrong ARFCN from measurement reports in multi-band BSS, which leads to failing handovers. Fixes: OS#5717 Related: osmo-ttcn3-hacks I4fe6bb9e4b5a69ea6204585ebdf1f157a68a8286 Change-Id: Ic5e4f0531e08685460948b102367825588d839ba --- M include/osmocom/bsc/system_information.h M src/osmo-bsc/gsm_04_08_rr.c M src/osmo-bsc/system_information.c 3 files changed, 39 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/36/29836/1 diff --git a/include/osmocom/bsc/system_information.h b/include/osmocom/bsc/system_information.h index 08d34f8..7b1cff0 100644 --- a/include/osmocom/bsc/system_information.h +++ b/include/osmocom/bsc/system_information.h @@ -7,6 +7,7 @@ struct gsm_bts; +int band_compatible(const struct gsm_bts *bts, int arfcn); int generate_cell_chan_alloc(struct gsm_bts *bts); int generate_cell_chan_list(uint8_t *chan_list, struct gsm_bts *bts); int gsm_generate_si(struct gsm_bts *bts, enum osmo_sysinfo_type type); diff --git a/src/osmo-bsc/gsm_04_08_rr.c b/src/osmo-bsc/gsm_04_08_rr.c index 3321a0e..151ea73 100644 --- a/src/osmo-bsc/gsm_04_08_rr.c +++ b/src/osmo-bsc/gsm_04_08_rr.c @@ -766,6 +766,37 @@ return 0; } +/* Get the ARFCN from the BCCH channel list by the index "BCCH-FREQ-NCELL i" + * (idx) as described in 3GPP TS 04.08 § 10.5.2.20. The BCCH channel list is + * split into two sub lists, each ascendingly ordered by the ARFCN: + * 1) SI* and SI*bis entries + * 2) SI*ter entries (if available) + * Both sub lists are stored in one bitvec (nbv), iterate twice through it. */ +static int neigh_list_get_arfcn(struct gsm_bts *bts, struct bitvec *nbv, unsigned int idx) +{ + unsigned int sublist, arfcn, i = 0; + bool ter; + + for (sublist = 1; sublist <= 2; sublist++) { + for (arfcn = 0; arfcn < nbv->data_len * 8; arfcn++) { + /* Skip ARFCNs that aren't in any sub list */ + if (bitvec_get_bit_pos(nbv, arfcn) == ZERO) + continue; + + /* Skip SI*ter (1) / require SI*ter (2) */ + ter = !band_compatible(bts, arfcn); + if ((sublist == 1 && ter) || (sublist == 2 && !ter)) + continue; + + if (i == idx) + return arfcn; + i++; + } + } + + return 0; +} + int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg) { struct gsm48_hdr *gh = msgb_l3(msg); @@ -800,7 +831,7 @@ mrc = &rep->cell[0]; mrc->rxlev = data[3] & 0x3f; mrc->neigh_idx = data[4] >> 3; - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = ((data[4] & 0x07) << 3) | (data[5] >> 5); if (rep->num_cell < 2) return 0; @@ -808,7 +839,7 @@ mrc = &rep->cell[1]; mrc->rxlev = ((data[5] & 0x1f) << 1) | (data[6] >> 7); mrc->neigh_idx = (data[6] >> 2) & 0x1f; - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = ((data[6] & 0x03) << 4) | (data[7] >> 4); if (rep->num_cell < 3) return 0; @@ -816,7 +847,7 @@ mrc = &rep->cell[2]; mrc->rxlev = ((data[7] & 0x0f) << 2) | (data[8] >> 6); mrc->neigh_idx = (data[8] >> 1) & 0x1f; - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = ((data[8] & 0x01) << 5) | (data[9] >> 3); if (rep->num_cell < 4) return 0; @@ -824,7 +855,7 @@ mrc = &rep->cell[3]; mrc->rxlev = ((data[9] & 0x07) << 3) | (data[10] >> 5); mrc->neigh_idx = data[10] & 0x1f; - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = data[11] >> 2; if (rep->num_cell < 5) return 0; @@ -832,7 +863,7 @@ mrc = &rep->cell[4]; mrc->rxlev = ((data[11] & 0x03) << 4) | (data[12] >> 4); mrc->neigh_idx = ((data[12] & 0xf) << 1) | (data[13] >> 7); - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = (data[13] >> 1) & 0x3f; if (rep->num_cell < 6) return 0; @@ -840,7 +871,7 @@ mrc = &rep->cell[5]; mrc->rxlev = ((data[13] & 0x01) << 5) | (data[14] >> 3); mrc->neigh_idx = ((data[14] & 0x07) << 2) | (data[15] >> 6); - mrc->arfcn = bitvec_get_nth_set_bit(nbv, mrc->neigh_idx + 1); + mrc->arfcn = neigh_list_get_arfcn(bts, nbv, mrc->neigh_idx); mrc->bsic = data[15] & 0x3f; return 0; diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 48f7453..cfc9a04 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -52,7 +52,7 @@ * array. DCS1800 and PCS1900 can not be used at the same time so conserve * memory and do the below. */ -static int band_compatible(const struct gsm_bts *bts, int arfcn) +int band_compatible(const struct gsm_bts *bts, int arfcn) { enum gsm_band band; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29836 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic5e4f0531e08685460948b102367825588d839ba Gerrit-Change-Number: 29836 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • ...
  • 234
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.