aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/manuals/vty/osmo-pcu_vty_reference.xml11
-rw-r--r--src/bts.cpp1
-rw-r--r--src/bts.h1
-rw-r--r--src/pcu_vty.c30
-rw-r--r--src/tbf_dl.cpp2
5 files changed, 44 insertions, 1 deletions
diff --git a/doc/manuals/vty/osmo-pcu_vty_reference.xml b/doc/manuals/vty/osmo-pcu_vty_reference.xml
index cc8fffae..ea2d674a 100644
--- a/doc/manuals/vty/osmo-pcu_vty_reference.xml
+++ b/doc/manuals/vty/osmo-pcu_vty_reference.xml
@@ -1807,6 +1807,17 @@
<param name='dl-tbf-idle-time' doc='keep an idle DL TBF alive for the time given' />
</params>
</command>
+ <command id='dl-tbf-preemptive-retransmission'>
+ <params>
+ <param name='dl-tbf-preemptive-retransmission' doc='retransmit blocks even before the MS had a chance to receive them (better throughput, less readable traces) (enabled by default)' />
+ </params>
+ </command>
+ <command id='no dl-tbf-preemptive-retransmission'>
+ <params>
+ <param name='no' doc='Negate a command or set its defaults' />
+ <param name='dl-tbf-preemptive-retransmission' doc='retransmit blocks even before the MS had a chance to receive them (better throughput, less readable traces)' />
+ </params>
+ </command>
<command id='ms-idle-time &lt;1-7200&gt;'>
<params>
<param name='ms-idle-time' doc='keep an idle MS object alive for the time given' />
diff --git a/src/bts.cpp b/src/bts.cpp
index 26dd4015..60f74dd6 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) {
diff --git a/src/bts.h b/src/bts.h
index 767605cd..45d52a97 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -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 1e4f50c2..a566e735 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 "retransmit 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 d5e4a455..510a65c5 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 (bts->bts_data()->dl_tbf_preemptive_retransmission && !m_window.window_empty()) {
LOGPTBFDL(this, LOGL_DEBUG,
"Restarting at BSN %d, because all blocks have been transmitted (FLOW).\n",
m_window.v_a());