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 ?