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 -----
  • 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

April 2023

  • 1 participants
  • 2252 discussions
[S] Change in osmo-bsc[master]: si2quater: check return value of osmo_earfcn_del()
by fixeria 07 Apr '23

07 Apr '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32251 ) Change subject: si2quater: check return value of osmo_earfcn_del() ...................................................................... si2quater: check return value of osmo_earfcn_del() Change-Id: I227dad57737721c40a508f67616d9f5003bb1a3e Fixes: CID#313584 --- M src/osmo-bsc/bts_vty.c 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/51/32251/1 diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 0ecb6d6..fa8543e 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -2078,7 +2078,10 @@ vty_out(vty, "%% Warning: not enough space in SI2quater (%u/%u used) for a given EARFCN %u%s", bts->si2q_count, SI2Q_MAX_NUM, arfcn, VTY_NEWLINE); - osmo_earfcn_del(e, arfcn); + + if (osmo_earfcn_del(e, arfcn) != 0) { + vty_out(vty, "%% Failed to roll-back adding EARFCN %u%s", arfcn, VTY_NEWLINE); + } return CMD_WARNING; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32251 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I227dad57737721c40a508f67616d9f5003bb1a3e Gerrit-Change-Number: 32251 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bsc[2023q1]: si2quater: bts_earfcn_add(): do not add duplicate EARFCNs
by fixeria 07 Apr '23

07 Apr '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32250 ) Change subject: si2quater: bts_earfcn_add(): do not add duplicate EARFCNs ...................................................................... si2quater: bts_earfcn_add(): do not add duplicate EARFCNs We don't want to have duplicate EARFCNs in the config file. The desired behavior is modifying existing EARFCNs. Change-Id: Ia2fd8bd86d9f093967c1b0b0135151d2d5386dc1 Related: SYS#6401 (cherry picked from commit 143dc67c9955e065468ee8a19881c2c7a3b6a919) --- M src/osmo-bsc/system_information.c M tests/gsm0408/gsm0408_test.ok M tests/si2quater_neighbor_list.vty 3 files changed, 96 insertions(+), 78 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/32250/1 diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 1c69bb8..98d563e 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -220,7 +220,16 @@ uint8_t qrx, uint8_t meas_bw) { struct osmo_earfcn_si2q *e = &bts->si_common.si2quater_neigh_list; - int r = osmo_earfcn_add(e, earfcn, (meas_bw < EARFCN_MEAS_BW_INVALID) ? meas_bw : OSMO_EARFCN_MEAS_INVALID); + int r; + + /* EARFCN may already exist, so we delete it to avoid duplicates */ + if (osmo_earfcn_del(e, earfcn) == 0) + LOGP(DRR, LOGL_NOTICE, "EARFCN %u is already in the list, modifying\n", earfcn); + + if (meas_bw < EARFCN_MEAS_BW_INVALID) + r = osmo_earfcn_add(e, earfcn, meas_bw); + else + r = osmo_earfcn_add(e, earfcn, OSMO_EARFCN_MEAS_INVALID); if (r < 0) return r; diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index 1a8389d..619a297 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -79,93 +79,91 @@ BTS deallocated OK in test_si2q_mu() BTS allocation OK in test_si2q_long() Testing SYSINFO_TYPE_2quater combined EARFCN & UARFCN generation: -generating SI2quater for 17 EARFCNs and 1 UARFCNs... -generated valid SI2quater [00/05]: [23] 59 06 07 40 a0 25 0f 70 0c 1a 10 9c 00 02 cc 1e 09 07 82 39 76 56 0b +generating SI2quater for 16 EARFCNs and 1 UARFCNs... +generated valid SI2quater [00/05]: [23] 59 06 07 40 a0 25 0f 70 0c 1a 10 9c 00 02 cc 1e 09 07 84 d7 2e ca c1 +generated valid SI2quater [01/05]: [23] 59 06 07 42 a0 04 87 00 00 b3 07 83 d8 3c 2e c2 0f f5 cb b2 b0 2b 2b +generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 87 00 00 b3 08 40 c8 42 0d c2 10 a9 cb b2 b0 2b 2b +generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 87 00 00 b3 08 53 d8 42 a6 42 15 6d cb b2 b0 2b 2b +generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 87 00 00 b3 08 56 a8 42 4e c2 12 b1 cb b2 b0 2b 2b +generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 87 00 00 b3 08 4b b8 42 65 39 76 56 0b 2b 2b 2b 2b +generating SI2quater for 16 EARFCNs and 2 UARFCNs... +generated valid SI2quater [00/05]: [23] 59 06 07 40 a0 25 0f 70 14 4d e7 00 46 00 01 66 0f 04 72 ec ac 0b 2b generated valid SI2quater [01/05]: [23] 59 06 07 42 a0 04 87 00 00 b3 07 84 d8 3c 1e c1 e1 75 cb b2 b0 2b 2b generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 87 00 00 b3 08 3f d8 42 06 42 10 6d cb b2 b0 2b 2b generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 87 00 00 b3 08 42 a8 42 9e c2 15 31 cb b2 b0 2b 2b generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 87 00 00 b3 08 55 b8 42 b5 42 12 75 cb b2 b0 2b 2b generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 87 00 00 b3 08 4a c8 42 5d c2 13 29 cb b2 b0 2b 2b -generating SI2quater for 17 EARFCNs and 2 UARFCNs... -generated valid SI2quater [00/06]: [23] 59 06 07 40 c0 25 0f 70 14 4d e7 00 46 00 01 66 0f 04 72 ec ac 0b 2b -generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e1 36 0f 07 ae 5d 95 83 2b 2b -generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 85 d8 41 fe c2 10 31 cb b2 b0 2b 2b -generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 41 b8 42 15 42 14 f5 cb b2 b0 2b 2b -generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 54 c8 42 ad c2 15 a9 cb b2 b0 2b 2b -generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 49 d8 42 56 42 12 ed cb b2 b0 2b 2b -generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4c a7 2e ca c1 2b 2b 2b 2b 2b 2b 2b -generating SI2quater for 17 EARFCNs and 3 UARFCNs... -generated valid SI2quater [00/06]: [23] 59 06 07 40 c0 25 0f 70 1c 4d e7 03 04 87 00 00 b3 07 82 39 76 56 0b -generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e1 36 0f 07 ae 5d 95 83 2b 2b -generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 85 d8 41 fe c2 10 31 cb b2 b0 2b 2b -generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 41 b8 42 15 42 14 f5 cb b2 b0 2b 2b -generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 54 c8 42 ad c2 15 a9 cb b2 b0 2b 2b -generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 49 d8 42 56 42 12 ed cb b2 b0 2b 2b -generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4c a7 2e ca c1 2b 2b 2b 2b 2b 2b 2b -generating SI2quater for 17 EARFCNs and 4 UARFCNs... +generating SI2quater for 16 EARFCNs and 3 UARFCNs... +generated valid SI2quater [00/05]: [23] 59 06 07 40 a0 25 0f 70 1c 4d e7 03 04 87 00 00 b3 07 82 39 76 56 0b +generated valid SI2quater [01/05]: [23] 59 06 07 42 a0 04 87 00 00 b3 07 84 d8 3c 1e c1 e1 75 cb b2 b0 2b 2b +generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 87 00 00 b3 08 3f d8 42 06 42 10 6d cb b2 b0 2b 2b +generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 87 00 00 b3 08 42 a8 42 9e c2 15 31 cb b2 b0 2b 2b +generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 87 00 00 b3 08 55 b8 42 b5 42 12 75 cb b2 b0 2b 2b +generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 87 00 00 b3 08 4a c8 42 5d c2 13 29 cb b2 b0 2b 2b +generating SI2quater for 16 EARFCNs and 4 UARFCNs... generated valid SI2quater [00/06]: [23] 59 06 07 40 c0 25 0f 70 24 59 fa 26 73 84 87 00 00 b2 e5 d9 58 2b 2b -generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e0 90 78 4d 72 ec ac 0b 2b 2b -generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 83 d8 3c 2e c2 0f f5 cb b2 b0 2b 2b -generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 40 c8 42 0d c2 10 a9 cb b2 b0 2b 2b -generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 53 d8 42 a6 42 15 6d cb b2 b0 2b 2b -generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 56 a8 42 4e c2 12 b1 cb b2 b0 2b 2b -generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4b b8 42 65 39 76 56 0b 2b 2b 2b 2b -generating SI2quater for 17 EARFCNs and 5 UARFCNs... +generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e1 36 0f 07 ae 5d 95 83 2b 2b +generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 85 d8 41 fe c2 10 31 cb b2 b0 2b 2b +generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 41 b8 42 15 42 14 f5 cb b2 b0 2b 2b +generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 54 c8 42 ad c2 15 a9 cb b2 b0 2b 2b +generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 49 d8 42 56 42 12 ed cb b2 b0 2b 2b +generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4c a7 2e ca c1 2b 2b 2b 2b 2b 2b 2b +generating SI2quater for 16 EARFCNs and 5 UARFCNs... generated valid SI2quater [00/06]: [23] 59 06 07 40 c0 25 0f 70 2c 59 fa 30 73 f6 04 87 00 00 b2 e5 d9 58 2b -generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e0 90 78 4d 72 ec ac 0b 2b 2b -generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 83 d8 3c 2e c2 0f f5 cb b2 b0 2b 2b -generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 40 c8 42 0d c2 10 a9 cb b2 b0 2b 2b -generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 53 d8 42 a6 42 15 6d cb b2 b0 2b 2b -generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 56 a8 42 4e c2 12 b1 cb b2 b0 2b 2b -generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4b b8 42 65 39 76 56 0b 2b 2b 2b 2b -generating SI2quater for 17 EARFCNs and 6 UARFCNs... +generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e1 36 0f 07 ae 5d 95 83 2b 2b +generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 85 d8 41 fe c2 10 31 cb b2 b0 2b 2b +generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 41 b8 42 15 42 14 f5 cb b2 b0 2b 2b +generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 54 c8 42 ad c2 15 a9 cb b2 b0 2b 2b +generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 49 d8 42 56 42 12 ed cb b2 b0 2b 2b +generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4c a7 2e ca c1 2b 2b 2b 2b 2b 2b 2b +generating SI2quater for 16 EARFCNs and 6 UARFCNs... generated valid SI2quater [00/06]: [23] 59 06 07 40 c0 25 0f 70 34 f1 ae 15 f3 f4 83 03 2b 2b 2b 2b 2b 2b 2b -generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e0 90 78 4d 72 ec ac 0b 2b 2b -generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 83 d8 3c 2e c2 0f f5 cb b2 b0 2b 2b -generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 40 c8 42 0d c2 10 a9 cb b2 b0 2b 2b -generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 53 d8 42 a6 42 15 6d cb b2 b0 2b 2b -generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 56 a8 42 4e c2 12 b1 cb b2 b0 2b 2b -generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4b b8 42 65 39 76 56 0b 2b 2b 2b 2b -generating SI2quater for 17 EARFCNs and 7 UARFCNs... +generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e1 36 0f 07 ae 5d 95 83 2b 2b +generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 85 d8 41 fe c2 10 31 cb b2 b0 2b 2b +generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 41 b8 42 15 42 14 f5 cb b2 b0 2b 2b +generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 54 c8 42 ad c2 15 a9 cb b2 b0 2b 2b +generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 49 d8 42 56 42 12 ed cb b2 b0 2b 2b +generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4c a7 2e ca c1 2b 2b 2b 2b 2b 2b 2b +generating SI2quater for 16 EARFCNs and 7 UARFCNs... generated valid SI2quater [00/06]: [23] 59 06 07 40 c0 25 0f 70 3c f1 ae 15 f3 f4 83 01 83 2b 2b 2b 2b 2b 2b -generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e0 90 78 4d 72 ec ac 0b 2b 2b -generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 83 d8 3c 2e c2 0f f5 cb b2 b0 2b 2b -generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 40 c8 42 0d c2 10 a9 cb b2 b0 2b 2b -generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 53 d8 42 a6 42 15 6d cb b2 b0 2b 2b -generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 56 a8 42 4e c2 12 b1 cb b2 b0 2b 2b -generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4b b8 42 65 39 76 56 0b 2b 2b 2b 2b -generating SI2quater for 17 EARFCNs and 8 UARFCNs... +generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e1 36 0f 07 ae 5d 95 83 2b 2b +generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 85 d8 41 fe c2 10 31 cb b2 b0 2b 2b +generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 41 b8 42 15 42 14 f5 cb b2 b0 2b 2b +generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 54 c8 42 ad c2 15 a9 cb b2 b0 2b 2b +generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 49 d8 42 56 42 12 ed cb b2 b0 2b 2b +generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4c a7 2e ca c1 2b 2b 2b 2b 2b 2b 2b +generating SI2quater for 16 EARFCNs and 8 UARFCNs... generated valid SI2quater [00/06]: [23] 59 06 07 40 c0 25 0f 70 45 19 a0 0d 7d 7e a6 19 e7 0b 2b 2b 2b 2b 2b -generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e0 90 78 4d 72 ec ac 0b 2b 2b -generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 83 d8 3c 2e c2 0f f5 cb b2 b0 2b 2b -generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 40 c8 42 0d c2 10 a9 cb b2 b0 2b 2b -generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 53 d8 42 a6 42 15 6d cb b2 b0 2b 2b -generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 56 a8 42 4e c2 12 b1 cb b2 b0 2b 2b -generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4b b8 42 65 39 76 56 0b 2b 2b 2b 2b -generating SI2quater for 17 EARFCNs and 9 UARFCNs... +generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e1 36 0f 07 ae 5d 95 83 2b 2b +generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 85 d8 41 fe c2 10 31 cb b2 b0 2b 2b +generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 41 b8 42 15 42 14 f5 cb b2 b0 2b 2b +generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 54 c8 42 ad c2 15 a9 cb b2 b0 2b 2b +generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 49 d8 42 56 42 12 ed cb b2 b0 2b 2b +generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4c a7 2e ca c1 2b 2b 2b 2b 2b 2b 2b +generating SI2quater for 16 EARFCNs and 9 UARFCNs... generated valid SI2quater [00/06]: [23] 59 06 07 40 c0 25 0f 70 4d 19 a0 26 fd 66 a6 03 e7 fa 0b 2b 2b 2b 2b -generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e0 90 78 4d 72 ec ac 0b 2b 2b -generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 83 d8 3c 2e c2 0f f5 cb b2 b0 2b 2b -generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 40 c8 42 0d c2 10 a9 cb b2 b0 2b 2b -generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 53 d8 42 a6 42 15 6d cb b2 b0 2b 2b -generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 56 a8 42 4e c2 12 b1 cb b2 b0 2b 2b -generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4b b8 42 65 39 76 56 0b 2b 2b 2b 2b -generating SI2quater for 17 EARFCNs and 10 UARFCNs... +generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e1 36 0f 07 ae 5d 95 83 2b 2b +generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 85 d8 41 fe c2 10 31 cb b2 b0 2b 2b +generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 41 b8 42 15 42 14 f5 cb b2 b0 2b 2b +generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 54 c8 42 ad c2 15 a9 cb b2 b0 2b 2b +generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 49 d8 42 56 42 12 ed cb b2 b0 2b 2b +generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4c a7 2e ca c1 2b 2b 2b 2b 2b 2b 2b +generating SI2quater for 16 EARFCNs and 10 UARFCNs... generated valid SI2quater [00/06]: [23] 59 06 07 40 c0 25 0f 70 55 47 89 1e fd 7c b0 00 e7 9b b0 2b 2b 2b 2b -generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e0 90 78 4d 72 ec ac 0b 2b 2b -generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 83 d8 3c 2e c2 0f f5 cb b2 b0 2b 2b -generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 40 c8 42 0d c2 10 a9 cb b2 b0 2b 2b -generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 53 d8 42 a6 42 15 6d cb b2 b0 2b 2b -generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 56 a8 42 4e c2 12 b1 cb b2 b0 2b 2b -generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4b b8 42 65 39 76 56 0b 2b 2b 2b 2b -generating SI2quater for 17 EARFCNs and 11 UARFCNs... +generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e1 36 0f 07 ae 5d 95 83 2b 2b +generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 85 d8 41 fe c2 10 31 cb b2 b0 2b 2b +generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 41 b8 42 15 42 14 f5 cb b2 b0 2b 2b +generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 54 c8 42 ad c2 15 a9 cb b2 b0 2b 2b +generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 49 d8 42 56 42 12 ed cb b2 b0 2b 2b +generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4c a7 2e ca c1 2b 2b 2b 2b 2b 2b 2b +generating SI2quater for 16 EARFCNs and 11 UARFCNs... generated valid SI2quater [00/06]: [23] 59 06 07 40 c0 25 0f 70 5d 47 89 1e fd 7c b0 01 67 9b b3 f8 2b 2b 2b -generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e0 90 78 4d 72 ec ac 0b 2b 2b -generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 83 d8 3c 2e c2 0f f5 cb b2 b0 2b 2b -generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 40 c8 42 0d c2 10 a9 cb b2 b0 2b 2b -generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 53 d8 42 a6 42 15 6d cb b2 b0 2b 2b -generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 56 a8 42 4e c2 12 b1 cb b2 b0 2b 2b -generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4b b8 42 65 39 76 56 0b 2b 2b 2b 2b +generated valid SI2quater [01/06]: [23] 59 06 07 42 c0 04 87 00 00 b3 07 82 41 e1 36 0f 07 ae 5d 95 83 2b 2b +generated valid SI2quater [02/06]: [23] 59 06 07 44 c0 04 87 00 00 b3 07 85 d8 41 fe c2 10 31 cb b2 b0 2b 2b +generated valid SI2quater [03/06]: [23] 59 06 07 46 c0 04 87 00 00 b3 08 41 b8 42 15 42 14 f5 cb b2 b0 2b 2b +generated valid SI2quater [04/06]: [23] 59 06 07 48 c0 04 87 00 00 b3 08 54 c8 42 ad c2 15 a9 cb b2 b0 2b 2b +generated valid SI2quater [05/06]: [23] 59 06 07 4a c0 04 87 00 00 b3 08 49 d8 42 56 42 12 ed cb b2 b0 2b 2b +generated valid SI2quater [06/06]: [23] 59 06 07 4c c0 04 87 00 00 b3 08 4c a7 2e ca c1 2b 2b 2b 2b 2b 2b 2b BTS deallocated OK in test_si2q_long() BTS allocation OK in test_si_ba_ind() Testing if BA-IND is set as expected in SI2xxx and SI5xxx diff --git a/tests/si2quater_neighbor_list.vty b/tests/si2quater_neighbor_list.vty index ea353f2..0aa1c23 100644 --- a/tests/si2quater_neighbor_list.vty +++ b/tests/si2quater_neighbor_list.vty @@ -95,14 +95,12 @@ OsmoBSC(config-net-bts)# ### EARFCN add command: EARFCN already exists -OsmoBSC(config-net-bts)# ### FIXME: osmo-bsc adds a duplicate EARFCN OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 300 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 2 OsmoBSC(config-net-bts)# show running-config ... bts 0 ... !si2quater neighbor-list si2quater neighbor-list add earfcn 0 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 8 - si2quater neighbor-list add earfcn 300 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 5 si2quater neighbor-list add earfcn 300 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 2 ... !si2quater neighbor-list @@ -110,7 +108,6 @@ OsmoBSC(config-net-bts)# ### Remove remaining EARFCNs OsmoBSC(config-net-bts)# si2quater neighbor-list del earfcn 0 OsmoBSC(config-net-bts)# si2quater neighbor-list del earfcn 300 -OsmoBSC(config-net-bts)# si2quater neighbor-list del earfcn 300 OsmoBSC(config-net-bts)# show running-config ... !si2quater neighbor-list -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32250 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2023q1 Gerrit-Change-Id: Ia2fd8bd86d9f093967c1b0b0135151d2d5386dc1 Gerrit-Change-Number: 32250 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bsc[2023q1]: si2quater: add CTRL commands for deleting neighbor [EU]ARFCNs
by fixeria 07 Apr '23

07 Apr '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32249 ) Change subject: si2quater: add CTRL commands for deleting neighbor [EU]ARFCNs ...................................................................... si2quater: add CTRL commands for deleting neighbor [EU]ARFCNs EUTRAN neighbors can be deleted using the following command: $ osmo_ctrl.py \ -d 127.0.0.1 -p 4249 \ -s "bts.0.si2quater-neighbor-list.del.earfcn" EARFCN UTRAN neighbors can be deleted using the following command: $ osmo_ctrl.py \ -d 127.0.0.1 -p 4249 \ -s "bts.0.si2quater-neighbor-list.del.uarfcn" UARFCN,SCRAMBLE This commit implements only deletion, implementing the add command would require slightly more effort (lots of manual string parsing), so it's left as a TODO for later. Change-Id: I890bffb003f2a0ee9438f6ea6e8067c092504f08 Related: SYS#6401 (cherry picked from commit f2f0ab209d39803dfd1a6931a11b47307e0d2b8b) --- M src/osmo-bsc/bts_ctrl.c 1 file changed, 100 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/49/32249/1 diff --git a/src/osmo-bsc/bts_ctrl.c b/src/osmo-bsc/bts_ctrl.c index 728d89f..4b4b1fb 100644 --- a/src/osmo-bsc/bts_ctrl.c +++ b/src/osmo-bsc/bts_ctrl.c @@ -34,6 +34,7 @@ #include <osmocom/bsc/chan_alloc.h> #include <osmocom/bsc/abis_nm.h> #include <osmocom/bsc/neighbor_ident.h> +#include <osmocom/bsc/system_information.h> static int location_equal(struct bts_location *a, struct bts_location *b) { @@ -623,6 +624,76 @@ CTRL_CMD_DEFINE_WO(bts_neighbor_list_mode, "neighbor-list mode"); +/* si2quater neighbor management: delete an EARFCN. + * Format: bts.<0-255>.si2quater-neighbor-list.del.earfcn EARFCN + * EARFCN is in range 0..65535 */ +static int set_bts_si2quater_neighbor_list_del_earfcn(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = (struct gsm_bts *)cmd->node; + struct osmo_earfcn_si2q *e = &bts->si_common.si2quater_neigh_list; + int earfcn; + + if (osmo_str_to_int(&earfcn, cmd->value, 10, 0, 65535) < 0) { + cmd->reply = "Failed to parse neighbor EARFCN value"; + return CTRL_CMD_ERROR; + } + + if (osmo_earfcn_del(e, earfcn) < 0) { + cmd->reply = "Failed to delete a (not existent?) neighbor EARFCN"; + return CTRL_CMD_ERROR; + } + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_WO_NOVRF(bts_si2quater_neighbor_list_del_earfcn, + "si2quater-neighbor-list del earfcn"); + +/* si2quater neighbor management: delete an UARFCN + * Format: bts.<0-255>.si2quater-neighbor-list.del.uarfcn UARFCN,SCRAMBLE + * UARFCN is in range 0..16383, SCRAMBLE is in range 0..511 */ +static int set_bts_si2quater_neighbor_list_del_uarfcn(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = (struct gsm_bts *)cmd->node; + char *uarfcn_str, *scramble_str; + char *tmp, *saveptr; + int uarfcn, scramble; + + tmp = talloc_strdup(OTC_SELECT, cmd->value); + if (!tmp) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + uarfcn_str = strtok_r(tmp, ",", &saveptr); + scramble_str = strtok_r(NULL, ",", &saveptr); + + if (!uarfcn_str || osmo_str_to_int(&uarfcn, uarfcn_str, 10, 0, 16383) < 0) { + cmd->reply = "Failed to parse neighbor UARFCN value"; + return CTRL_CMD_ERROR; + } + + if (!scramble_str || osmo_str_to_int(&scramble, scramble_str, 10, 0, 511) < 0) { + cmd->reply = "Failed to parse neighbor scrambling code"; + return CTRL_CMD_ERROR; + } + + if (bts_uarfcn_del(bts, uarfcn, scramble) < 0) { + cmd->reply = "Failed to delete a (not existent?) neighbor UARFCN"; + return CTRL_CMD_ERROR; + } + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_WO_NOVRF(bts_si2quater_neighbor_list_del_uarfcn, + "si2quater-neighbor-list del uarfcn"); + +/* TODO: si2quater neighbor management: add EARFCN */ +/* TODO: si2quater neighbor management: add UARFCN */ + int bsc_bts_ctrl_cmds_install(void) { int rc = 0; @@ -643,6 +714,8 @@ rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_add); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_del); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_mode); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_si2quater_neighbor_list_del_earfcn); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_si2quater_neighbor_list_del_uarfcn); rc |= neighbor_ident_ctrl_init(); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32249 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2023q1 Gerrit-Change-Id: I890bffb003f2a0ee9438f6ea6e8067c092504f08 Gerrit-Change-Number: 32249 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[2023q1]: si2quater: bts_uarfcn_add(): check if already added first
by fixeria 07 Apr '23

07 Apr '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32247 ) Change subject: si2quater: bts_uarfcn_add(): check if already added first ...................................................................... si2quater: bts_uarfcn_add(): check if already added first This way we print the proper message if the given UARFCN is already added, no matter if the UTRAN neighbour list is full or not. Change-Id: Ife83023f6a9e28d77e44e4757457d4d1c879e78f Related: SYS#6401 (cherry picked from commit a60d74ba9c660612833b2634435ce4f0714c7b34) --- M src/osmo-bsc/system_information.c 1 file changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/32247/1 diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index cfc9a04..7687c90 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -302,12 +302,12 @@ *ual = bts->si_common.data.uarfcn_list, *scl = bts->si_common.data.scramble_list; - if (len == MAX_EARFCN_LIST) - return -ENOMEM; - if (pos >= 0) return -EADDRINUSE; + if (len == MAX_EARFCN_LIST) + return -ENOMEM; + /* find the suitable position for arfcn if any */ pos = uarfcn_sc_pos(bts, arfcn, SC_BOUND); i = (pos < 0) ? len : pos; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2023q1 Gerrit-Change-Id: Ife83023f6a9e28d77e44e4757457d4d1c879e78f Gerrit-Change-Number: 32247 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bsc[2023q1]: tests: demonstrate the problems of 'si2quater neighbor-list'
by fixeria 07 Apr '23

07 Apr '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32246 ) Change subject: tests: demonstrate the problems of 'si2quater neighbor-list' ...................................................................... tests: demonstrate the problems of 'si2quater neighbor-list' * osmo-bsc currently does not support adding multile EARFCNs with different thresh/prio/qrxlv parameter values; * adding an EARFCN which already exists creates a duplicate; * adding an UARFCN which already exists fails; * adding UARFCN=0 fails. Change-Id: Iece6b9058f4eb06f8f2c19311de4f2eea01cfe82 Related: SYS#6401 (cherry picked from commit 6d369665dda4160068e4f66851c3c30dcbd6133b) --- M tests/si2quater_neighbor_list.vty 1 file changed, 56 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/46/32246/1 diff --git a/tests/si2quater_neighbor_list.vty b/tests/si2quater_neighbor_list.vty index d67fac2..dbb8d2a 100644 --- a/tests/si2quater_neighbor_list.vty +++ b/tests/si2quater_neighbor_list.vty @@ -82,8 +82,35 @@ ... !si2quater neighbor-list +OsmoBSC(config-net-bts)# ### EARFCN add command: different params +OsmoBSC(config-net-bts)# ### FIXME: osmo-bsc does not support different thresh/prio/qrxlv +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 300 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 5 +OsmoBSC(config-net-bts)# show running-config +... + bts 0 +... !si2quater neighbor-list + si2quater neighbor-list add earfcn 0 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 8 + si2quater neighbor-list add earfcn 300 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 5 +... !si2quater neighbor-list + + +OsmoBSC(config-net-bts)# ### EARFCN add command: EARFCN already exists +OsmoBSC(config-net-bts)# ### FIXME: osmo-bsc adds a duplicate EARFCN +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 300 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 2 +OsmoBSC(config-net-bts)# show running-config +... + bts 0 +... !si2quater neighbor-list + si2quater neighbor-list add earfcn 0 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 8 + si2quater neighbor-list add earfcn 300 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 5 + si2quater neighbor-list add earfcn 300 thresh-hi 7 thresh-lo 5 prio 5 qrxlv 6 meas 2 +... !si2quater neighbor-list + + OsmoBSC(config-net-bts)# ### Remove remaining EARFCNs OsmoBSC(config-net-bts)# si2quater neighbor-list del earfcn 0 +OsmoBSC(config-net-bts)# si2quater neighbor-list del earfcn 300 +OsmoBSC(config-net-bts)# si2quater neighbor-list del earfcn 300 OsmoBSC(config-net-bts)# show running-config ... !si2quater neighbor-list @@ -121,6 +148,18 @@ ... !si2quater neighbor-list +OsmoBSC(config-net-bts)# ### Adding duplicate UARFCN is not allowed +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 111 511 1 +% Unable to add UARFCN: (111, 511) is already added +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 111 511 0 +% Unable to add UARFCN: (111, 511) is already added + + +OsmoBSC(config-net-bts)# ### FIXME: UARFCN 0 cannot be added +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 0 1 1 +% Warning: not enough space in SI2quater for a given UARFCN (0, 1) + + OsmoBSC(config-net-bts)# ### Remove remaining UARFCNs OsmoBSC(config-net-bts)# si2quater neighbor-list del uarfcn 111 511 OsmoBSC(config-net-bts)# si2quater neighbor-list del uarfcn 111 211 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2023q1 Gerrit-Change-Id: Iece6b9058f4eb06f8f2c19311de4f2eea01cfe82 Gerrit-Change-Number: 32246 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bsc[2023q1]: tests: add VTY transcript tests for 'si2quater neighbor-list'
by fixeria 07 Apr '23

07 Apr '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32245 ) Change subject: tests: add VTY transcript tests for 'si2quater neighbor-list' ...................................................................... tests: add VTY transcript tests for 'si2quater neighbor-list' Change-Id: I1209cca6a4ba0b9658a98f1782a9575c01263832 Related: SYS#6401 (cherry picked from commit bd6f8887e6a0ae5f8e99c5fd1c128fac0b4b5bf4) --- A tests/si2quater_neighbor_list.vty 1 file changed, 139 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/45/32245/1 diff --git a/tests/si2quater_neighbor_list.vty b/tests/si2quater_neighbor_list.vty new file mode 100644 index 0000000..d67fac2 --- /dev/null +++ b/tests/si2quater_neighbor_list.vty @@ -0,0 +1,128 @@ +OsmoBSC> enable +OsmoBSC# configure terminal +OsmoBSC(config)# network + +OsmoBSC(config-net)# ## No neighbor EARFCNs by default +OsmoBSC(config-net)# show running-config +... !si2quater neighbor-list + + +OsmoBSC(config-net)# bts 0 +OsmoBSC(config-net-bts)# si2quater? + si2quater SI2quater Neighbor List +OsmoBSC(config-net-bts)# si2quater ? + neighbor-list SI2quater Neighbor List +OsmoBSC(config-net-bts)# si2quater neighbor-list ? + add Add to manual SI2quater neighbor list + del Delete from SI2quater manual neighbor list + +OsmoBSC(config-net-bts)# si2quater neighbor-list add ? + earfcn EARFCN of neighbor + uarfcn UARFCN of neighbor +OsmoBSC(config-net-bts)# si2quater neighbor-list del ? + earfcn EARFCN of neighbor + uarfcn UARFCN of neighbor + + +OsmoBSC(config-net-bts)# ### Delete command syntax +OsmoBSC(config-net-bts)# si2quater neighbor-list del earfcn ? + <0-65535> EARFCN +OsmoBSC(config-net-bts)# si2quater neighbor-list del uarfcn ? + <0-16383> UARFCN + + +OsmoBSC(config-net-bts)# ### EARFCN add command syntax +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn ? + <0-65535> EARFCN of neighbor +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 0 thresh-hi ? + <0-31> threshold high bits +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 0 thresh-hi 0 thresh-lo ? + <0-32> threshold low bits (32 means NA) +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 0 thresh-hi 0 thresh-lo 32 prio ? + <0-8> priority (8 means NA) +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 0 thresh-hi 0 thresh-lo 32 prio 8 qrxlv ? + <0-32> QRXLEVMIN (32 means NA) +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 0 thresh-hi 0 thresh-lo 32 prio 8 qrxlv 32 meas ? + <0-8> measurement bandwidth (8 means NA) +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 0 thresh-hi 0 thresh-lo 32 prio 8 qrxlv 32 meas 8 ? + <cr> + + +OsmoBSC(config-net-bts)# ### UARFCN add command syntax +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn ? + <0-16383> UARFCN of neighbor +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 0 ? + <0-511> scrambling code +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 0 0 ? + <0-1> diversity bit +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 0 0 0 ? + <cr> + + +OsmoBSC(config-net-bts)# ### EARFCN add/del command tests +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 0 thresh-hi 0 thresh-lo 32 prio 8 qrxlv 32 meas 8 +OsmoBSC(config-net-bts)# si2quater neighbor-list add earfcn 65535 thresh-hi 0 thresh-lo 32 prio 8 qrxlv 32 meas 8 +OsmoBSC(config-net-bts)# show running-config +... + bts 0 +... !si2quater neighbor-list + si2quater neighbor-list add earfcn 0 thresh-hi 0 thresh-lo 32 prio 8 qrxlv 32 meas 8 + si2quater neighbor-list add earfcn 65535 thresh-hi 0 thresh-lo 32 prio 8 qrxlv 32 meas 8 +... !si2quater neighbor-list + +OsmoBSC(config-net-bts)# si2quater neighbor-list del earfcn 33 +% Unable to delete arfcn 33: No such file or directory + +OsmoBSC(config-net-bts)# si2quater neighbor-list del earfcn 65535 +OsmoBSC(config-net-bts)# show running-config +... + bts 0 +... !si2quater neighbor-list + si2quater neighbor-list add earfcn 0 thresh-hi 0 thresh-lo 32 prio 8 qrxlv 32 meas 8 +... !si2quater neighbor-list + + +OsmoBSC(config-net-bts)# ### Remove remaining EARFCNs +OsmoBSC(config-net-bts)# si2quater neighbor-list del earfcn 0 +OsmoBSC(config-net-bts)# show running-config +... !si2quater neighbor-list + + +OsmoBSC(config-net-bts)# ### UARFCN add/del command tests +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 1 256 0 +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 111 211 1 +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 111 511 1 +OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 16383 0 0 +OsmoBSC(config-net-bts)# show running-config +... + bts 0 +... !si2quater neighbor-list + si2quater neighbor-list add uarfcn 1 256 0 + si2quater neighbor-list add uarfcn 111 511 1 + si2quater neighbor-list add uarfcn 111 211 1 + si2quater neighbor-list add uarfcn 16383 0 0 +... !si2quater neighbor-list + +OsmoBSC(config-net-bts)# si2quater neighbor-list del uarfcn 1 +% Command incomplete. +OsmoBSC(config-net-bts)# si2quater neighbor-list del uarfcn 33 256 +% Unable to delete uarfcn: pair not found +OsmoBSC(config-net-bts)# si2quater neighbor-list del uarfcn 1 255 +% Unable to delete uarfcn: pair not found + +OsmoBSC(config-net-bts)# si2quater neighbor-list del uarfcn 1 256 +OsmoBSC(config-net-bts)# si2quater neighbor-list del uarfcn 16383 0 +OsmoBSC(config-net-bts)# show running-config +... + bts 0 +... !si2quater neighbor-list + si2quater neighbor-list add uarfcn 111 511 1 + si2quater neighbor-list add uarfcn 111 211 1 +... !si2quater neighbor-list + + +OsmoBSC(config-net-bts)# ### Remove remaining UARFCNs +OsmoBSC(config-net-bts)# si2quater neighbor-list del uarfcn 111 511 +OsmoBSC(config-net-bts)# si2quater neighbor-list del uarfcn 111 211 +OsmoBSC(config-net-bts)# show running-config +... !si2quater neighbor-list -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2023q1 Gerrit-Change-Id: I1209cca6a4ba0b9658a98f1782a9575c01263832 Gerrit-Change-Number: 32245 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[2023q1]: si2quater: bts_uarfcn_add(): modify existsing UARFCNs
by fixeria 07 Apr '23

07 Apr '23
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32248 ) Change subject: si2quater: bts_uarfcn_add(): modify existsing UARFCNs ...................................................................... si2quater: bts_uarfcn_add(): modify existsing UARFCNs Do not print an error, modify the existsing UARFCNs instead. Change-Id: Iadc884aa8968e2dc01adf26ba68ba9597fa05d94 Related: SYS#6401 (cherry picked from commit 117c699107a08dc286f22fd983365c6c0d9714ef) --- M src/osmo-bsc/bts_vty.c M src/osmo-bsc/system_information.c M tests/si2quater_neighbor_list.vty 3 files changed, 28 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/48/32248/1 diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 50e49b8..8fb7bea 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -2127,10 +2127,6 @@ vty_out(vty, "%% Warning: not enough space in SI2quater for a given UARFCN (%u, %u)%s", arfcn, scramble, VTY_NEWLINE); return CMD_WARNING; - case -EADDRINUSE: - vty_out(vty, "%% Unable to add UARFCN: (%u, %u) is already added%s", - arfcn, scramble, VTY_NEWLINE); - return CMD_WARNING; } return CMD_SUCCESS; diff --git a/src/osmo-bsc/system_information.c b/src/osmo-bsc/system_information.c index 7687c90..1c69bb8 100644 --- a/src/osmo-bsc/system_information.c +++ b/src/osmo-bsc/system_information.c @@ -302,8 +302,13 @@ *ual = bts->si_common.data.uarfcn_list, *scl = bts->si_common.data.scramble_list; - if (pos >= 0) - return -EADDRINUSE; + if (pos >= 0) { + LOGP(DRR, LOGL_NOTICE, + "EARFCN (%u, %u) is already in the list, modifying\n", + arfcn, scramble); + scl[pos] = scr; + return 0; + } if (len == MAX_EARFCN_LIST) return -ENOMEM; diff --git a/tests/si2quater_neighbor_list.vty b/tests/si2quater_neighbor_list.vty index dbb8d2a..ea353f2 100644 --- a/tests/si2quater_neighbor_list.vty +++ b/tests/si2quater_neighbor_list.vty @@ -148,11 +148,16 @@ ... !si2quater neighbor-list -OsmoBSC(config-net-bts)# ### Adding duplicate UARFCN is not allowed +OsmoBSC(config-net-bts)# ### UARFCN add command: UARFCN already exists OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 111 511 1 -% Unable to add UARFCN: (111, 511) is already added OsmoBSC(config-net-bts)# si2quater neighbor-list add uarfcn 111 511 0 -% Unable to add UARFCN: (111, 511) is already added +OsmoBSC(config-net-bts)# show running-config +... + bts 0 +... !si2quater neighbor-list + si2quater neighbor-list add uarfcn 111 511 0 + si2quater neighbor-list add uarfcn 111 211 1 +... !si2quater neighbor-list OsmoBSC(config-net-bts)# ### FIXME: UARFCN 0 cannot be added -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32248 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: 2023q1 Gerrit-Change-Id: Iadc884aa8968e2dc01adf26ba68ba9597fa05d94 Gerrit-Change-Number: 32248 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bsc[master]: si2quater: add CTRL commands for deleting neighbor [EU]ARFCNs
by fixeria 06 Apr '23

06 Apr '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32235 ) Change subject: si2quater: add CTRL commands for deleting neighbor [EU]ARFCNs ...................................................................... si2quater: add CTRL commands for deleting neighbor [EU]ARFCNs EUTRAN neighbors can be deleted using the following command: $ osmo_ctrl.py \ -d 127.0.0.1 -p 4249 \ -s "bts.0.si2quater-neighbor-list.del.earfcn" EARFCN UTRAN neighbors can be deleted using the following command: $ osmo_ctrl.py \ -d 127.0.0.1 -p 4249 \ -s "bts.0.si2quater-neighbor-list.del.uarfcn" UARFCN,SCRAMBLE This commit implements only deletion, implementing the add command would require slightly more effort (lots of manual string parsing), so it's left as a TODO for later. Change-Id: I890bffb003f2a0ee9438f6ea6e8067c092504f08 Related: SYS#6401 --- M src/osmo-bsc/bts_ctrl.c 1 file changed, 99 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/osmo-bsc/bts_ctrl.c b/src/osmo-bsc/bts_ctrl.c index 728d89f..4b4b1fb 100644 --- a/src/osmo-bsc/bts_ctrl.c +++ b/src/osmo-bsc/bts_ctrl.c @@ -34,6 +34,7 @@ #include <osmocom/bsc/chan_alloc.h> #include <osmocom/bsc/abis_nm.h> #include <osmocom/bsc/neighbor_ident.h> +#include <osmocom/bsc/system_information.h> static int location_equal(struct bts_location *a, struct bts_location *b) { @@ -623,6 +624,76 @@ CTRL_CMD_DEFINE_WO(bts_neighbor_list_mode, "neighbor-list mode"); +/* si2quater neighbor management: delete an EARFCN. + * Format: bts.<0-255>.si2quater-neighbor-list.del.earfcn EARFCN + * EARFCN is in range 0..65535 */ +static int set_bts_si2quater_neighbor_list_del_earfcn(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = (struct gsm_bts *)cmd->node; + struct osmo_earfcn_si2q *e = &bts->si_common.si2quater_neigh_list; + int earfcn; + + if (osmo_str_to_int(&earfcn, cmd->value, 10, 0, 65535) < 0) { + cmd->reply = "Failed to parse neighbor EARFCN value"; + return CTRL_CMD_ERROR; + } + + if (osmo_earfcn_del(e, earfcn) < 0) { + cmd->reply = "Failed to delete a (not existent?) neighbor EARFCN"; + return CTRL_CMD_ERROR; + } + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_WO_NOVRF(bts_si2quater_neighbor_list_del_earfcn, + "si2quater-neighbor-list del earfcn"); + +/* si2quater neighbor management: delete an UARFCN + * Format: bts.<0-255>.si2quater-neighbor-list.del.uarfcn UARFCN,SCRAMBLE + * UARFCN is in range 0..16383, SCRAMBLE is in range 0..511 */ +static int set_bts_si2quater_neighbor_list_del_uarfcn(struct ctrl_cmd *cmd, void *data) +{ + struct gsm_bts *bts = (struct gsm_bts *)cmd->node; + char *uarfcn_str, *scramble_str; + char *tmp, *saveptr; + int uarfcn, scramble; + + tmp = talloc_strdup(OTC_SELECT, cmd->value); + if (!tmp) { + cmd->reply = "OOM"; + return CTRL_CMD_ERROR; + } + + uarfcn_str = strtok_r(tmp, ",", &saveptr); + scramble_str = strtok_r(NULL, ",", &saveptr); + + if (!uarfcn_str || osmo_str_to_int(&uarfcn, uarfcn_str, 10, 0, 16383) < 0) { + cmd->reply = "Failed to parse neighbor UARFCN value"; + return CTRL_CMD_ERROR; + } + + if (!scramble_str || osmo_str_to_int(&scramble, scramble_str, 10, 0, 511) < 0) { + cmd->reply = "Failed to parse neighbor scrambling code"; + return CTRL_CMD_ERROR; + } + + if (bts_uarfcn_del(bts, uarfcn, scramble) < 0) { + cmd->reply = "Failed to delete a (not existent?) neighbor UARFCN"; + return CTRL_CMD_ERROR; + } + + cmd->reply = "OK"; + return CTRL_CMD_REPLY; +} + +CTRL_CMD_DEFINE_WO_NOVRF(bts_si2quater_neighbor_list_del_uarfcn, + "si2quater-neighbor-list del uarfcn"); + +/* TODO: si2quater neighbor management: add EARFCN */ +/* TODO: si2quater neighbor management: add UARFCN */ + int bsc_bts_ctrl_cmds_install(void) { int rc = 0; @@ -643,6 +714,8 @@ rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_add); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_del); rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_neighbor_list_mode); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_si2quater_neighbor_list_del_earfcn); + rc |= ctrl_cmd_install(CTRL_NODE_BTS, &cmd_bts_si2quater_neighbor_list_del_uarfcn); rc |= neighbor_ident_ctrl_init(); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32235 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I890bffb003f2a0ee9438f6ea6e8067c092504f08 Gerrit-Change-Number: 32235 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(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-MessageType: merged
1 0
0 0
[M] Change in libosmocore[master]: logging: add 'logging timezone (localtime|utc)'
by neels 06 Apr '23

06 Apr '23
Attention is currently required from: laforge, pespin, fixeria. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32043 ) Change subject: logging: add 'logging timezone (localtime|utc)' ...................................................................... Patch Set 2: (1 comment) File src/core/logging.c: https://gerrit.osmocom.org/c/libosmocore/+/32043/comment/88badc79_c05ecb14 PS1, Line 874: target->timezone = timezone; Maybe it's a good thing to not add this API at all? Being able to have a regression test for logging that is a central interface towards human users for *all* of our osmo programs is a good reason to go the extra mile. Then again if it just works, then we need no regression test, and no added timezone API. what do you think? If we decide to keep this, this is my response: I made my argument and seems you disagree, but apparenty you completely ignore my arguments and make me restate them: Yes, we could add additional validation during log_set_timestamp() and during cfg file reading, if there is a good reason. But we do not *need* to care whether a given timezone function is available. If the system cannot generate a timestamp the way it is configured, then we just don't print one in the logs. No need to abort the program or to fail a cfg file: the program can work safely either way. That's a single #if HAVE_LOCALTIME in one place, and that's it. It is *far* less complex code than what you propose: > I don't really understand why you are even thinking about asserting or removing timestamps during logging when you can simply have a VTY command fail to set a given timestamp format when you try to set it, as per what I proposed We don't need to be strict because the program can still run fine. That is also how the other log_set_foo() functions seem to work. Code dup: the reason why a given timezone may not be working is hidden in logging.c's log string generation code. I do not want to duplicate that to the function that sets the flag. When the logging output code changes, we will forget to also change the flag setting function accordingly. So in summary, you want me to - introduce code dup to - add non-conforming API behavior, just to - make it harder to launch an osmo program on a platform with no localtime_r() function. I say, let's have simpler code, simpler starting of the program, simpler future code maintenance. The user will notice when there are no timestamps, or will just not care. either way is fine. In our code we have lots of blocks like below, and then one of them suddenly needs its rc checked? log_set_print_foo(1); log_set_this(1); log_set_that(1); if (log_set_timestamp(xx)) { exit(1); } We can do this for a very good reason, but IMHO there just is no good reason. Finally, this patch is so unimportant compared to other things, so i don't feel like expanding this discussion needlessly, but here we are. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7f868b47bf8f8dfcf85e735f490ae69b18111af4 Gerrit-Change-Number: 32043 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 06 Apr 2023 23:19:25 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bsc[master]: SCCP N-PCSTATE: trigger MSC status on PC availability
by neels 06 Apr '23

06 Apr '23
Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32151 ) Change subject: SCCP N-PCSTATE: trigger MSC status on PC availability ...................................................................... Patch Set 3: (1 comment) File src/osmo-bsc/osmo_bsc_sigtran.c: https://gerrit.osmocom.org/c/osmo-bsc/+/32151/comment/6669a1ab_62a0a1dd PS3, Line 224: connected = false; > I find all this pretty confusing. […] I added a comment that hopefully explains why this looks this way. so yes, connected == disconnected == true can happen, and it means --> disconnected. It's going to look confusing no matter how you implement it, because it is confusing. if you show me some code that is this but looks nicer, i'll take it. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3a0869598b8395601a16d78dbc46eec400c0ea84 Gerrit-Change-Number: 32151 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 06 Apr 2023 22:31:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • ...
  • 226
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.