aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-12 10:52:34 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-22 10:39:06 +0200
commit70b96aa232bd9784a94247bf7b193cb2147ada9d (patch)
treed5abe0611be1107b6cabe58d8ba7195f5acda6d3 /src/pcu_vty.c
parent07eb655244bd973a9bdf69ef958ee06cf867a0bb (diff)
ms: Reduce DL CS level if only a few LLC bytes are left
If just a few bytes are left to send to the MS, it makes sense to reduce the coding scheme level to increase the throughput. This has been shown by Chen and Goodman in their paper "Theoretical Analysis of GPRS Throughput and Delay". See their throughput over C/I measurement graphs (figures 4 and 5 in the paper) for details. This commit implements a simplified CS downgrade feature for the downlink. The coding scheme will be downgraded if there are only a few octets are left to be send over the TBF (see the downgrade-threshold command below) and the NACK rate is not low (the CS will not get degraded on a high quality RF link). As an exception, CS-3 will be degraded to CS-1, since CS-2 does not improve the throughput in general when a few small packets are sent and the signal fades slowly (see Chen/Goodman). The following VTY command is added to the config-pcu node: - cs downgrade-threshold <1-10000> - cs no downgrade-threshold to set the threshold of the number of remaining bytes to be RLC/MAC encoded. The CS will only be reduced, if the number is below the threshold. The 'no' command disables this feature completely. The default value is 200 octets. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/pcu_vty.c')
-rw-r--r--src/pcu_vty.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 8db025e6..05c4b7a1 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -90,6 +90,12 @@ static int config_write_pcu(struct vty *vty)
else
vty_out(vty, " no cs threshold%s", VTY_NEWLINE);
+ if (bts->cs_downgrade_threshold)
+ vty_out(vty, " cs downgrade-threshold %d%s",
+ bts->cs_downgrade_threshold, VTY_NEWLINE);
+ else
+ vty_out(vty, " no cs downgrade-threshold%s", VTY_NEWLINE);
+
vty_out(vty, " cs link-quality-ranges cs1 %d cs2 %d %d cs3 %d %d cs4 %d%s",
bts->cs_lqual_ranges[0].high,
bts->cs_lqual_ranges[1].low,
@@ -609,6 +615,32 @@ DEFUN(cfg_pcu_no_cs_err_limits,
return CMD_SUCCESS;
}
+#define CS_DOWNGRADE_STR "set threshold for data size based CS downgrade\n"
+DEFUN(cfg_pcu_cs_downgrade_thrsh,
+ cfg_pcu_cs_downgrade_thrsh_cmd,
+ "cs downgrade-threshold <1-10000>",
+ CS_STR CS_DOWNGRADE_STR "downgrade if less octets left\n")
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+
+ bts->cs_downgrade_threshold = atoi(argv[0]);
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_pcu_no_cs_downgrade_thrsh,
+ cfg_pcu_no_cs_downgrade_thrsh_cmd,
+ "no cs downgrade-threshold",
+ CS_STR CS_DOWNGRADE_STR)
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+
+ bts->cs_downgrade_threshold = 0;
+
+ return CMD_SUCCESS;
+}
+
+
DEFUN(cfg_pcu_cs_lqual_ranges,
cfg_pcu_cs_lqual_ranges_cmd,
"cs link-quality-ranges cs1 <0-35> cs2 <0-35> <0-35> cs3 <0-35> <0-35> cs4 <0-35>",
@@ -729,6 +761,8 @@ int pcu_vty_init(const struct log_info *cat)
install_element(PCU_NODE, &cfg_pcu_no_cs_max_cmd);
install_element(PCU_NODE, &cfg_pcu_cs_err_limits_cmd);
install_element(PCU_NODE, &cfg_pcu_no_cs_err_limits_cmd);
+ install_element(PCU_NODE, &cfg_pcu_cs_downgrade_thrsh_cmd);
+ install_element(PCU_NODE, &cfg_pcu_no_cs_downgrade_thrsh_cmd);
install_element(PCU_NODE, &cfg_pcu_cs_lqual_ranges_cmd);
install_element(PCU_NODE, &cfg_pcu_queue_lifetime_cmd);
install_element(PCU_NODE, &cfg_pcu_queue_lifetime_inf_cmd);