aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-04 15:12:10 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-08 09:40:35 +0200
commit8322d08071d740b033941271d584a52d25565a94 (patch)
treeb24d9cffaee20338f6ea9b2eb8573b20f4a162ea
parenta17fccbcf47bff8f0cca7f3f02d55d63cf5b4d01 (diff)
tbf: Add adaptive coding scheme configuration
This commit adds the following VTY commands to config-pcu: - cs threshold <0-100> <0-100> Enables adaptive CS selection - no cs threshold Disables it The "cs threshold LOW HIGH" command sets the water marks (cs_adj_lower_limit and cs_adj_upper_limit) used to decide about switching coding schemes. Ticket: #1739 Sponsored-by: On-Waves ehf
-rw-r--r--src/pcu_vty.c54
1 files changed, 52 insertions, 2 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 8c2a8d8..df1e5a4 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -75,6 +75,13 @@ static int config_write_pcu(struct vty *vty)
vty_out(vty, " cs %d %d%s", bts->initial_cs_dl,
bts->initial_cs_ul, VTY_NEWLINE);
}
+ if (bts->cs_adj_enabled)
+ vty_out(vty, " cs threshold %d %d%s",
+ bts->cs_adj_lower_limit, bts->cs_adj_upper_limit,
+ VTY_NEWLINE);
+ else
+ vty_out(vty, " no cs threshold%s", VTY_NEWLINE);
+
if (bts->force_llc_lifetime == 0xffff)
vty_out(vty, " queue lifetime infinite%s", VTY_NEWLINE);
else if (bts->force_llc_lifetime)
@@ -249,12 +256,14 @@ DEFUN(cfg_pcu_no_fc_bucket_time,
return CMD_SUCCESS;
}
+#define CS_STR "Coding Scheme configuration\n"
DEFUN(cfg_pcu_cs,
cfg_pcu_cs_cmd,
"cs <1-4> [<1-4>]",
- "Set the Coding Scheme to be used, (overrides BTS config)\n"
- "Initial CS used\nAlternative uplink CS")
+ CS_STR
+ "Initial CS value to be used (overrides BTS config)\n"
+ "Use a different initial CS value for the uplink")
{
struct gprs_rlcmac_bts *bts = bts_main_data();
uint8_t cs = atoi(argv[0]);
@@ -510,6 +519,45 @@ DEFUN(cfg_pcu_no_ms_idle_time,
return CMD_SUCCESS;
}
+#define CS_ERR_LIMITS_STR "set limits for error rate based CS adjustment\n"
+DEFUN(cfg_pcu_cs_err_limits,
+ cfg_pcu_cs_err_limits_cmd,
+ "cs limits <0-100> <0-100>",
+ CS_STR CS_ERR_LIMITS_STR "lower limit in %\n" "upper limit in %\n")
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+
+ uint8_t lower_limit = atoi(argv[0]);
+ uint8_t upper_limit = atoi(argv[1]);
+
+ if (lower_limit > upper_limit) {
+ vty_out(vty,
+ "The lower limit must be less than or equal to the "
+ "upper limit.%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ bts->cs_adj_enabled = 1;
+ bts->cs_adj_upper_limit = upper_limit;
+ bts->cs_adj_lower_limit = lower_limit;
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_pcu_no_cs_err_limits,
+ cfg_pcu_no_cs_err_limits_cmd,
+ "no cs limits",
+ NO_STR CS_STR CS_ERR_LIMITS_STR)
+{
+ struct gprs_rlcmac_bts *bts = bts_main_data();
+
+ bts->cs_adj_enabled = 0;
+ bts->cs_adj_upper_limit = 100;
+ bts->cs_adj_lower_limit = 0;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(show_tbf,
show_tbf_cmd,
"show tbf all",
@@ -567,6 +615,8 @@ int pcu_vty_init(const struct log_info *cat)
install_element(PCU_NODE, &cfg_pcu_no_two_phase_cmd);
install_element(PCU_NODE, &cfg_pcu_cs_cmd);
install_element(PCU_NODE, &cfg_pcu_no_cs_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_queue_lifetime_cmd);
install_element(PCU_NODE, &cfg_pcu_queue_lifetime_inf_cmd);
install_element(PCU_NODE, &cfg_pcu_no_queue_lifetime_cmd);