From 7214e56b499c14fd371b24f4a74b1b763f0240bc Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 7 Sep 2022 00:10:49 +0200 Subject: [PATCH] VTY,CTRL: add pchan dynamic/{osmocom,ipaccess} We already use "OSMO_DYN" as C name for "fully dynamic" timeslot config, when working with osmo-bsc.cfg I dearly miss this short name, it is a pain / has become ridiculous to write 'tch/f_tch/h_sdcch8_pdch'. Introduce 'dynamic/osmocom' and 'dynamic/ipaccess' as default names for our dynamic timeslots on VTY and CTRL. The old 'tch/f_tch/h_sdcch8_pdch' and 'tch/f_pdch' are still supported. Change-Id: I37719edd867c777d1ce944b8e2f1efffac38f00e --- TODO-RELEASE | 2 + doc/examples/osmo-bsc/osmo-bsc-4trx.cfg | 60 ++++++++++++------------- doc/manuals/chapters/bts.adoc | 42 +++++++++-------- doc/manuals/chapters/interf_meas.adoc | 2 +- src/osmo-bsc/bts.c | 8 ++-- src/osmo-bsc/gsm_data.c | 18 ++++++-- tests/ctrl_test_runner.py | 4 +- tests/timeslot.vty | 10 +++-- 8 files changed, 83 insertions(+), 63 deletions(-) diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc9b..6f680a6d4 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,5 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line + osmo-bsc VTY Timeslot phys_chan_config will now write back with new dynamic timeslot names: 'DYNAMIC/OSMOCOM' instead of 'TCH/F_TCH/H_SDCCH8_PDCH' and 'DYNAMIC/IPACCESS' instead of 'TCH/F_PDCH' + osmo-bsc CTRL CTRL commands like 'bts.N.channel-load' will now respond with new dynamic timeslot names: 'DYNAMIC/OSMOCOM' instead of 'TCH/F_TCH/H_SDCCH8_PDCH' and 'DYNAMIC/IPACCESS' instead of 'TCH/F_PDCH' diff --git a/doc/examples/osmo-bsc/osmo-bsc-4trx.cfg b/doc/examples/osmo-bsc/osmo-bsc-4trx.cfg index dbebdb29d..786813a4e 100644 --- a/doc/examples/osmo-bsc/osmo-bsc-4trx.cfg +++ b/doc/examples/osmo-bsc/osmo-bsc-4trx.cfg @@ -46,22 +46,22 @@ network phys_chan_config SDCCH8+CBCH hopping enabled 0 timeslot 2 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 3 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 4 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 5 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 6 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 7 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 trx 1 rf_locked 0 @@ -71,28 +71,28 @@ network max_power_red 20 rsl e1 tei 1 timeslot 0 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 1 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 2 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 3 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 4 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 5 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 6 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 7 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 trx 2 rf_locked 0 @@ -102,28 +102,28 @@ network max_power_red 20 rsl e1 tei 2 timeslot 0 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 1 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 2 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 3 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 4 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 5 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 6 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 7 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 trx 3 rf_locked 0 @@ -133,28 +133,28 @@ network max_power_red 20 rsl e1 tei 3 timeslot 0 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 1 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 2 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 3 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 4 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 5 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 6 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 timeslot 7 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM hopping enabled 0 msc 0 allow-emergency allow diff --git a/doc/manuals/chapters/bts.adoc b/doc/manuals/chapters/bts.adoc index 177d1c5f7..d119acca1 100644 --- a/doc/manuals/chapters/bts.adoc +++ b/doc/manuals/chapters/bts.adoc @@ -296,7 +296,7 @@ all BTS models support dynamic channels. .Dynamic timeslot support by various BTS models [cols="50%,25%,25%"] |=== -| |`TCH/F_TCH/H_SDCCH8_PDCH` |`TCH/F_PDCH` +| |`DYNAMIC/OSMOCOM` |`DYNAMIC/IPACCESS` |ip.access nanoBTS |- |supported |Ericsson RBS |supported |- |sysmoBTS using _osmo-bts-sysmo_ |supported |supported @@ -311,11 +311,13 @@ non-standard RSL messages used for these timeslot kinds. NOTE: Same as for dedicated PDCH timeslots, you need to enable GPRS and operate a PCU, SGSN and GGSN to provide the actual data service. -==== Osmocom Style Dynamic Timeslots (TCH/F_TCH/H_SDCCH8_PDCH) +==== Osmocom Style Dynamic Timeslots (DYNAMIC/OSMOCOM) -Timeslots of the `TCH/F_TCH/H_SDCCH8_PDCH` type dynamically switch between TCH/F, +`DYNAMIC/OSMOCOM` is an alias for `TCH/F_TCH/H_SDCCH8_PDCH`. + +Timeslots of the `DYNAMIC/OSMOCOM` type dynamically switch between TCH/F, TCH/H, SDCCH8 and PDCH, depending on the channel kind requested by the MSC. The RSL -messaging for `TCH/F_TCH/H_SDCCH8_PDCH` timeslots is compatible with Ericsson RBS. +messaging for these timeslots is compatible with Ericsson RBS. BTS models supporting this timeslot kind are shown in <>. @@ -334,10 +336,12 @@ network In OsmoNITB, disabling TCH/F on Osmocom dynamic timeslots is the default. In OsmoBSC, the default is to allow both. -==== ip.access Style Dynamic Timeslots (TCH/F_PDCH) +==== ip.access Style Dynamic Timeslots (DYNAMIC/IPACCESS) -Timeslots of the `TCH/F_PDCH` type dynamically switch between TCH/F and PDCH. -The RSL messaging for `TCH/F_PDCH` timeslots is compatible with ip.access +`DYNAMIC/IPACCESS` is an alias for `TCH/F_PDCH`. + +Timeslots of the `DYNAMIC/IPACCESS` type dynamically switch between TCH/F and PDCH. +The RSL messaging for `DYNAMIC/IPACCESS` timeslots is compatible with ip.access nanoBTS. BTS models supporting this timeslot kind are shown in <>. @@ -350,7 +354,7 @@ timeslots to TCH, and no PDCH timeslots would be left for GPRS service. ==== Dynamic Timeslot Configuration Examples -This is an extract of an `osmo-bsc`` config file. A timeslot configuration with +This is an extract of an `osmo-bsc` config file. A timeslot configuration with five Osmocom style dynamic timeslots and one dedicated PDCH may look like this: ---- @@ -362,20 +366,20 @@ network timeslot 1 phys_chan_config SDCCH8 timeslot 2 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM timeslot 3 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM timeslot 4 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM timeslot 5 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM timeslot 6 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM timeslot 7 phys_chan_config PDCH ---- -With the ip.access nanoBTS, only `TCH/F_PDCH` dynamic timeslots are supported, +With the ip.access nanoBTS, only `DYNAMIC/IPACCESS` dynamic timeslots are supported, and hence a nanoBTS configuration may look like this: ---- @@ -387,15 +391,15 @@ network timeslot 1 phys_chan_config SDCCH8 timeslot 2 - phys_chan_config TCH/F_PDCH + phys_chan_config DYNAMIC/IPACCESS timeslot 3 - phys_chan_config TCH/F_PDCH + phys_chan_config DYNAMIC/IPACCESS timeslot 4 - phys_chan_config TCH/F_PDCH + phys_chan_config DYNAMIC/IPACCESS timeslot 5 - phys_chan_config TCH/F_PDCH + phys_chan_config DYNAMIC/IPACCESS timeslot 6 - phys_chan_config TCH/F_PDCH + phys_chan_config DYNAMIC/IPACCESS timeslot 7 phys_chan_config PDCH ---- diff --git a/doc/manuals/chapters/interf_meas.adoc b/doc/manuals/chapters/interf_meas.adoc index 518a6e5c5..47c524f55 100644 --- a/doc/manuals/chapters/interf_meas.adoc +++ b/doc/manuals/chapters/interf_meas.adoc @@ -63,7 +63,7 @@ PDCH resources should be allocated for interference reasons. NOTE: Currently osmo-bsc makes no use of PDCH interference reports, neither they get forwarded to the BSC co-located PCU over the PCUIF. -For dynamic timeslots (`TCH/F_TCH/H_SDCCH/8_PDCH` and `TCH/F_PDCH`), the +For dynamic timeslots (`DYNAMIC/OSMOCOM` and `DYNAMIC/IPACCESS`), the following expectations apply: * when in TCH/F mode: no interference reports, because the only sub-channel is active; diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c index ab3e6a053..80332ebf8 100644 --- a/src/osmo-bsc/bts.c +++ b/src/osmo-bsc/bts.c @@ -1633,11 +1633,11 @@ const struct osmo_stat_item_desc bts_stat_desc[] = { "", 60, 0 }, [BTS_STAT_CHAN_TCH_F_PDCH_USED] = \ { "chan_tch_f_pdch:used", - "Number of TCH/F_PDCH channels used", + "Number of DYNAMIC/IPACCESS channels used", "", 60, 0 }, [BTS_STAT_CHAN_TCH_F_PDCH_TOTAL] = \ { "chan_tch_f_pdch:total", - "Number of TCH/F_PDCH channels total", + "Number of DYNAMIC/IPACCESS channels total", "", 60, 0 }, [BTS_STAT_CHAN_CCCH_SDCCH4_CBCH_USED] = \ { "chan_ccch_sdcch4_cbch:used", @@ -1657,11 +1657,11 @@ const struct osmo_stat_item_desc bts_stat_desc[] = { "", 60, 0 }, [BTS_STAT_CHAN_OSMO_DYN_USED] = \ { "chan_osmo_dyn:used", - "Number of TCH/F_TCH/H_SDCCH8_PDCH channels used", + "Number of DYNAMIC/OSMOCOM channels used", "", 60, 0 }, [BTS_STAT_CHAN_OSMO_DYN_TOTAL] = \ { "chan_osmo_dyn:total", - "Number of TCH/F_TCH/H_SDCCH8_PDCH channels total", + "Number of DYNAMIC/OSMOCOM channels total", "", 60, 0 }, [BTS_STAT_T3122] = \ { "T3122", diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 427aad564..afedb220c 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -184,10 +184,14 @@ const struct value_string gsm_pchant_names[] = { { GSM_PCHAN_TCH_H, "TCH/H" }, { GSM_PCHAN_SDCCH8_SACCH8C, "SDCCH8" }, { GSM_PCHAN_PDCH, "PDCH" }, - { GSM_PCHAN_TCH_F_PDCH, "TCH/F_PDCH" }, + { GSM_PCHAN_TCH_F_PDCH, "DYNAMIC/IPACCESS" }, { GSM_PCHAN_UNKNOWN, "UNKNOWN" }, { GSM_PCHAN_CCCH_SDCCH4_CBCH, "CCCH+SDCCH4+CBCH" }, { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "SDCCH8+CBCH" }, + { GSM_PCHAN_OSMO_DYN, "DYNAMIC/OSMOCOM" }, + /* make get_string_value() return GSM_PCHAN_TCH_F_PDCH for both "DYNAMIC/IPACCESS" and "TCH/F_PDCH" */ + { GSM_PCHAN_TCH_F_PDCH, "TCH/F_PDCH" }, + /* make get_string_value() return GSM_PCHAN_OSMO_DYN for both "DYNAMIC/OSMOCOM" and "TCH/F_TCH/H_SDCCH8_PDCH" */ { GSM_PCHAN_OSMO_DYN, "TCH/F_TCH/H_SDCCH8_PDCH" }, /* When adding items here, you must also add matching items to gsm_pchant_descs[]! */ { 0, NULL } @@ -220,11 +224,19 @@ const struct value_string gsm_pchant_descs[] = { { GSM_PCHAN_TCH_H, "2 TCH/H + 2 FACCH/H + 2 SACCH (Comb. II)" }, { GSM_PCHAN_SDCCH8_SACCH8C, "8 SDCCH + 4 SACCH (Comb. VII)" }, { GSM_PCHAN_PDCH, "Packet Data Channel for GPRS/EDGE" }, - { GSM_PCHAN_TCH_F_PDCH, "Dynamic TCH/F or GPRS PDCH" }, + { GSM_PCHAN_TCH_F_PDCH, "Dynamic TCH/F or GPRS PDCH" + " (dynamic/ipaccess is an alias for tch/f_pdch)" }, { GSM_PCHAN_UNKNOWN, "Unknown / Unsupported channel combination" }, { GSM_PCHAN_CCCH_SDCCH4_CBCH, "FCCH + SCH + BCCH + CCCH + CBCH + 3 SDCCH + 2 SACCH (Comb. V)" }, { GSM_PCHAN_SDCCH8_SACCH8C_CBCH, "7 SDCCH + 4 SACCH + CBCH (Comb. VII)" }, - { GSM_PCHAN_OSMO_DYN, "Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH" }, + { GSM_PCHAN_OSMO_DYN, "Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH" + " (dynamic/osmocom is an alias for tch/f_tch/h_sdcch8_pdch)" }, + /* These duplicate entries are needed to provide a description for both the DYNAMIC/... aliases and their + * explicit versions 'TCH/F_PDCH' / 'TCH/F_TCH/H_SDCCH8_PDCH', see bts_trx_vty_init() */ + { GSM_PCHAN_TCH_F_PDCH, "Dynamic TCH/F or GPRS PDCH" + " (dynamic/ipaccess is an alias for tch/f_pdch)" }, + { GSM_PCHAN_OSMO_DYN, "Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH" + " (dynamic/osmocom is an alias for tch/f_tch/h_sdcch8_pdch)" }, { 0, NULL } }; diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index 587f9e232..e88999282 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -233,8 +233,8 @@ class TestCtrlBSC(TestCtrlBase): self.assertEqual(r['mtype'], 'GET_REPLY') self.assertEqual(r['value'], 'CCCH+SDCCH4,0,0 TCH/F,0,0 TCH/H,0,0 SDCCH8,0,0' - + ' TCH/F_PDCH,0,0 CCCH+SDCCH4+CBCH,0,0' - + ' SDCCH8+CBCH,0,0 TCH/F_TCH/H_SDCCH8_PDCH,0,0') + + ' DYNAMIC/IPACCESS,0,0 CCCH+SDCCH4+CBCH,0,0' + + ' SDCCH8+CBCH,0,0 DYNAMIC/OSMOCOM,0,0') def testBtsOmlConnectionState(self): """Check OML state. It will not be connected""" diff --git a/tests/timeslot.vty b/tests/timeslot.vty index 0a2f01c31..8d0c70b05 100644 --- a/tests/timeslot.vty +++ b/tests/timeslot.vty @@ -7,7 +7,7 @@ OsmoBSC(config-net-bts-trx)# timeslot 0 OsmoBSC(config-net-bts-trx-ts)# list ... - phys_chan_config (none|ccch|ccch+sdcch4|tch/f|tch/h|sdcch8|pdch|tch/f_pdch|unknown|ccch+sdcch4+cbch|sdcch8+cbch|tch/f_tch/h_sdcch8_pdch) + phys_chan_config (none|ccch|ccch+sdcch4|tch/f|tch/h|sdcch8|pdch|dynamic/ipaccess|unknown|ccch+sdcch4+cbch|sdcch8+cbch|dynamic/osmocom|tch/f_pdch|tch/f_tch/h_sdcch8_pdch) training_sequence_code <0-7> hopping enabled (0|1) hopping sequence-number <0-63> @@ -28,11 +28,13 @@ OsmoBSC(config-net-bts-trx-ts)# phys_chan_config ? tch/h 2 TCH/H + 2 FACCH/H + 2 SACCH (Comb. II) sdcch8 8 SDCCH + 4 SACCH (Comb. VII) pdch Packet Data Channel for GPRS/EDGE - tch/f_pdch Dynamic TCH/F or GPRS PDCH + dynamic/ipaccess Dynamic TCH/F or GPRS PDCH (dynamic/ipaccess is an alias for tch/f_pdch) unknown Unknown / Unsupported channel combination ccch+sdcch4+cbch FCCH + SCH + BCCH + CCCH + CBCH + 3 SDCCH + 2 SACCH (Comb. V) sdcch8+cbch 7 SDCCH + 4 SACCH + CBCH (Comb. VII) - tch/f_tch/h_sdcch8_pdch Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH + dynamic/osmocom Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH (dynamic/osmocom is an alias for tch/f_tch/h_sdcch8_pdch) + tch/f_pdch Dynamic TCH/F or GPRS PDCH (dynamic/ipaccess is an alias for tch/f_pdch) + tch/f_tch/h_sdcch8_pdch Dynamic TCH/F or TCH/H or SDCCH/8 or GPRS PDCH (dynamic/osmocom is an alias for tch/f_tch/h_sdcch8_pdch) OsmoBSC(config-net-bts-trx-ts)# phys_chan_config none OsmoBSC(config-net-bts-trx-ts)# show running-config @@ -67,5 +69,5 @@ OsmoBSC(config-net-bts-trx-ts)# show running-config trx 0 ... timeslot 0 - phys_chan_config TCH/F_TCH/H_SDCCH8_PDCH + phys_chan_config DYNAMIC/OSMOCOM ...