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

September 2024

  • 1 participants
  • 1983 discussions
[XS] Change in pysim[master]: pySim.app: Properly reset card state after reading EID
by laforge 07 Sep '24

07 Sep '24
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/38053?usp=email ) Change subject: pySim.app: Properly reset card state after reading EID ...................................................................... pySim.app: Properly reset card state after reading EID The code had two problems: * the RESET was only performed in the successful case, but not if some exceptio was raised * the RESET was a low-level reset bypassing the RuntimeState, so the lchan.selected_file was stale afterwards Fixes: Change-Id Idc2ea1d9263f39b3dff403e1535a5e6c4e88b26f Change-Id: Ib23d3d5b58b456a25157a622c1010c81cd8b2213 --- M pySim/app.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/53/38053/1 diff --git a/pySim/app.py b/pySim/app.py index 5525cd1..5a93f98 100644 --- a/pySim/app.py +++ b/pySim/app.py @@ -116,6 +116,7 @@ except SwMatchError: # has ISD-R but not a SGP.22/SGP.32 eUICC - maybe SGP.02? pass - card.reset() + finally: + rs.reset() return rs, card -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38053?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib23d3d5b58b456a25157a622c1010c81cd8b2213 Gerrit-Change-Number: 38053 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in pysim[master]: pySim-shell: Detect different eUICC types and print during start-up
by laforge 07 Sep '24

07 Sep '24
Attention is currently required from: laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/38049?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: pySim-shell: Detect different eUICC types and print during start-up ...................................................................... pySim-shell: Detect different eUICC types and print during start-up Change-Id: I54ea4ce663693f3951040dcc8a16bf532bf99c02 --- M pySim/cdma_ruim.py M pySim/euicc.py M pySim/ts_102_221.py M pySim/ts_51_011.py 4 files changed, 70 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/38049/3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/38049?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I54ea4ce663693f3951040dcc8a16bf532bf99c02 Gerrit-Change-Number: 38049 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in osmo-bsc[master]: Initial support for >256 BTS
by fixeria 07 Sep '24

07 Sep '24
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38052?usp=email ) Change subject: Initial support for >256 BTS ...................................................................... Patch Set 1: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-bsc/+/38052/comment/1a0c15ef_c51c8bef?usp… : PS1, Line 14: The ipaccess OML bts_nr is still kept as uint8_t so nothing changes over : the wire. That's because in ipaccess OML, in general each BTS is : bt Is my understanding correct that >256 BTS will only work with ip.access {nano,osmo}BTS, but not with other kinds? In that case it probably makes sense to warn the user when they define more than 256 BTS? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38052?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I607a68efeb5f4a50cce107d11d3c5126b7d8f81a Gerrit-Change-Number: 38052 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 07 Sep 2024 09:53:37 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[M] Change in osmo-bsc[master]: Convert bts->depends_on from bitmask to llist
by fixeria 07 Sep '24

07 Sep '24
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38050?usp=email ) Change subject: Convert bts->depends_on from bitmask to llist ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File src/osmo-bsc/bts.c: https://gerrit.osmocom.org/c/osmo-bsc/+/38050/comment/722246c6_263c5ed0?usp… : PS1, Line 881: struct gsm_bts *bts const? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38050?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I59e37d6baa020aeafdffc2c3538e988effd37620 Gerrit-Change-Number: 38050 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 07 Sep 2024 09:44:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-bsc[master]: Initial support for >256 BTS
by pespin 06 Sep '24

06 Sep '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38052?usp=email ) Change subject: Initial support for >256 BTS ...................................................................... Initial support for >256 BTS Some users actually want to deploy osmo-bsc connected to more than 256 BTSs. Allow them to do so. This is about increasing the integer size / maximum value of the internal "bts->nr" ID usef eg. during VTY configuration. The ipaccess OML bts_nr is still kept as uint8_t so nothing changes over the wire. That's because in ipaccess OML, in general each BTS is bts_nr=0 (bts->bts_nr) under its own ipa connection. NOTE: This patch doesn't add support to handle >256 BTS over PCUIF, which still keeps its (struct gsm_pcu_if)->bts_nr as uint8_t. This is not much of a problem yet though, since the requirement to run >256BTS is needed in a network where osmo-bts is used, and hence PCUIF is handled at each BTS. Related: SYS#7062 Change-Id: I607a68efeb5f4a50cce107d11d3c5126b7d8f81a --- M doc/manuals/chapters/handover.adoc M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bts_ctrl.c M src/osmo-bsc/bts_trx_ctrl.c M src/osmo-bsc/bts_trx_ts_ctrl.c M src/osmo-bsc/bts_trx_ts_lchan_ctrl.c M tests/neighbor_ident.vty M tests/osmo-bsc.vty 8 files changed, 26 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/38052/1 diff --git a/doc/manuals/chapters/handover.adoc b/doc/manuals/chapters/handover.adoc index 4affe3b..cd3f728 100644 --- a/doc/manuals/chapters/handover.adoc +++ b/doc/manuals/chapters/handover.adoc @@ -244,7 +244,7 @@ configuration formatting. If the cell identification (LAC+CI) matches a local cell but a mismatching ARFCN+BSIC follows on the same config line, OsmoBSC will report errors. For human readability and maintainability, it may instead be -desirable to use the `neighbor bts <0-255>` format, or omit the redundant +desirable to use the `neighbor bts <0-65535>` format, or omit the redundant `arfcn` and `bsic`. .Example: configuring neighbors within the local BSS in osmo-bsc.cfg, redundantly identified by LAC+CI as well as ARFCN+BSIC @@ -325,8 +325,8 @@ the neighbor configuration will merely be cached in the BSC's local config. To take actual effect, it is necessary to -- either, re-connect the cell to the BSC (e.g. via `drop bts connection <0-255> oml`) -- or, re-send the System Information using `bts <0-255> resend-system-information`. +- either, re-connect the cell to the BSC (e.g. via `drop bts connection <0-65535> oml`) +- or, re-send the System Information using `bts <0-65535> resend-system-information`. === Configuring Handover Decisions diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index d67ebc1..7e47f49 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -97,10 +97,10 @@ #define DLCI2RSL_LINK_ID(dlci) \ ((dlci & 0xc0) == 0xc0 ? 0x40 : 0x00) | (dlci & 0x07) -typedef uint8_t gsm_bts_nr_t; /* See (struct gsm_bts *)->nr */ +typedef uint16_t gsm_bts_nr_t; /* See (struct gsm_bts *)->nr */ /* BTS_NR_MAX = ((2 << ((sizeof(gsm_bts_nr_t) * 8) - 1)) - 1) * This is needed as a constant so that the value can be stringified properly: */ -#define BTS_NR_MAX 255 +#define BTS_NR_MAX 65535 #define BTS_NR_MAX_STR OSMO_STRINGIFY_VAL(BTS_NR_MAX) #define BTS_NR_VTY_ARG_VAL "<0-" BTS_NR_MAX_STR ">" diff --git a/src/osmo-bsc/bts_ctrl.c b/src/osmo-bsc/bts_ctrl.c index 814a17d..f10ba29 100644 --- a/src/osmo-bsc/bts_ctrl.c +++ b/src/osmo-bsc/bts_ctrl.c @@ -711,7 +711,7 @@ 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 + * Format: bts.<0-65535>.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) { @@ -736,7 +736,7 @@ "si2quater-neighbor-list del earfcn"); /* si2quater neighbor management: delete an UARFCN - * Format: bts.<0-255>.si2quater-neighbor-list.del.uarfcn UARFCN,SCRAMBLE + * Format: bts.<0-65535>.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) { @@ -827,7 +827,7 @@ } /* si2quater neighbor management: add an EARFCN - * Format: bts.<0-255>.si2quater-neighbor-list.add.earfcn <EARFCN>,<thresh-hi>,<thresh-lo>,<priority>,<QRXLEVMIN>,<measurement bandwidth> + * Format: bts.<0-65535>.si2quater-neighbor-list.add.earfcn <EARFCN>,<thresh-hi>,<thresh-lo>,<priority>,<QRXLEVMIN>,<measurement bandwidth> * EARFCN is in range 0..65535, thresh-hi is in range 0..31, thresh-hi is in range 0..32, * priority is in range 0..8, QRXLEVMIN is in range 0..32, measurement bandwidth is in range 0..8 */ static int set_bts_si2quater_neighbor_list_add_earfcn(struct ctrl_cmd *cmd, void *data) @@ -952,7 +952,7 @@ } /* si2quater neighbor management: add an UARFCN - * Format: bts.<0-255>.si2quater-neighbor-list.add.uarfcn <UARFCN>,<scrambling code>,<diversity bit> + * Format: bts.<0-65535>.si2quater-neighbor-list.add.uarfcn <UARFCN>,<scrambling code>,<diversity bit> * UARFCN is in range 0..16383, scrambling code is in range 0..511 */ static int set_bts_si2quater_neighbor_list_add_uarfcn(struct ctrl_cmd *cmd, void *data) { @@ -1507,7 +1507,7 @@ } /* Return full information about all logical channels in a BTS. - * format: bts.<0-255>.show-lchan.full + * format: bts.<0-65535>.show-lchan.full * result format: New line delimited list of <bts>,<trx>,<ts>,<lchan>,<type>,<connection>,<state>,<last error>,<bs power>, * <ms power>,<interference dbm>, <interference band>,<channel mode>,<imsi>,<tmsi>,<ipa bound ip>,<ipa bound port>, * <ipa bound conn id>,<ipa conn ip>,<ipa conn port>,<ipa conn speech mode> diff --git a/src/osmo-bsc/bts_trx_ctrl.c b/src/osmo-bsc/bts_trx_ctrl.c index 1e30e85..03a26c4 100644 --- a/src/osmo-bsc/bts_trx_ctrl.c +++ b/src/osmo-bsc/bts_trx_ctrl.c @@ -123,7 +123,7 @@ } /* Return full information about all logical channels in a TRX. - * format: bts.<0-255>.trx.<0-255>.show-lchan.full + * format: bts.<0-65535>.trx.<0-255>.show-lchan.full * result format: New line delimited list of <bts>,<trx>,<ts>,<lchan>,<type>,<connection>,<state>,<last error>,<bs power>, * <ms power>,<interference dbm>, <interference band>,<channel mode>,<imsi>,<tmsi>,<ipa bound ip>,<ipa bound port>, * <ipa bound conn id>,<ipa conn ip>,<ipa conn port>,<ipa conn speech mode> diff --git a/src/osmo-bsc/bts_trx_ts_ctrl.c b/src/osmo-bsc/bts_trx_ts_ctrl.c index a1a17f0..96a38e9 100644 --- a/src/osmo-bsc/bts_trx_ts_ctrl.c +++ b/src/osmo-bsc/bts_trx_ts_ctrl.c @@ -118,7 +118,7 @@ } /* Return full information about all logical channels in a timeslot. - * format: bts.<0-255>.trx.<0-255>.ts.<0-8>.show-lchan.full + * format: bts.<0-65535>.trx.<0-255>.ts.<0-8>.show-lchan.full * result format: New line delimited list of <bts>,<trx>,<ts>,<lchan>,<type>,<connection>,<state>,<last error>,<bs power>, * <ms power>,<interference dbm>, <interference band>,<channel mode>,<imsi>,<tmsi>,<ipa bound ip>,<ipa bound port>, * <ipa bound conn id>,<ipa conn ip>,<ipa conn port>,<ipa conn speech mode> diff --git a/src/osmo-bsc/bts_trx_ts_lchan_ctrl.c b/src/osmo-bsc/bts_trx_ts_lchan_ctrl.c index be5e755..541e723 100644 --- a/src/osmo-bsc/bts_trx_ts_lchan_ctrl.c +++ b/src/osmo-bsc/bts_trx_ts_lchan_ctrl.c @@ -37,7 +37,7 @@ } /* power control management: Get lchan's ms power in dBm - * format: bts.<0-255>.trx.<0-255>.ts.<0-8>.lchan.<0-8>.ms-power */ + * format: bts.<0-65535>.trx.<0-255>.ts.<0-8>.lchan.<0-8>.ms-power */ static int get_lchan_ms_power(struct ctrl_cmd *cmd, void *data) { struct gsm_lchan *lchan = cmd->node; @@ -54,7 +54,7 @@ /* power control management: Set lchan's ms power in dBm. * For static ms power control it will change the ms tx power. * For dynamic ms power control it will limit the maximum power level. - * format: bts.<0-255>.trx.<0-255>.ts.<0-8>.lchan.<0-8>.ms-power <ms power> + * format: bts.<0-65535>.trx.<0-255>.ts.<0-8>.lchan.<0-8>.ms-power <ms power> * ms power is in range 0..40 */ static int set_lchan_ms_power(struct ctrl_cmd *cmd, void *data) { @@ -122,7 +122,7 @@ } /* Return full information about a logical channel. - * format: bts.<0-255>.trx.<0-255>.ts.<0-8>.lchan.<0-8>.show.full + * format: bts.<0-65535>.trx.<0-255>.ts.<0-8>.lchan.<0-8>.show.full * result format: <bts>,<trx>,<ts>,<lchan>,<type>,<connection>,<state>,<last error>,<bs power>,<ms power>,<interference dbm>, * <interference band>,<channel mode>,<imsi>,<tmsi>,<ipa bound ip>,<ipa bound port>,<ipa bound conn id>,<ipa conn ip>, * <ipa conn port>,<ipa conn speech mode> diff --git a/tests/neighbor_ident.vty b/tests/neighbor_ident.vty index 211159c..5939556 100644 --- a/tests/neighbor_ident.vty +++ b/tests/neighbor_ident.vty @@ -2,13 +2,13 @@ OsmoBSC> list ... - show bts <0-255> neighbor arfcn <0-1023> bsic (<0-63>|any) + show bts <0-65535> neighbor arfcn <0-1023> bsic (<0-63>|any) ... OsmoBSC> enable OsmoBSC# list ... - show bts <0-255> neighbor arfcn <0-1023> bsic (<0-63>|any) + show bts <0-65535> neighbor arfcn <0-1023> bsic (<0-63>|any) ... OsmoBSC# configure terminal @@ -84,7 +84,7 @@ OsmoBSC(config-net)# bts 0 OsmoBSC(config-net-bts)# list ... - neighbor bts <0-255> + neighbor bts <0-65535> neighbor lac <0-65535> neighbor lac-ci <0-65535> <0-65535> neighbor cgi <0-999> <0-999> <0-65535> <0-65535> @@ -93,7 +93,7 @@ neighbor lac-ci <0-65535> <0-65535> arfcn <0-1023> bsic (<0-63>|any) neighbor cgi <0-999> <0-999> <0-65535> <0-65535> arfcn <0-1023> bsic (<0-63>|any) neighbor cgi-ps <0-999> <0-999> <0-65535> <0-255> <0-65535> arfcn <0-1023> bsic (<0-63>|any) - no neighbor bts <0-255> + no neighbor bts <0-65535> no neighbor lac <0-65535> no neighbor lac-ci <0-65535> <0-65535> no neighbor cgi <0-999> <0-999> <0-65535> <0-65535> @@ -113,7 +113,7 @@ cgi-ps Add Neighbor cell by cgi (Packet Switched, with RAC) OsmoBSC(config-net-bts)# neighbor bts ? - <0-255> BTS number + <0-65535> BTS number OsmoBSC(config-net-bts)# neighbor bts 0 ? <cr> @@ -185,7 +185,7 @@ arfcn ARFCN of neighbor cell OsmoBSC(config-net-bts)# no neighbor bts ? - <0-255> BTS number + <0-65535> BTS number OsmoBSC(config-net-bts)# no neighbor bts 0 ? <cr> diff --git a/tests/osmo-bsc.vty b/tests/osmo-bsc.vty index 690b9f3..86029bf 100644 --- a/tests/osmo-bsc.vty +++ b/tests/osmo-bsc.vty @@ -2,7 +2,7 @@ OsmoBSC# list ... - bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> modify (vamos|non-vamos) [tsc] [<1-4>] [<0-7>] + bts <0-65535> trx <0-255> timeslot <0-7> sub-slot <0-7> modify (vamos|non-vamos) [tsc] [<1-4>] [<0-7>] ... OsmoBSC# bts 0 trx 0 timeslot 0 sub-slot 0 ? @@ -35,15 +35,15 @@ OsmoBSC# list ... - bts <0-255> trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> (activate|activate-vamos) (hr|fr|efr|amr|sig) [<0-7>] - bts <0-255> trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> deactivate + bts <0-65535> trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> (activate|activate-vamos) (hr|fr|efr|amr|sig) [<0-7>] + bts <0-65535> trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> deactivate ... OsmoBSC# bts? bts BTS Specific Commands OsmoBSC# bts ? - <0-255> BTS Number + <0-65535> BTS Number OsmoBSC# bts 0 ? unblock-setup-ramping Unblock and allow to configure a BTS if kept back by BTS ramping @@ -100,7 +100,7 @@ OsmoBSC# list ... - bts <0-255> trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> reassign-to trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> [tsc] [<1-4>] [<0-7>] + bts <0-65535> trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> reassign-to trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> [tsc] [<1-4>] [<0-7>] ... OsmoBSC# bts 0 trx 0 timeslot 0 sub-slot 0 reassign-to ? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38052?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I607a68efeb5f4a50cce107d11d3c5126b7d8f81a Gerrit-Change-Number: 38052 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-bsc[master]: Convert bts->depends_on from bitmask to llist
by pespin 06 Sep '24

06 Sep '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38050?usp=email ) Change subject: Convert bts->depends_on from bitmask to llist ...................................................................... Convert bts->depends_on from bitmask to llist The amount of dependencies on each BTS is usually zero or a small number, hence the computation cost is mostly similar regardless of using a llist or a bitmask buffer. Right now, even if the dependency chains are (almost) empty, the iprevious code allocated (N * 256/8) bytes, where N is the amount of bts configured. Since we are now planning to increase the amount of bts (N) from uint8_t to uint16_t, that means with this change we will then avoid: * Increasing memory use to O(N * 65536/8). * Having to adapt code operating on bitmask (size) Related: SYS#7062 Change-Id: I59e37d6baa020aeafdffc2c3538e988effd37620 --- M include/osmocom/bsc/bts.h M src/osmo-bsc/bts.c M src/osmo-bsc/bts_vty.c 3 files changed, 45 insertions(+), 45 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/38050/1 diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index e9634ee..112c17c 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -326,6 +326,12 @@ struct gprs_rlc_cfg rlc_cfg; }; +/* See (struct gsm_bts *)->depends_on */ +struct bts_depends_on_entry { + struct llist_head list; + uint8_t bts_nr; /* See (struct gsm_bts *)->nr */ +}; + /* One BTS */ struct gsm_bts { /* list header in net->bts_list */ @@ -596,8 +602,8 @@ /* supported codecs beside FR */ struct bts_codec_conf codec; - /* BTS dependencies bit field */ - uint32_t depends_on[256/(8*4)]; + /* BTS dependencies bit field, list of "struct bts_depends_on_entry" */ + struct llist_head depends_on; /* full and half rate multirate config */ struct amr_multirate_conf mr_full; @@ -832,8 +838,8 @@ /* dependency handling */ void bts_depend_mark(struct gsm_bts *bts, int dep); void bts_depend_clear(struct gsm_bts *bts, int dep); -int bts_depend_check(struct gsm_bts *bts); -int bts_depend_is_depedency(struct gsm_bts *base, struct gsm_bts *other); +bool bts_depend_check(struct gsm_bts *bts); +bool bts_depend_is_depedency(struct gsm_bts *base, struct gsm_bts *other); int gsm_bts_get_radio_link_timeout(const struct gsm_bts *bts); void gsm_bts_set_radio_link_timeout(struct gsm_bts *bts, int value); diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 8cc9e9a..29b6ffe 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -343,6 +343,7 @@ INIT_LLIST_HEAD(&bts->neighbors); INIT_LLIST_HEAD(&bts->oml_fail_rep); INIT_LLIST_HEAD(&bts->chan_rqd_queue); + INIT_LLIST_HEAD(&bts->depends_on); /* Don't pin the BTS to any MGW by default: */ bts->mgw_pool_target = -1; @@ -869,37 +870,38 @@ } } -/* Assume there are only 256 possible bts */ -osmo_static_assert(sizeof(((struct gsm_bts *) 0)->nr) == 1, _bts_nr_is_256); -static void depends_calc_index_bit(int bts_nr, int *idx, int *bit) -{ - *idx = bts_nr / (8 * 4); - *bit = bts_nr % (8 * 4); -} - void bts_depend_mark(struct gsm_bts *bts, int dep) { - int idx, bit; - depends_calc_index_bit(dep, &idx, &bit); + struct bts_depends_on_entry *entry; + entry = talloc_zero(bts, struct bts_depends_on_entry); + entry->bts_nr = dep; + llist_add_tail(&entry->list, &bts->depends_on); +} - bts->depends_on[idx] |= 1U << bit; +static struct bts_depends_on_entry *bts_depend_find_entry(struct gsm_bts *bts, int dep) +{ + struct bts_depends_on_entry *entry; + llist_for_each_entry(entry, &bts->trx_list, list) { + if (entry->bts_nr == dep) + return entry; + } + return NULL; } void bts_depend_clear(struct gsm_bts *bts, int dep) { - int idx, bit; - depends_calc_index_bit(dep, &idx, &bit); - - bts->depends_on[idx] &= ~(1U << bit); + struct bts_depends_on_entry *entry; + entry = bts_depend_find_entry(bts, dep); + if (!entry) + return; + llist_del(&entry->list); + talloc_free(entry); } -int bts_depend_is_depedency(struct gsm_bts *base, struct gsm_bts *other) +bool bts_depend_is_depedency(struct gsm_bts *base, struct gsm_bts *other) { - int idx, bit; - depends_calc_index_bit(other->nr, &idx, &bit); - - /* Check if there is a depends bit */ - return (base->depends_on[idx] & (1U << bit)) > 0; + struct bts_depends_on_entry *entry = bts_depend_find_entry(base, other->nr); + return !!entry; } static bool bts_is_online(const struct gsm_bts *bts) @@ -914,7 +916,7 @@ return bts->mo.nm_state.operational == NM_OPSTATE_ENABLED; } -int bts_depend_check(struct gsm_bts *bts) +bool bts_depend_check(struct gsm_bts *bts) { struct gsm_bts *other_bts; @@ -923,9 +925,9 @@ continue; if (bts_is_online(other_bts)) continue; - return 0; + return false; } - return 1; + return true; } /* get the radio link timeout (based on SACCH decode errors, according diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 24224f6..4b94781 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -4490,6 +4490,14 @@ vty_out(vty, "%s", VTY_NEWLINE); } +static void config_write_bts_depends_on(struct vty *vty, const char *prefix, const struct gsm_bts *bts) +{ + struct bts_depends_on_entry *entry; + llist_for_each_entry(entry, &bts->depends_on, list) { + vty_out(vty, "%sdepends-on-bts %u%s", prefix, entry->bts_nr, VTY_NEWLINE); + } +} + static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts) { int i; @@ -4775,23 +4783,7 @@ vty_out(vty, " %sforce-combined-si%s", bts->force_combined_si ? "" : "no ", VTY_NEWLINE); - for (i = 0; i < ARRAY_SIZE(bts->depends_on); ++i) { - int j; - - if (bts->depends_on[i] == 0) - continue; - - for (j = 0; j < sizeof(bts->depends_on[i]) * 8; ++j) { - int bts_nr; - - if ((bts->depends_on[i] & (1<<j)) == 0) - continue; - - bts_nr = (i * sizeof(bts->depends_on[i]) * 8) + j; - vty_out(vty, " depends-on-bts %d%s", bts_nr, VTY_NEWLINE); - } - } - + config_write_bts_depends_on(vty, " ", bts); ho_vty_write_bts(vty, bts); if (bts->top_acch_cap.overpower_db > 0) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38050?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I59e37d6baa020aeafdffc2c3538e988effd37620 Gerrit-Change-Number: 38050 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-bsc[master]: Introduce typedef for bts->nr gsm_bts_nr_t
by pespin 06 Sep '24

06 Sep '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/38051?usp=email ) Change subject: Introduce typedef for bts->nr gsm_bts_nr_t ...................................................................... Introduce typedef for bts->nr gsm_bts_nr_t The size of bts->nr is implicitly or explicitly used or taken into account in several places in the code. Add a new type to make it easier to define its size and range in one place. This also helps in identifying fields contains an BSC-implementation "bts_nr" vs theip.access Abis OML "bts_nr" sent over the wire, which is always a uint8_t according to spec. Related: SYS#7062 Change-Id: Ic0db2873fa9795024aba4399da495a0d8f7504b0 --- M include/osmocom/bsc/bts.h M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/abis_nm_vty.c M src/osmo-bsc/abis_om2000_vty.c M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/bts.c M src/osmo-bsc/bts_vty.c M src/osmo-bsc/gsm_data.c M src/osmo-bsc/neighbor_ident_vty.c M src/osmo-bsc/smscb_vty.c M tests/handover/handover_test.c 11 files changed, 66 insertions(+), 56 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/51/38051/1 diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h index 112c17c..c0d2b52 100644 --- a/include/osmocom/bsc/bts.h +++ b/include/osmocom/bsc/bts.h @@ -329,7 +329,7 @@ /* See (struct gsm_bts *)->depends_on */ struct bts_depends_on_entry { struct llist_head list; - uint8_t bts_nr; /* See (struct gsm_bts *)->nr */ + gsm_bts_nr_t bts_nr; /* See (struct gsm_bts *)->nr */ }; /* One BTS */ @@ -341,7 +341,7 @@ struct llist_head loc_list; /* number of this BTS in network */ - uint8_t nr; + gsm_bts_nr_t nr; /* human readable name / description */ char *description; /* Cell Identity */ @@ -836,8 +836,8 @@ } /* dependency handling */ -void bts_depend_mark(struct gsm_bts *bts, int dep); -void bts_depend_clear(struct gsm_bts *bts, int dep); +void bts_depend_mark(struct gsm_bts *bts, gsm_bts_nr_t dep); +void bts_depend_clear(struct gsm_bts *bts, gsm_bts_nr_t dep); bool bts_depend_check(struct gsm_bts *bts); bool bts_depend_is_depedency(struct gsm_bts *base, struct gsm_bts *other); diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 6bffcc4..d67ebc1 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -21,6 +21,7 @@ #include <osmocom/core/time_cc.h> #include <osmocom/core/linuxlist.h> #include <osmocom/core/linuxrbtree.h> +#include <osmocom/core/utils.h> #include <osmocom/crypt/auth.h> @@ -96,6 +97,13 @@ #define DLCI2RSL_LINK_ID(dlci) \ ((dlci & 0xc0) == 0xc0 ? 0x40 : 0x00) | (dlci & 0x07) +typedef uint8_t gsm_bts_nr_t; /* See (struct gsm_bts *)->nr */ +/* BTS_NR_MAX = ((2 << ((sizeof(gsm_bts_nr_t) * 8) - 1)) - 1) + * This is needed as a constant so that the value can be stringified properly: */ +#define BTS_NR_MAX 255 +#define BTS_NR_MAX_STR OSMO_STRINGIFY_VAL(BTS_NR_MAX) +#define BTS_NR_VTY_ARG_VAL "<0-" BTS_NR_MAX_STR ">" + /* 3-bit long values */ #define EARFCN_PRIO_INVALID 8 #define EARFCN_MEAS_BW_INVALID 8 @@ -881,7 +889,7 @@ struct gsm_network *gsm_network_init(void *ctx); -struct gsm_bts *gsm_bts_num(const struct gsm_network *net, int num); +struct gsm_bts *gsm_bts_num(const struct gsm_network *net, gsm_bts_nr_t num); struct gsm_bts *gsm_bts_by_cell_id(const struct gsm_network *net, const struct gsm0808_cell_id *cell_id, int match_idx); @@ -975,7 +983,7 @@ struct rate_ctr_group *bsc_ctrs; struct osmo_stat_item_group *bsc_statg; - unsigned int num_bts; + gsm_bts_nr_t num_bts; struct llist_head bts_list; struct llist_head bts_rejected; diff --git a/src/osmo-bsc/abis_nm_vty.c b/src/osmo-bsc/abis_nm_vty.c index bbd2d15..d7ddcb9 100644 --- a/src/osmo-bsc/abis_nm_vty.c +++ b/src/osmo-bsc/abis_nm_vty.c @@ -76,7 +76,7 @@ DEFUN(oml_class_inst, oml_class_inst_cmd, - "bts <0-255> oml class " NM_OBJCLASS_VTY + "bts " BTS_NR_VTY_ARG_VAL " oml class " NM_OBJCLASS_VTY " instance <0-255> <0-255> <0-255>", "BTS related commands\n" "BTS Number\n" "Manipulate the OML managed objects\n" @@ -111,7 +111,7 @@ } DEFUN(oml_classnum_inst, oml_classnum_inst_cmd, - "bts <0-255> oml class <0-255> instance <0-255> <0-255> <0-255>", + "bts " BTS_NR_VTY_ARG_VAL " oml class <0-255> instance <0-255> <0-255> <0-255>", "BTS related commands\n" "BTS Number\n" "Manipulate the OML managed objects\n" "Object Class\n" "Object Class\n" diff --git a/src/osmo-bsc/abis_om2000_vty.c b/src/osmo-bsc/abis_om2000_vty.c index 7604807..efec05e 100644 --- a/src/osmo-bsc/abis_om2000_vty.c +++ b/src/osmo-bsc/abis_om2000_vty.c @@ -79,7 +79,7 @@ #define OM2K_VTY_HELP "Configure OM2K specific parameters\n" DEFUN(om2k_class_inst, om2k_class_inst_cmd, - "bts <0-255> om2000 class " OM2K_OBJCLASS_VTY + "bts " BTS_NR_VTY_ARG_VAL " om2000 class " OM2K_OBJCLASS_VTY " <0-255> <0-255> <0-255>", "BTS related commands\n" "BTS Number\n" "Manipulate the OM2000 managed objects\n" @@ -120,7 +120,7 @@ } DEFUN(om2k_classnum_inst, om2k_classnum_inst_cmd, - "bts <0-255> om2000 class <0-255> <0-255> <0-255> <0-255>", + "bts " BTS_NR_VTY_ARG_VAL " om2000 class <0-255> <0-255> <0-255> <0-255>", "BTS related commands\n" "BTS Number\n" "Manipulate the OML managed objects\n" "Object Class\n" "Object Class\n" @@ -748,7 +748,7 @@ } DEFUN(show_om2k_mo, show_om2k_mo_cmd, - "show bts <0-255> om2k-mo", + "show bts " BTS_NR_VTY_ARG_VAL " om2k-mo", SHOW_STR "Display information about a BTS\n" "BTS number\n" "OM2000 Managed Object information\n") { diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 8690a47..f04c7ec 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -232,7 +232,7 @@ return CMD_SUCCESS; } -DEFUN(show_bts, show_bts_cmd, "show bts [<0-255>]", +DEFUN(show_bts, show_bts_cmd, "show bts [" BTS_NR_VTY_ARG_VAL "]", SHOW_STR "Display information about a BTS\n" "BTS number\n") { @@ -273,7 +273,7 @@ return CMD_SUCCESS; } -DEFUN(show_bts_fail_rep, show_bts_fail_rep_cmd, "show bts <0-255> fail-rep [reset]", +DEFUN(show_bts_fail_rep, show_bts_fail_rep_cmd, "show bts " BTS_NR_VTY_ARG_VAL " fail-rep [reset]", SHOW_STR "Display information about a BTS\n" "BTS number\n" "OML failure reports\n" "Clear the list of failure reports after showing them\n") @@ -457,7 +457,7 @@ DEFUN(show_trx, show_trx_cmd, - "show trx [<0-255>] [<0-255>]", + "show trx [" BTS_NR_VTY_ARG_VAL "] [<0-255>]", SHOW_STR "Display information about a TRX\n" BTS_TRX_STR) { @@ -500,7 +500,7 @@ DEFUN(show_ts, show_ts_cmd, - "show timeslot [<0-255>] [<0-255>] [<0-7>]", + "show timeslot [" BTS_NR_VTY_ARG_VAL "] [<0-255>] [<0-7>]", SHOW_STR "Display information about a TS\n" BTS_TRX_TS_STR) { @@ -727,7 +727,7 @@ DEFUN(show_lchan, show_lchan_cmd, - "show lchan [<0-255>] [<0-255>] [<0-7>] [<0-7>]", + "show lchan [" BTS_NR_VTY_ARG_VAL "] [<0-255>] [<0-7>] [<0-7>]", SHOW_STR "Display information about a logical channel\n" BTS_TRX_TS_LCHAN_STR) { @@ -736,7 +736,7 @@ DEFUN(show_lchan_summary, show_lchan_summary_cmd, - "show lchan summary [<0-255>] [<0-255>] [<0-7>] [<0-7>]", + "show lchan summary [" BTS_NR_VTY_ARG_VAL "] [<0-255>] [<0-7>] [<0-7>]", SHOW_STR "Display information about a logical channel\n" "Short summary (used lchans)\n" BTS_TRX_TS_LCHAN_STR) @@ -746,7 +746,7 @@ DEFUN(show_lchan_summary_all, show_lchan_summary_all_cmd, - "show lchan summary-all [<0-255>] [<0-255>] [<0-7>] [<0-7>]", + "show lchan summary-all [" BTS_NR_VTY_ARG_VAL "] [<0-255>] [<0-7>] [<0-7>]", SHOW_STR "Display information about a logical channel\n" "Short summary (all lchans)\n" BTS_TRX_TS_LCHAN_STR) @@ -912,7 +912,7 @@ DEFUN(handover_subscr_conn, handover_subscr_conn_cmd, - "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> handover <0-255>", + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> timeslot <0-7> sub-slot <0-7> handover " BTS_NR_VTY_ARG_VAL, BTS_NR_TRX_TS_SS_STR2 MANUAL_HANDOVER_STR "New " BTS_NR_STR) @@ -922,7 +922,7 @@ DEFUN(assignment_subscr_conn, assignment_subscr_conn_cmd, - "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> assignment", + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> timeslot <0-7> sub-slot <0-7> assignment", BTS_NR_TRX_TS_SS_STR2 MANUAL_ASSIGNMENT_STR) { @@ -1089,7 +1089,7 @@ DEFUN(show_paging, show_paging_cmd, - "show paging [<0-255>]", + "show paging [" BTS_NR_VTY_ARG_VAL "]", SHOW_STR "Display information about paging requests of a BTS\n" BTS_NR_STR) { @@ -1120,7 +1120,7 @@ DEFUN(show_paging_group, show_paging_group_cmd, - "show paging-group <0-255> IMSI", + "show paging-group " BTS_NR_VTY_ARG_VAL " IMSI", SHOW_STR "Display the paging group\n" BTS_NR_STR "IMSI\n") { @@ -1313,7 +1313,7 @@ } DEFUN(restart_bts, restart_bts_cmd, - "restart-bts <0-65535>", + "restart-bts " BTS_NR_VTY_ARG_VAL, "Restart ip.access nanoBTS through OML\n" BTS_NR_STR) { @@ -1352,7 +1352,7 @@ DEFUN(bts_resend_sysinfo, bts_resend_sysinfo_cmd, - "bts <0-255> resend-system-information", + "bts " BTS_NR_VTY_ARG_VAL " resend-system-information", "BTS Specific Commands\n" BTS_NR_STR "Re-generate + re-send BCCH SYSTEM INFORMATION\n") { @@ -1386,7 +1386,7 @@ DEFUN(bts_resend_power_ctrl_params, bts_resend_power_ctrl_params_cmd, - "bts <0-255> resend-power-control-defaults", + "bts " BTS_NR_VTY_ARG_VAL " resend-power-control-defaults", "BTS Specific Commands\n" BTS_NR_STR "Re-generate + re-send default MS/BS Power control parameters\n") { @@ -1425,7 +1425,7 @@ DEFUN(bts_c0_power_red, bts_c0_power_red_cmd, - "bts <0-255> c0-power-reduction <0-6>", + "bts " BTS_NR_VTY_ARG_VAL " c0-power-reduction <0-6>", "BTS Specific Commands\n" BTS_NR_STR "BCCH carrier power reduction operation\n" "Power reduction value (in dB, even numbers only)\n") @@ -1469,7 +1469,7 @@ /* this command is now hidden, as it's a low-level debug hack, and people should * instead use osmo-cbc these days */ DEFUN_HIDDEN(smscb_cmd, smscb_cmd_cmd, - "bts <0-255> smscb-command (normal|schedule|default) <1-4> HEXSTRING", + "bts " BTS_NR_VTY_ARG_VAL " smscb-command (normal|schedule|default) <1-4> HEXSTRING", "BTS related commands\n" BTS_NR_STR "SMS Cell Broadcast\n" "Normal (one-shot) SMSCB Message; sent once over Abis+Um\n" @@ -1539,7 +1539,7 @@ } DEFUN(pdch_act, pdch_act_cmd, - "bts <0-255> trx <0-255> timeslot <0-7> pdch (activate|deactivate)", + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> timeslot <0-7> pdch (activate|deactivate)", BTS_NR_TRX_TS_STR2 "Packet Data Channel\n" "Activate Dynamic PDCH/TCH (-> PDCH mode)\n" @@ -1796,7 +1796,7 @@ * manually in a given mode/codec. This is useful for receiver * performance testing (FER/RBER/...) */ DEFUN(lchan_act, lchan_act_cmd, - "bts <0-255> trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> (activate|activate-vamos) (hr|fr|efr|amr|sig) [<0-7>]", + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> (activate|activate-vamos) (hr|fr|efr|amr|sig) [<0-7>]", BTS_NR_TRX_TS_STR2 "Primary sub-slot\n" "VAMOS secondary shadow subslot, range <0-1>, only valid for TCH type timeslots\n" SS_NR_STR @@ -1808,7 +1808,7 @@ } DEFUN(lchan_deact, lchan_deact_cmd, - "bts <0-255> trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> deactivate", + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> deactivate", BTS_NR_TRX_TS_STR2 "Primary sub-slot\n" "VAMOS secondary shadow subslot, range <0-1>, only valid for TCH type timeslots\n" SS_NR_STR @@ -1855,7 +1855,7 @@ /* Similar to lchan_act, but activates all lchans on the specified BTS at once, * this is intended to perform lab tests / measurements. */ DEFUN_HIDDEN(lchan_act_all_bts, lchan_act_all_bts_cmd, - "bts <0-255> (activate-all-lchan|deactivate-all-lchan)", + "bts " BTS_NR_VTY_ARG_VAL " (activate-all-lchan|deactivate-all-lchan)", "BTS Specific Commands\n" BTS_NR_STR ACTIVATE_ALL_LCHANS_STR DEACTIVATE_ALL_LCHANS_STR) @@ -1895,7 +1895,7 @@ /* Similar to lchan_act, but activates all lchans on the specified BTS at once, * this is intended to perform lab tests / measurements. */ DEFUN_HIDDEN(lchan_act_all_trx, lchan_act_all_trx_cmd, - "bts <0-255> trx <0-255> (activate-all-lchan|deactivate-all-lchan)", + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> (activate-all-lchan|deactivate-all-lchan)", "BTS for manual command\n" BTS_NR_STR "TRX for manual command\n" TRX_NR_STR ACTIVATE_ALL_LCHANS_STR @@ -1937,7 +1937,7 @@ } DEFUN(lchan_set_mspower, lchan_set_mspower_cmd, - "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> ms-power <0-40> [verify]\n", + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> timeslot <0-7> sub-slot <0-7> ms-power <0-40> [verify]\n", BTS_NR_TRX_TS_SS_STR2 "Manually force MS Uplink Power Level in dBm on the lchan (for testing)\n" "Set transmit power of the MS in dBm\n" @@ -1988,7 +1988,7 @@ } DEFUN(vamos_modify_lchan, vamos_modify_lchan_cmd, - "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> modify (vamos|non-vamos) " TSC_ARGS_OPT, + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> timeslot <0-7> sub-slot <0-7> modify (vamos|non-vamos) " TSC_ARGS_OPT, BTS_NR_TRX_TS_SS_STR2 "Manually send Channel Mode Modify (for debugging)\n" "Enable VAMOS channel mode\n" "Disable VAMOS channel mode\n" @@ -2026,7 +2026,7 @@ /* Debug command to send lchans from state LCHAN_ST_UNUSED to state * LCHAN_ST_BORKEN and vice versa. */ DEFUN_HIDDEN(lchan_set_borken, lchan_set_borken_cmd, - "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> (borken|unused)", + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> timeslot <0-7> sub-slot <0-7> (borken|unused)", BTS_NR_TRX_TS_SS_STR2 "send lchan to state LCHAN_ST_BORKEN (for debugging)\n" "send lchan to state LCHAN_ST_UNUSED (for debugging)\n") @@ -2071,7 +2071,7 @@ } DEFUN(lchan_mdcx, lchan_mdcx_cmd, - "bts <0-255> trx <0-255> timeslot <0-7> sub-slot <0-7> mdcx A.B.C.D <0-65535>", + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> timeslot <0-7> sub-slot <0-7> mdcx A.B.C.D <0-65535>", BTS_NR_TRX_TS_SS_STR2 "Modify RTP Connection\n" "MGW IP Address\n" "MGW UDP Port\n") { @@ -2109,7 +2109,7 @@ } DEFUN(lchan_reassign, lchan_reassign_cmd, - "bts <0-255> trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> " + "bts " BTS_NR_VTY_ARG_VAL " trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> " "reassign-to trx <0-255> timeslot <0-7> (sub-slot|vamos-sub-slot) <0-7> " TSC_ARGS_OPT, BTS_NR_TRX_TS_STR2 @@ -3219,7 +3219,7 @@ DEFUN(bts_unblock_setup_ramping, bts_unblock_setup_ramping_cmd, - "bts <0-255> unblock-setup-ramping", + "bts " BTS_NR_VTY_ARG_VAL " unblock-setup-ramping", "BTS Specific Commands\n" BTS_NR_STR "Unblock and allow to configure a BTS if kept back by BTS ramping\n") { @@ -3325,7 +3325,7 @@ DEFUN(gen_position_trap, gen_position_trap_cmd, - "generate-location-state-trap <0-255>", + "generate-location-state-trap " BTS_NR_VTY_ARG_VAL, "Generate location state report\n" "BTS to report\n") { diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index 29b6ffe..498665c 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -870,7 +870,7 @@ } } -void bts_depend_mark(struct gsm_bts *bts, int dep) +void bts_depend_mark(struct gsm_bts *bts, gsm_bts_nr_t dep) { struct bts_depends_on_entry *entry; entry = talloc_zero(bts, struct bts_depends_on_entry); @@ -878,7 +878,7 @@ llist_add_tail(&entry->list, &bts->depends_on); } -static struct bts_depends_on_entry *bts_depend_find_entry(struct gsm_bts *bts, int dep) +static struct bts_depends_on_entry *bts_depend_find_entry(struct gsm_bts *bts, gsm_bts_nr_t dep) { struct bts_depends_on_entry *entry; llist_for_each_entry(entry, &bts->trx_list, list) { @@ -888,7 +888,7 @@ return NULL; } -void bts_depend_clear(struct gsm_bts *bts, int dep) +void bts_depend_clear(struct gsm_bts *bts, gsm_bts_nr_t dep) { struct bts_depends_on_entry *entry; entry = bts_depend_find_entry(bts, dep); diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c index 4b94781..13bd062 100644 --- a/src/osmo-bsc/bts_vty.c +++ b/src/osmo-bsc/bts_vty.c @@ -106,7 +106,7 @@ /* per-BTS configuration */ DEFUN_ATTR(cfg_bts, cfg_bts_cmd, - "bts <0-255>", + "bts " BTS_NR_VTY_ARG_VAL, "Select a BTS to configure\n" BTS_NR_STR, CMD_ATTR_IMMEDIATE) @@ -2605,7 +2605,7 @@ } DEFUN_ATTR(cfg_bts_depends_on, cfg_bts_depends_on_cmd, - "depends-on-bts <0-255>", + "depends-on-bts " BTS_NR_VTY_ARG_VAL, "This BTS can only be started if another one is up\n" BTS_NR_STR, CMD_ATTR_IMMEDIATE) { @@ -2638,7 +2638,7 @@ } DEFUN_ATTR(cfg_bts_no_depends_on, cfg_bts_no_depends_on_cmd, - "no depends-on-bts <0-255>", + "no depends-on-bts " BTS_NR_VTY_ARG_VAL, NO_STR "This BTS can only be started if another one is up\n" BTS_NR_STR, CMD_ATTR_IMMEDIATE) { diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index b11607e..814cd56 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -49,6 +49,8 @@ void *tall_bsc_ctx = NULL; +osmo_static_assert(BTS_NR_MAX == ((2 << ((sizeof(gsm_bts_nr_t) * 8) - 1)) - 1), _gsm_bts_nr_t_size); + void set_ts_e1link(struct gsm_bts_trx_ts *ts, uint8_t e1_nr, uint8_t e1_ts, uint8_t e1_ts_ss) { @@ -250,7 +252,7 @@ return get_value_string(chreq_names, c); } -struct gsm_bts *gsm_bts_num(const struct gsm_network *net, int num) +struct gsm_bts *gsm_bts_num(const struct gsm_network *net, gsm_bts_nr_t num) { struct gsm_bts *bts; diff --git a/src/osmo-bsc/neighbor_ident_vty.c b/src/osmo-bsc/neighbor_ident_vty.c index 44b9057..5cdab11 100644 --- a/src/osmo-bsc/neighbor_ident_vty.c +++ b/src/osmo-bsc/neighbor_ident_vty.c @@ -57,7 +57,7 @@ #define CGI_PS_ARGC 5 #define CGI_PS_DOC "Neighbor cell by cgi (Packet Switched, with RAC)\n" "MCC\n" "MNC\n" "LAC\n" "RAC\n" "CI\n" -#define LOCAL_BTS_PARAMS "bts <0-255>" +#define LOCAL_BTS_PARAMS "bts " BTS_NR_VTY_ARG_VAL #define LOCAL_BTS_DOC "Neighbor cell by local BTS number\n" "BTS number\n" static int neighbor_ident_vty_parse_lac(struct vty *vty, struct gsm0808_cell_id *cell_id, const char **argv) @@ -579,7 +579,7 @@ } DEFUN(show_bts_neighbor, show_bts_neighbor_cmd, - "show bts <0-255> neighbor " CELL_AB_VTY_PARAMS, + "show bts " BTS_NR_VTY_ARG_VAL " neighbor " CELL_AB_VTY_PARAMS, SHOW_STR "Display information about a BTS\n" "BTS number\n" "Query which cell would be the target for this neighbor ARFCN+BSIC\n" CELL_AB_VTY_DOC) diff --git a/src/osmo-bsc/smscb_vty.c b/src/osmo-bsc/smscb_vty.c index b13d2db..c43866e 100644 --- a/src/osmo-bsc/smscb_vty.c +++ b/src/osmo-bsc/smscb_vty.c @@ -391,7 +391,7 @@ } DEFUN(bts_show_cbs, bts_show_cbs_cmd, - "show bts <0-255> smscb [(basic|extended)]", + "show bts " BTS_NR_VTY_ARG_VAL " smscb [(basic|extended)]", SHOW_STR "Display information about a BTS\n" "BTS number\n" "SMS Cell Broadcast State\n" "Show only information related to CBCH BASIC\n" diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index 174e9e1..e4c7873 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -847,7 +847,7 @@ return trx; } -#define LCHAN_ARGS "lchan <0-255> <0-255> <0-7> <0-7>" +#define LCHAN_ARGS "lchan " BTS_NR_VTY_ARG_VAL " <0-255> <0-7> <0-7>" #define LCHAN_ARGS_DOC "identify an lchan\nBTS nr\nTRX nr\nTimeslot nr\nSubslot nr\n" static struct gsm_lchan *parse_lchan_args(const char **argv) @@ -858,7 +858,7 @@ return &ts->lchan[atoi(argv[3])]; } -#define LCHAN_WILDCARD_ARGS "lchan (<0-255>|*) (<0-255>|*) (<0-7>|*) (<0-7>|*)" +#define LCHAN_WILDCARD_ARGS "lchan (" BTS_NR_VTY_ARG_VAL "|*) (<0-255>|*) (<0-7>|*) (<0-7>|*)" #define LCHAN_WILDCARD_ARGS_DOC "identify an lchan\nBTS nr\nall BTS\nTRX nr\nall BTS\nTimeslot nr\nall TS\nSubslot nr\nall subslots\n" static void parse_lchan_wildcard_args(const char **argv, void (*cb)(struct gsm_lchan*, void*), void *cb_data) @@ -1104,7 +1104,7 @@ } DEFUN(res_ind, res_ind_cmd, - "res-ind trx <0-255> <0-255> levels .LEVELS", + "res-ind trx " BTS_NR_VTY_ARG_VAL " <0-255> levels .LEVELS", "Send Resource Indication for a specific TRX, indicating interference levels per lchan\n" "Indicate a BTS and TRX\n" "BTS nr\n" "TRX nr\n" "Indicate interference levels: each level is an index to bts->interf_meas_params.bounds_dbm[]," @@ -1398,7 +1398,7 @@ } DEFUN(expect_ts_use, expect_ts_use_cmd, - "expect-ts-use trx <0-255> <0-255> states" TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE, + "expect-ts-use trx " BTS_NR_VTY_ARG_VAL " <0-255> states" TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE, "Expect timeslots of a BTS' TRX to be in a specific state\n" "Indicate a BTS and TRX\n" "BTS nr\n" "TRX nr\n" "List of 8 expected TS states\n" @@ -1435,7 +1435,7 @@ } DEFUN(set_arfcn, set_arfcn_cmd, - "set-arfcn trx <0-255> <0-255> <0-1023>", + "set-arfcn trx " BTS_NR_VTY_ARG_VAL " <0-255> <0-1023>", "Set the ARFCN for a BTS' TRX\n" "Indicate a BTS and TRX\n" "BTS nr\n" "TRX nr\n" "Absolute Radio Frequency Channel Number\n") @@ -1467,7 +1467,7 @@ } DEFUN(set_band, set_band_cmd, - "set-band bts <0-255> BAND", + "set-band bts " BTS_NR_VTY_ARG_VAL " BAND", "Set the frequency band for a BTS\n" "Indicate a BTS\n" "BTS nr\n" "Frequency band\n") @@ -1488,7 +1488,7 @@ } DEFUN(set_ts_use, set_ts_use_cmd, - "set-ts-use trx <0-255> <0-255> states" TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE, + "set-ts-use trx " BTS_NR_VTY_ARG_VAL " <0-255> states" TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE TS_USE, "Put timeslots of a BTS' TRX into a specific state\n" "Indicate a BTS and TRX\n" "BTS nr\n" "TRX nr\n" "List of 8 TS states to apply\n" -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/38051?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ic0db2873fa9795024aba4399da495a0d8f7504b0 Gerrit-Change-Number: 38051 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: Fix building in environments that define _GNU_SOURCE
by pespin 06 Sep '24

06 Sep '24
Attention is currently required from: Hoernchen, laforge. pespin has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email ) Change subject: Fix building in environments that define _GNU_SOURCE ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > Debian has meanwhile updated its unstable package to include the fix: https://bugs.debian. […] I'll have a look at it, but anyway I still think this patch should be merged. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I36cb3a5555cb35ddc44f06d447268bd9cc0ce9b4 Gerrit-Change-Number: 38003 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Fri, 06 Sep 2024 15:16:07 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: Fix building in environments that define _GNU_SOURCE
by laforge 06 Sep '24

06 Sep '24
Attention is currently required from: Hoernchen, pespin. laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email ) Change subject: Fix building in environments that define _GNU_SOURCE ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > I need this patch merged in order to have libosmocore compile on my Archlinux system.... Debian has meanwhile updated its unstable package to include the fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1080419 - maybe you should ping the arch linux maintainer of liburing, to get that fixed, too? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I36cb3a5555cb35ddc44f06d447268bd9cc0ce9b4 Gerrit-Change-Number: 38003 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 06 Sep 2024 15:13:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmocore[master]: Fix building in environments that define _GNU_SOURCE
by pespin 06 Sep '24

06 Sep '24
Attention is currently required from: Hoernchen, laforge. pespin has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email ) Change subject: Fix building in environments that define _GNU_SOURCE ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > This is like attempts to force LTO or randomly add -ffast-math, the expected behavior if random flag […] I need this patch merged in order to have libosmocore compile on my Archlinux system.... -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/38003?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I36cb3a5555cb35ddc44f06d447268bd9cc0ce9b4 Gerrit-Change-Number: 38003 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Fri, 06 Sep 2024 14:48:14 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.