aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-12-01 01:24:48 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-01-12 03:28:14 +0100
commit50f7f24d6813269a3ccf7129075a573b2305b9d5 (patch)
tree2ca88eb5be90d01864cb56d71090a16bd99345b0
parent880764cf72a90a87f341b4731c9e288f67719e40 (diff)
HO: add handover algo 2 configuration parameters
-rw-r--r--include/osmocom/bsc/handover_cfg.h132
-rw-r--r--tests/handover_cfg.vty242
2 files changed, 361 insertions, 13 deletions
diff --git a/include/osmocom/bsc/handover_cfg.h b/include/osmocom/bsc/handover_cfg.h
index e281c3f72..1b8123535 100644
--- a/include/osmocom/bsc/handover_cfg.h
+++ b/include/osmocom/bsc/handover_cfg.h
@@ -1,6 +1,7 @@
#pragma once
#include <stdbool.h>
+#include <string.h>
struct vty;
@@ -17,6 +18,11 @@ struct handover_cfg *ho_cfg_init(void *ctx, struct handover_cfg *higher_level_cf
#define HO_CFG_STR_WIN_RXQUAL HO_CFG_STR_WIN "Received-Quality averaging\n"
#define HO_CFG_STR_POWER_BUDGET HO_CFG_STR_HANDOVER "Neighbor cell power triggering\n" "Neighbor cell power triggering\n"
#define HO_CFG_STR_AVG_COUNT "Number of values to average over\n"
+#define HO_CFG_STR_2 " (HO algo 2 only)\n"
+#define HO_CFG_STR_MIN "Minimum Level/Quality thresholds before triggering HO" HO_CFG_STR_2
+#define HO_CFG_STR_AFS_BIAS "Configure bias to prefer AFS (AMR on TCH/F) over other codecs" HO_CFG_STR_2
+#define HO_CFG_STR_MIN_TCH "Minimum free TCH timeslots before cell is considered congested" HO_CFG_STR_2
+#define HO_CFG_STR_PENALTY_TIME "Set penalty times to wait between repeated handovers" HO_CFG_STR_2
#define as_is(x) (x)
@@ -30,6 +36,33 @@ static inline int bool2i(bool arg)
return arg? 1 : 0;
}
+static inline bool a2tdma(const char *arg)
+{
+ if (!strcmp(arg, "full"))
+ return true;
+ return false;
+}
+
+static inline const char *tdma2a(bool val)
+{
+ return val? "full" : "subset";
+}
+
+static inline const int a2congestion_check_interval(const char *arg)
+{
+ if (!strcmp(arg, "disabled"))
+ return 0;
+ return atoi(arg);
+}
+
+static inline const char *congestion_check_interval2a(int val)
+{
+ static char str[9];
+ if (val < 1
+ || snprintf(str, sizeof(str), "%d", val) >= sizeof(str))
+ return "disabled";
+ return str;
+}
/* The HO_CFG_ONE_MEMBER macro gets redefined, depending on whether to define struct members,
* function declarations or definitions... It is of the format
@@ -106,7 +139,104 @@ static inline int bool2i(bool arg)
"Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n" \
"Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n" \
"Maximum Timing-Advance value (i.e. MS distance) before triggering HO\n") \
-
+ \
+ HO_CFG_ONE_MEMBER(bool, as_active, 0, \
+ "handover assignment", "0|1", a2bool, "%d", bool2i, \
+ HO_CFG_STR_HANDOVER \
+ "Enable or disable in-call channel re-assignment" HO_CFG_STR_2 \
+ "Disable in-call assignment\n" \
+ "Enable in-call assignment\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, congestion_check_interval, 10, \
+ "handover congestion-check", "disabled|<1-60>", \
+ a2congestion_check_interval, "%s", congestion_check_interval2a, \
+ HO_CFG_STR_HANDOVER \
+ "Configure congestion check interval" HO_CFG_STR_2 \
+ "Disable congestion checking, do not handover based on cell overload\n" \
+ "Congestion check interval in seconds\n") \
+ \
+ HO_CFG_ONE_MEMBER(bool, full_tdma, subset, \
+ "handover tdma-measurement", "full|subset", a2tdma, "%s", tdma2a, \
+ HO_CFG_STR_HANDOVER \
+ "Define measurement set of TDMA frames" HO_CFG_STR_2 \
+ "Full set of 102/104 TDMA frames\n" \
+ "Sub set of 4 TDMA frames (SACCH)\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, min_rxlev, -100, \
+ "handover min rxlev", "<-110--50>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ HO_CFG_STR_MIN \
+ "How weak may RxLev of an MS become before triggering HO\n" \
+ "minimum RxLev (dBm)\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, min_rxqual, 5, \
+ "handover min rxqual", "<0-7>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ HO_CFG_STR_MIN \
+ "How bad may RxQual of an MS become before triggering HO\n" \
+ "minimum RxQual (dBm)\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, afs_bias_rxlev, 0, \
+ "handover afs-bias rxlev", "<0-20>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ HO_CFG_STR_AFS_BIAS \
+ "RxLev improvement bias for AFS over other codecs\n" \
+ "Virtual RxLev improvement (dBm)\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, afs_bias_rxqual, 0, \
+ "handover afs-bias rxqual", "<0-7>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ HO_CFG_STR_AFS_BIAS \
+ "RxQual improvement bias for AFS over other codecs\n" \
+ "Virtual RxQual improvement (dBm)\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, tchf_min_slots, 0, \
+ "handover min-free-slots tch/f", "<0-9999>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ HO_CFG_STR_MIN_TCH \
+ "Minimum free TCH/F timeslots before cell is considered congested\n" \
+ "Number of TCH/F slots\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, tchh_min_slots, 0, \
+ "handover min-free-slots tch/h", "<0-9999>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ HO_CFG_STR_MIN_TCH \
+ "Minimum free TCH/H timeslots before cell is considered congested\n" \
+ "Number of TCH/H slots\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, ho_max, 9999, \
+ "handover max-handovers", "<1-9999>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ "Maximum number of concurrent handovers allowed per cell" HO_CFG_STR_2 \
+ "Number\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, penalty_max_dist, 300, \
+ "handover penalty-time max-distance", "<0-99999>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ HO_CFG_STR_PENALTY_TIME \
+ "Time to suspend handovers after leaving this cell due to exceeding max distance\n" \
+ "Seconds\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, penalty_failed_ho, 60, \
+ "handover penalty-time failed-ho", "<0-99999>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ HO_CFG_STR_PENALTY_TIME \
+ "Time to suspend handovers after handover failure to this cell\n" \
+ "Seconds\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, penalty_failed_as, 60, \
+ "handover penalty-time failed-assignment", "<0-99999>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ HO_CFG_STR_PENALTY_TIME \
+ "Time to suspend handovers after assignment failure in this cell\n" \
+ "Seconds\n") \
+ \
+ HO_CFG_ONE_MEMBER(int, retries, 0, \
+ "handover retries", "<0-9>", atoi, "%d", as_is, \
+ HO_CFG_STR_HANDOVER \
+ "Immediately retry on handover/assignment failure" HO_CFG_STR_2 \
+ "Number of retries\n") \
+
/* Declare public API for handover cfg parameters... */
diff --git a/tests/handover_cfg.vty b/tests/handover_cfg.vty
index e181797f6..5d5db059c 100644
--- a/tests/handover_cfg.vty
+++ b/tests/handover_cfg.vty
@@ -143,30 +143,75 @@ network
handover power budget interval 23
... !handover
+OsmoBSC(config-net-bts)# ### Verify that 'min rxlev' value range stops at -50
+OsmoBSC(config-net-bts)# handover min rxlev ?
+ <-110--50> minimum RxLev (dBm)
+ default Use default (-100), remove explicit setting on this node
+OsmoBSC(config-net-bts)# handover min rxlev -111
+% Unknown command.
+OsmoBSC(config-net-bts)# handover min rxlev -110
+OsmoBSC(config-net-bts)# handover min rxlev -50
+OsmoBSC(config-net-bts)# handover min rxlev -49
+% Unknown command.
+OsmoBSC(config-net-bts)# handover min rxlev 50
+% Unknown command.
+OsmoBSC(config-net-bts)# handover min rxlev default
+% 'handover min rxlev' setting removed, now is -100
+
OsmoBSC(config-net-bts)# ### Checking online help
OsmoBSC(config-net-bts)# exit
OsmoBSC(config-net)# list
...
handover (0|1|default)
+ handover algorithm (1|2|default)
handover window rxlev averaging (<1-10>|default)
handover window rxqual averaging (<1-10>|default)
handover window rxlev neighbor averaging (<1-10>|default)
handover power budget interval (<1-99>|default)
handover power budget hysteresis (<0-999>|default)
handover maximum distance (<0-9999>|default)
+ handover assignment (0|1|default)
+ handover congestion-check (disabled|<1-60>|default)
+ handover tdma-measurement (full|subset|default)
+ handover min rxlev (<-110--50>|default)
+ handover min rxqual (<0-7>|default)
+ handover afs-bias rxlev (<0-20>|default)
+ handover afs-bias rxqual (<0-7>|default)
+ handover min-free-slots tch/f (<0-9999>|default)
+ handover min-free-slots tch/h (<0-9999>|default)
+ handover max-handovers (<1-9999>|default)
+ handover penalty-time max-distance (<0-99999>|default)
+ handover penalty-time failed-ho (<0-99999>|default)
+ handover penalty-time failed-assignment (<0-99999>|default)
+ handover retries (<0-9>|default)
...
OsmoBSC(config-net)# handover?
handover Handover options
OsmoBSC(config-net)# handover ?
- 0 Disable in-call handover
- 1 Enable in-call handover
- default Enable/disable handover: Use default (0), remove explicit setting on this node
- window Measurement averaging settings
- power Neighbor cell power triggering
- maximum Maximum Timing-Advance value (i.e. MS distance) before triggering HO
+ 0 Disable in-call handover
+ 1 Enable in-call handover
+ default Enable/disable handover: Use default (0), remove explicit setting on this node
+ algorithm Choose algorithm for handover decision
+ window Measurement averaging settings
+ power Neighbor cell power triggering
+ maximum Maximum Timing-Advance value (i.e. MS distance) before triggering HO
+ assignment Enable or disable in-call channel re-assignment (HO algo 2 only)
+ congestion-check Configure congestion check interval (HO algo 2 only)
+ tdma-measurement Define measurement set of TDMA frames (HO algo 2 only)
+ min Minimum Level/Quality thresholds before triggering HO (HO algo 2 only)
+ afs-bias Configure bias to prefer AFS (AMR on TCH/F) over other codecs (HO algo 2 only)
+ min-free-slots Minimum free TCH timeslots before cell is considered congested (HO algo 2 only)
+ max-handovers Maximum number of concurrent handovers allowed per cell (HO algo 2 only)
+ penalty-time Set penalty times to wait between repeated handovers (HO algo 2 only)
+ retries Immediately retry on handover/assignment failure (HO algo 2 only)
+
+OsmoBSC(config-net)# handover algorithm ?
+ 1 Algorithm 1: trigger handover based on comparing current cell and neighbor RxLev and RxQual, only.
+ 2 Algorithm 2: trigger handover on RxLev/RxQual, and also to balance the load across several cells. Consider available codecs. Prevent repeated handover by penalty timers.
+ default Use default (1), remove explicit setting on this node
OsmoBSC(config-net)# handover window ?
rxlev Received-Level averaging
@@ -216,6 +261,85 @@ OsmoBSC(config-net)# handover maximum distance ?
<0-9999> Maximum Timing-Advance value (i.e. MS distance) before triggering HO
default Use default (9999), remove explicit setting on this node
+OsmoBSC(config-net)# handover congestion-check ?
+ disabled Disable congestion checking, do not handover based on cell overload
+ <1-60> Congestion check interval in seconds
+ default Use default (10), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover assignment ?
+ 0 Disable in-call assignment
+ 1 Enable in-call assignment
+ default Use default (0), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover tdma-measurement ?
+ full Full set of 102/104 TDMA frames
+ subset Sub set of 4 TDMA frames (SACCH)
+ default Use default (subset), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover min ?
+ rxlev How weak may RxLev of an MS become before triggering HO
+ rxqual How bad may RxQual of an MS become before triggering HO
+
+OsmoBSC(config-net)# handover min rxlev ?
+ <-110--50> minimum RxLev (dBm)
+ default Use default (-100), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover min rxqual ?
+ <0-7> minimum RxQual (dBm)
+ default Use default (5), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover afs-bias ?
+ rxlev RxLev improvement bias for AFS over other codecs
+ rxqual RxQual improvement bias for AFS over other codecs
+
+OsmoBSC(config-net)# handover afs-bias rxlev ?
+ <0-20> Virtual RxLev improvement (dBm)
+ default Use default (0), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover afs-bias rxqual ?
+ <0-7> Virtual RxQual improvement (dBm)
+ default Use default (0), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover min-free-slots ?
+ tch/f Minimum free TCH/F timeslots before cell is considered congested
+ tch/h Minimum free TCH/H timeslots before cell is considered congested
+
+OsmoBSC(config-net)# handover min-free-slots tch/f ?
+ <0-9999> Number of TCH/F slots
+ default Use default (0), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover min-free-slots TCH/F ?
+% There is no matched command.
+
+OsmoBSC(config-net)# handover min-free-slots tch/h ?
+ <0-9999> Number of TCH/H slots
+ default Use default (0), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover max-handovers ?
+ <1-9999> Number
+ default Use default (9999), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover penalty-time ?
+ max-distance Time to suspend handovers after leaving this cell due to exceeding max distance
+ failed-ho Time to suspend handovers after handover failure to this cell
+ failed-assignment Time to suspend handovers after assignment failure in this cell
+
+OsmoBSC(config-net)# handover penalty-time max-distance ?
+ <0-99999> Seconds
+ default Use default (300), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover penalty-time failed-ho ?
+ <0-99999> Seconds
+ default Use default (60), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover penalty-time failed-assignment ?
+ <0-99999> Seconds
+ default Use default (60), remove explicit setting on this node
+
+OsmoBSC(config-net)# handover retries ?
+ <0-9> Number of retries
+ default Use default (0), remove explicit setting on this node
+
OsmoBSC(config-net)# ### Same on BTS level
OsmoBSC(config-net)# bts 0
@@ -223,12 +347,27 @@ OsmoBSC(config-net-bts)# handover?
handover Handover options
OsmoBSC(config-net-bts)# handover ?
- 0 Disable in-call handover
- 1 Enable in-call handover
- default Enable/disable handover: Use default (0), remove explicit setting on this node
- window Measurement averaging settings
- power Neighbor cell power triggering
- maximum Maximum Timing-Advance value (i.e. MS distance) before triggering HO
+ 0 Disable in-call handover
+ 1 Enable in-call handover
+ default Enable/disable handover: Use default (0), remove explicit setting on this node
+ algorithm Choose algorithm for handover decision
+ window Measurement averaging settings
+ power Neighbor cell power triggering
+ maximum Maximum Timing-Advance value (i.e. MS distance) before triggering HO
+ assignment Enable or disable in-call channel re-assignment (HO algo 2 only)
+ congestion-check Configure congestion check interval (HO algo 2 only)
+ tdma-measurement Define measurement set of TDMA frames (HO algo 2 only)
+ min Minimum Level/Quality thresholds before triggering HO (HO algo 2 only)
+ afs-bias Configure bias to prefer AFS (AMR on TCH/F) over other codecs (HO algo 2 only)
+ min-free-slots Minimum free TCH timeslots before cell is considered congested (HO algo 2 only)
+ max-handovers Maximum number of concurrent handovers allowed per cell (HO algo 2 only)
+ penalty-time Set penalty times to wait between repeated handovers (HO algo 2 only)
+ retries Immediately retry on handover/assignment failure (HO algo 2 only)
+
+OsmoBSC(config-net-bts)# handover algorithm ?
+ 1 Algorithm 1: trigger handover based on comparing current cell and neighbor RxLev and RxQual, only.
+ 2 Algorithm 2: trigger handover on RxLev/RxQual, and also to balance the load across several cells. Consider available codecs. Prevent repeated handover by penalty timers.
+ default Use default (1), remove explicit setting on this node
OsmoBSC(config-net-bts)# handover window ?
rxlev Received-Level averaging
@@ -277,3 +416,82 @@ OsmoBSC(config-net-bts)# handover maximum ?
OsmoBSC(config-net-bts)# handover maximum distance ?
<0-9999> Maximum Timing-Advance value (i.e. MS distance) before triggering HO
default Use default (9999), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover congestion-check ?
+ disabled Disable congestion checking, do not handover based on cell overload
+ <1-60> Congestion check interval in seconds
+ default Use default (10), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover assignment ?
+ 0 Disable in-call assignment
+ 1 Enable in-call assignment
+ default Use default (0), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover tdma-measurement ?
+ full Full set of 102/104 TDMA frames
+ subset Sub set of 4 TDMA frames (SACCH)
+ default Use default (subset), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover min ?
+ rxlev How weak may RxLev of an MS become before triggering HO
+ rxqual How bad may RxQual of an MS become before triggering HO
+
+OsmoBSC(config-net-bts)# handover min rxlev ?
+ <-110--50> minimum RxLev (dBm)
+ default Use default (-100), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover min rxqual ?
+ <0-7> minimum RxQual (dBm)
+ default Use default (5), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover afs-bias ?
+ rxlev RxLev improvement bias for AFS over other codecs
+ rxqual RxQual improvement bias for AFS over other codecs
+
+OsmoBSC(config-net-bts)# handover afs-bias rxlev ?
+ <0-20> Virtual RxLev improvement (dBm)
+ default Use default (0), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover afs-bias rxqual ?
+ <0-7> Virtual RxQual improvement (dBm)
+ default Use default (0), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover min-free-slots ?
+ tch/f Minimum free TCH/F timeslots before cell is considered congested
+ tch/h Minimum free TCH/H timeslots before cell is considered congested
+
+OsmoBSC(config-net-bts)# handover min-free-slots tch/f ?
+ <0-9999> Number of TCH/F slots
+ default Use default (0), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover min-free-slots TCH/F ?
+% There is no matched command.
+
+OsmoBSC(config-net-bts)# handover min-free-slots tch/h ?
+ <0-9999> Number of TCH/H slots
+ default Use default (0), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover max-handovers ?
+ <1-9999> Number
+ default Use default (9999), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover penalty-time ?
+ max-distance Time to suspend handovers after leaving this cell due to exceeding max distance
+ failed-ho Time to suspend handovers after handover failure to this cell
+ failed-assignment Time to suspend handovers after assignment failure in this cell
+
+OsmoBSC(config-net-bts)# handover penalty-time max-distance ?
+ <0-99999> Seconds
+ default Use default (300), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover penalty-time failed-ho ?
+ <0-99999> Seconds
+ default Use default (60), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover penalty-time failed-assignment ?
+ <0-99999> Seconds
+ default Use default (60), remove explicit setting on this node
+
+OsmoBSC(config-net-bts)# handover retries ?
+ <0-9> Number of retries
+ default Use default (0), remove explicit setting on this node