diff options
author | Oliver Smith <osmith@sysmocom.de> | 2019-09-05 15:12:20 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2019-09-05 15:36:37 +0200 |
commit | ca581d5d0c619c467ad54cbe5f65a87cb8fe68e3 (patch) | |
tree | 4639fefde09377002c18e0010001c90bb76f2c84 | |
parent | ee8edd9e33483daec7675a2e6c27ce07cefa5396 (diff) |
tbf_dl: make preemptive re-transmission optionalosmith/preemptive-retransmission
Since [1], OsmoPCU already starts to re-transmit downlink blocks before
the MS has had a chance to receive them and/or send the related
acknowledgement in uplink. Make this optional with the new VTY option
"no dl-tbf-preemptive-retransmission".
[1] e25b5b91f60f20f61096bc6199a05b58ee6c6328 ("tbf: Only create dummy frames if necessary")
Related: OS#2408
Change-Id: Id08aed513d4033aa0d4324c6ce07cbb2852f2f92
-rw-r--r-- | src/bts.cpp | 1 | ||||
-rw-r--r-- | src/bts.h | 1 | ||||
-rw-r--r-- | src/pcu_vty.c | 30 | ||||
-rw-r--r-- | src/tbf_dl.cpp | 2 |
4 files changed, 33 insertions, 1 deletions
diff --git a/src/bts.cpp b/src/bts.cpp index 26dd401..60f74dd 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -216,6 +216,7 @@ BTS::BTS() { memset(&m_bts, 0, sizeof(m_bts)); m_bts.bts = this; + m_bts.dl_tbf_preemptive_retransmission = true; /* initialize back pointers */ for (size_t trx_no = 0; trx_no < ARRAY_SIZE(m_bts.trx); ++trx_no) { @@ -135,6 +135,7 @@ struct gprs_rlcmac_bts { uint8_t alpha, gamma; uint8_t egprs_enabled; uint32_t dl_tbf_idle_msec; /* hold time for idle DL TBFs */ + bool dl_tbf_preemptive_retransmission; uint8_t si13[GSM_MACBLOCK_LEN]; bool si13_is_set; /* 0 to support resegmentation in DL, 1 for no reseg */ diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 1e4f50c..f444e41 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -254,6 +254,8 @@ static int config_write_pcu(struct vty *vty) if (bts->dl_tbf_idle_msec) vty_out(vty, " dl-tbf-idle-time %d%s", bts->dl_tbf_idle_msec, VTY_NEWLINE); + if (!bts->dl_tbf_preemptive_retransmission) + vty_out(vty, " no dl-tbf-preemptive-retransmission%s", VTY_NEWLINE); if (strcmp(bts->pcu_sock_path, PCU_SOCK_DEFAULT)) vty_out(vty, " pcu-socket %s%s", bts->pcu_sock_path, VTY_NEWLINE); @@ -870,6 +872,32 @@ DEFUN(cfg_pcu_no_dl_tbf_idle_time, return CMD_SUCCESS; } +#define RETRANSMISSION_STR "re-transmit blocks even before the MS had a chance to receive them (better throughput," \ + " less readable traces)" +DEFUN(cfg_pcu_dl_tbf_preemptive_retransmission, + cfg_pcu_dl_tbf_preemptive_retransmission_cmd, + "dl-tbf-preemptive-retransmission", + RETRANSMISSION_STR " (enabled by default)") +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + + bts->dl_tbf_preemptive_retransmission = true; + + return CMD_SUCCESS; +} + +DEFUN(cfg_pcu_no_dl_tbf_preemptive_retransmission, + cfg_pcu_no_dl_tbf_preemptive_retransmission_cmd, + "no dl-tbf-preemptive-retransmission", + NO_STR RETRANSMISSION_STR) +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + + bts->dl_tbf_preemptive_retransmission = false; + + return CMD_SUCCESS; +} + #define MS_IDLE_TIME_STR "keep an idle MS object alive for the time given\n" DEFUN(cfg_pcu_ms_idle_time, cfg_pcu_ms_idle_time_cmd, @@ -1215,6 +1243,8 @@ int pcu_vty_init(void) install_element(PCU_NODE, &cfg_pcu_gamma_cmd); install_element(PCU_NODE, &cfg_pcu_dl_tbf_idle_time_cmd); install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_idle_time_cmd); + install_element(PCU_NODE, &cfg_pcu_dl_tbf_preemptive_retransmission_cmd); + install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_preemptive_retransmission_cmd); install_element(PCU_NODE, &cfg_pcu_ms_idle_time_cmd); install_element(PCU_NODE, &cfg_pcu_no_ms_idle_time_cmd); install_element(PCU_NODE, &cfg_pcu_gsmtap_categ_cmd); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index d5e4a45..71fde66 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -431,7 +431,7 @@ int gprs_rlcmac_dl_tbf::take_next_bsn(uint32_t fn, m_window.v_s(), mcs_name(new_cs)); bsn = create_new_bsn(fn, new_cs); - } else if (!m_window.window_empty()) { + } else if (!m_window.window_empty() && bts->bts_data()->dl_tbf_preemptive_retransmission) { LOGPTBFDL(this, LOGL_DEBUG, "Restarting at BSN %d, because all blocks have been transmitted (FLOW).\n", m_window.v_a()); |