iedemam has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bsc/+/28276 )
Change subject: Expand VTY option which controls use of TCH for signalling
......................................................................
Expand VTY option which controls use of TCH for signalling
For statistical clarity and site tuning, it is sometimes
desirable to completely disable the use of TCH for signaling.
In the existing version of this VTY command, there is no way to
accomplish this. We can only restrict TCH for signaling non-voice
related actions.
This patch deprecates 'allow-tch-for-signalling (0|1)' and
adds 'tch-signalling-policy (never|emergency|voice|always)' to
provide more options.
Change-Id: I4459941ddad4e4a3bec8409b180d9a23a735e640
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_vty.c
M tests/osmo-bsc.vty
5 files changed, 82 insertions(+), 22 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 66cf68f..a26bdbd 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -259,6 +259,13 @@
TRX_PHY_VERSION,
};
+enum bts_tch_signalling_policy {
+ BTS_TCH_SIGNALLING_NEVER,
+ BTS_TCH_SIGNALLING_EMERG,
+ BTS_TCH_SIGNALLING_VOICE,
+ BTS_TCH_SIGNALLING_ALWAYS,
+};
+
struct vty;
struct gsm_bts_model {
@@ -514,9 +521,8 @@
* interference reported in RSL Resource Indication. */
bool chan_alloc_avoid_interf;
- /* When true (default), TCH can be allocated to serve
- * non-voicecall-related signalling services when SDCCHs are exhausted */
- bool chan_alloc_allow_tch_for_signalling;
+ /* If SDCCHs are exhausted, when can we use TCH for signalling purposes. */
+ enum bts_tch_signalling_policy chan_alloc_tch_signalling_policy;
enum neigh_list_manual_mode neigh_list_manual_mode;
/* parameters from which we build SYSTEM INFORMATION */
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index d37fac8..f6215d9 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -2178,7 +2178,11 @@
* in the code below, all other channel requests will get an SDCCH first
* (if possible). */
- if (gsm_chreq_reason_is_voicecall(rqd->reason) ||
bts->chan_alloc_allow_tch_for_signalling) {
+ if (bts->chan_alloc_tch_signalling_policy == BTS_TCH_SIGNALLING_ALWAYS ||
+ (bts->chan_alloc_tch_signalling_policy == BTS_TCH_SIGNALLING_VOICE &&
+ gsm_chreq_reason_is_voicecall(rqd->reason)) ||
+ (bts->chan_alloc_tch_signalling_policy == BTS_TCH_SIGNALLING_EMERG &&
+ rqd->reason == GSM_CHREQ_REASON_EMERG)) {
if (!lchan) {
LOG_BTS(bts, DRSL, LOGL_NOTICE, "CHAN RQD[%s]: no resources for %s 0x%x, retrying
with %s\n",
get_value_string(gsm_chreq_descs, rqd->reason), gsm_lchant_name(GSM_LCHAN_SDCCH),
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index d0adb2a..89895ca 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -295,7 +295,7 @@
bts->neigh_list_manual_mode = NL_MODE_AUTOMATIC;
bts->early_classmark_allowed_3g = true; /* 3g Early Classmark Sending controlled by
bts->early_classmark_allowed param */
bts->si_unused_send_empty = true;
- bts->chan_alloc_allow_tch_for_signalling = true;
+ bts->chan_alloc_tch_signalling_policy = BTS_TCH_SIGNALLING_ALWAYS;
bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */
bts->si_common.cell_sel_par.rxlev_acc_min = 0;
bts->si_common.si2quater_neigh_list.arfcn = bts->si_common.data.earfcn_list;
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c
index ba4215a..2ae9d9b 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -565,6 +565,31 @@
return CMD_SUCCESS;
}
+DEFUN_ATTR(cfg_bts_chan_alloc_tch_signalling_policy,
+ cfg_bts_chan_alloc_tch_signalling_policy_cmd,
+ "channel allocator tch-signalling-policy (never|emergency|voice|always)",
+ "Channel Allocator\n" "Channel Allocator\n"
+ "Configure when TCH/H or TCH/F channels can be used to serve signalling if
SDCCHs are exhausted\n"
+ "Never allow TCH for signalling purposes\n"
+ "Only allow TCH for signalling purposes when establishing an emergency
call\n"
+ "Allow TCH for signalling purposes when establishing any voice call\n"
+ "Always allow TCH for signalling purposes (default)\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct gsm_bts *bts = vty->index;
+
+ if (!strcmp(argv[0], "never"))
+ bts->chan_alloc_tch_signalling_policy = BTS_TCH_SIGNALLING_NEVER;
+ else if (!strcmp(argv[0], "emergency"))
+ bts->chan_alloc_tch_signalling_policy = BTS_TCH_SIGNALLING_EMERG;
+ else if (!strcmp(argv[0], "voice"))
+ bts->chan_alloc_tch_signalling_policy = BTS_TCH_SIGNALLING_VOICE;
+ else
+ bts->chan_alloc_tch_signalling_policy = BTS_TCH_SIGNALLING_ALWAYS;
+
+ return CMD_SUCCESS;
+}
+
DEFUN_ATTR(cfg_bts_chan_alloc_allow_tch_for_signalling,
cfg_bts_chan_alloc_allow_tch_for_signalling_cmd,
"channel allocator allow-tch-for-signalling (0|1)",
@@ -572,14 +597,16 @@
"Configure whether TCH/H or TCH/F channels can be used to serve non-call-related
signalling if SDCCHs are exhausted\n"
"Forbid use of TCH for non-call-related signalling purposes\n"
"Allow use of TCH for non-call-related signalling purposes (default)\n",
- CMD_ATTR_IMMEDIATE)
+ CMD_ATTR_IMMEDIATE|CMD_ATTR_DEPRECATED)
{
struct gsm_bts *bts = vty->index;
+ vty_out(vty, "%% 'allow-tch-for-signalling' is deprecated, use
'tch-signalling-policy' instead.%s", VTY_NEWLINE);
+
if (!strcmp(argv[0], "0"))
- bts->chan_alloc_allow_tch_for_signalling = false;
+ bts->chan_alloc_tch_signalling_policy = BTS_TCH_SIGNALLING_VOICE;
else
- bts->chan_alloc_allow_tch_for_signalling = true;
+ bts->chan_alloc_tch_signalling_policy = BTS_TCH_SIGNALLING_ALWAYS;
return CMD_SUCCESS;
}
@@ -4185,8 +4212,12 @@
VTY_NEWLINE);
if (bts->chan_alloc_avoid_interf)
vty_out(vty, " channel allocator avoid-interference 1%s", VTY_NEWLINE);
- if (!bts->chan_alloc_allow_tch_for_signalling)
- vty_out(vty, " channel allocator allow-tch-for-signalling 0%s",
VTY_NEWLINE);
+ if (bts->chan_alloc_tch_signalling_policy == BTS_TCH_SIGNALLING_NEVER)
+ vty_out(vty, " channel allocator tch-signalling-policy never%s",
VTY_NEWLINE);
+ else if (bts->chan_alloc_tch_signalling_policy == BTS_TCH_SIGNALLING_EMERG)
+ vty_out(vty, " channel allocator tch-signalling-policy emergency%s",
VTY_NEWLINE);
+ else if (bts->chan_alloc_tch_signalling_policy == BTS_TCH_SIGNALLING_VOICE)
+ vty_out(vty, " channel allocator tch-signalling-policy voice%s",
VTY_NEWLINE);
vty_out(vty, " rach tx integer %u%s",
bts->si_common.rach_control.tx_integer, VTY_NEWLINE);
vty_out(vty, " rach max transmission %u%s",
@@ -4509,6 +4540,7 @@
install_element(BTS_NODE, &cfg_bts_oml_e1_tei_cmd);
install_element(BTS_NODE, &cfg_bts_challoc_cmd);
install_element(BTS_NODE, &cfg_bts_chan_alloc_interf_cmd);
+ install_element(BTS_NODE, &cfg_bts_chan_alloc_tch_signalling_policy_cmd);
install_element(BTS_NODE, &cfg_bts_chan_alloc_allow_tch_for_signalling_cmd);
install_element(BTS_NODE, &cfg_bts_rach_tx_integer_cmd);
install_element(BTS_NODE, &cfg_bts_rach_max_trans_cmd);
diff --git a/tests/osmo-bsc.vty b/tests/osmo-bsc.vty
index ace21df..f2af32b 100644
--- a/tests/osmo-bsc.vty
+++ b/tests/osmo-bsc.vty
@@ -166,18 +166,20 @@
allocator Channel Allocator
OsmoBSC(config-net-bts)# channel allocator ?
- ascending Allocate Timeslots and Transceivers in ascending order
- descending Allocate Timeslots and Transceivers in descending order
- avoid-interference Configure whether reported interference levels from RES IND
are used in channel allocation
- allow-tch-for-signalling Configure whether TCH/H or TCH/F channels can be used to
serve non-call-related signalling if SDCCHs are exhausted
+ ascending Allocate Timeslots and Transceivers in ascending order
+ descending Allocate Timeslots and Transceivers in descending order
+ avoid-interference Configure whether reported interference levels from RES IND are
used in channel allocation
+ tch-signalling-policy Configure when TCH/H or TCH/F channels can be used to serve
signalling if SDCCHs are exhausted
OsmoBSC(config-net-bts)# channel allocator avoid-interference ?
0 Ignore interference levels (default). Always assign lchans in a deterministic
order.
1 In channel allocation, prefer lchans with less interference.
-OsmoBSC(config-net-bts)# channel allocator allow-tch-for-signalling ?
- 0 Forbid use of TCH for non-call-related signalling purposes
- 1 Allow use of TCH for non-call-related signalling purposes (default)
+OsmoBSC(config-net-bts)# channel allocator tch-signalling-policy ?
+ never Never allow TCH for signalling purposes
+ emergency Only allow TCH for signalling purposes when establishing an emergency call
+ voice Allow TCH for signalling purposes when establishing any voice call
+ always Always allow TCH for signalling purposes (default)
OsmoBSC(config-net-bts)# show running-config
... !channel allocator avoid-interference
@@ -194,18 +196,34 @@
... !channel allocator avoid-interference
OsmoBSC(config-net-bts)# show running-config
-... !channel allocator allow-tch-for-signalling
-OsmoBSC(config-net-bts)# channel allocator allow-tch-for-signalling 0
+... !channel allocator tch-signalling-policy
+OsmoBSC(config-net-bts)# channel allocator tch-signalling-policy never
OsmoBSC(config-net-bts)# show running-config
...
bts 0
...
- channel allocator allow-tch-for-signalling 0
+ channel allocator tch-signalling-policy never
...
-OsmoBSC(config-net-bts)# channel allocator allow-tch-for-signalling 1
+OsmoBSC(config-net-bts)# channel allocator tch-signalling-policy emergency
OsmoBSC(config-net-bts)# show running-config
-... !channel allocator allow-tch-for-signalling
+...
+ bts 0
+...
+ channel allocator tch-signalling-policy emergency
+...
+
+OsmoBSC(config-net-bts)# channel allocator tch-signalling-policy voice
+OsmoBSC(config-net-bts)# show running-config
+...
+ bts 0
+...
+ channel allocator tch-signalling-policy voice
+...
+
+OsmoBSC(config-net-bts)# channel allocator tch-signalling-policy always
+OsmoBSC(config-net-bts)# show running-config
+... !channel allocator tch-signalling-policy
OsmoBSC(config-net-bts)# immediate-assignment?
immediate-assignment Configure time of Immediate Assignment after ChanRqd RACH (Abis
optimization)
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/28276
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4459941ddad4e4a3bec8409b180d9a23a735e640
Gerrit-Change-Number: 28276
Gerrit-PatchSet: 9
Gerrit-Owner: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged