aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-08-06 19:31:40 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2021-08-16 02:13:17 +0200
commit225af37f4868fdf6857ad29454b9418d2b7512bd (patch)
tree488502fb83f62048c8696c2c31b9758a85117cdc
parent1dbbc607692fe502d4494c6e068438917c7122fd (diff)
early IMM ASS 1/n: add vty config option
This patch adds only the VTY config option without any effect, to ease patch review. The implementation follows in I56c25cde152040fb66bdba44399bd37671ae3df2 The new config option is written so that further variants of Immediate Assignment sequencing may be added easily. See also I19e6a3d614aa5ae24d64eed96caf53e6f0e8bb74. Related: SYS#5559 Change-Id: I710343d1728153faf3db9758ff5a1ef26bb8d3d4
-rw-r--r--include/osmocom/bsc/bts.h3
-rw-r--r--include/osmocom/bsc/gsm_data.h5
-rw-r--r--src/osmo-bsc/bts_vty.c28
-rw-r--r--tests/osmo-bsc.vty18
4 files changed, 54 insertions, 0 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 1d566f5d1..291ec1082 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -566,6 +566,9 @@ struct gsm_bts {
/* Is Fast return to LTE allowed during Chan Release in this BTS? */
bool srvcc_fast_return_allowed;
+
+ /* At what point in the channel allocation sequence to dispatch the Immediate Assignment (Abis optimization) */
+ enum imm_ass_time imm_ass_time;
};
#define GSM_BTS_SI2Q(bts, i) (struct gsm48_system_information_type_2quater *)((bts)->si_buf[SYSINFO_TYPE_2quater][i])
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 31711c7ba..4411555f0 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -601,6 +601,11 @@ extern const struct value_string lchan_activate_mode_names[];
static inline const char *lchan_activate_mode_name(enum lchan_activate_for activ_for)
{ return get_value_string(lchan_activate_mode_names, activ_for); }
+enum imm_ass_time {
+ IMM_ASS_TIME_POST_CHAN_ACK = 0,
+ IMM_ASS_TIME_PRE_CHAN_ACK,
+};
+
struct lchan_activate_info {
enum lchan_activate_for activ_for;
struct gsm_subscriber_connection *for_conn;
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c
index 3695d2838..cba0bb0db 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -2806,6 +2806,23 @@ DEFUN_ATTR(cfg_bts_srvcc_fast_return, cfg_bts_srvcc_fast_return_cmd,
return CMD_SUCCESS;
}
+DEFUN_ATTR(cfg_bts_immediate_assignment, cfg_bts_immediate_assignment_cmd,
+ "immediate-assignment (post-chan-ack|pre-chan-ack)",
+ "Configure time of Immediate Assignment after ChanRqd RACH (Abis optimization)\n"
+ "Send the Immediate Assignment after the Channel Activation ACK (normal sequence)\n"
+ "Send the Immediate Assignment directly after Channel Activation (early), without waiting for the ACK;"
+ " This may help with double allocations on high latency Abis links\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct gsm_bts *bts = vty->index;
+
+ if (!strcmp(argv[0], "pre-chan-ack"))
+ bts->imm_ass_time = IMM_ASS_TIME_PRE_CHAN_ACK;
+ else
+ bts->imm_ass_time = IMM_ASS_TIME_POST_CHAN_ACK;
+ return CMD_SUCCESS;
+}
+
#define BS_POWER_CONTROL_CMD \
"bs-power-control"
#define MS_POWER_CONTROL_CMD \
@@ -3980,6 +3997,16 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
if (!bts->srvcc_fast_return_allowed)
vty_out(vty, " srvcc fast-return forbid%s", VTY_NEWLINE);
+ switch (bts->imm_ass_time) {
+ default:
+ case IMM_ASS_TIME_POST_CHAN_ACK:
+ /* default value */
+ break;
+ case IMM_ASS_TIME_PRE_CHAN_ACK:
+ vty_out(vty, " immediate-assignment pre-chan-ack%s", VTY_NEWLINE);
+ break;
+ }
+
/* BS/MS Power Control parameters */
config_write_power_ctrl(vty, 2, &bts->bs_power_ctrl);
config_write_power_ctrl(vty, 2, &bts->ms_power_ctrl);
@@ -4150,6 +4177,7 @@ int bts_vty_init(void)
install_element(BTS_NODE, &cfg_bts_interf_meas_avg_period_cmd);
install_element(BTS_NODE, &cfg_bts_interf_meas_level_bounds_cmd);
install_element(BTS_NODE, &cfg_bts_srvcc_fast_return_cmd);
+ install_element(BTS_NODE, &cfg_bts_immediate_assignment_cmd);
neighbor_ident_vty_init();
/* See also handover commands added on bts level from handover_vty.c */
diff --git a/tests/osmo-bsc.vty b/tests/osmo-bsc.vty
index 7351056da..b837d2560 100644
--- a/tests/osmo-bsc.vty
+++ b/tests/osmo-bsc.vty
@@ -204,3 +204,21 @@ OsmoBSC(config-net-bts)# show running-config
OsmoBSC(config-net-bts)# channel allocator allow-tch-for-signalling 1
OsmoBSC(config-net-bts)# show running-config
... !channel allocator allow-tch-for-signalling
+
+OsmoBSC(config-net-bts)# immediate-assignment?
+ immediate-assignment Configure time of Immediate Assignment after ChanRqd RACH (Abis optimization)
+OsmoBSC(config-net-bts)# immediate-assignment ?
+ post-chan-ack Send the Immediate Assignment after the Channel Activation ACK (normal sequence)
+ pre-chan-ack Send the Immediate Assignment directly after Channel Activation (early), without waiting for the ACK; This may help with double allocations on high latency Abis links
+OsmoBSC(config-net-bts)# show running-config
+... !immediate-assignment
+OsmoBSC(config-net-bts)# immediate-assignment pre-chan-ack
+OsmoBSC(config-net-bts)# show running-config
+...
+ bts 0
+...
+ immediate-assignment pre-chan-ack
+...
+OsmoBSC(config-net-bts)# immediate-assignment post-chan-ack
+OsmoBSC(config-net-bts)# show running-config
+... !immediate-assignment