Change in ...osmo-pcu[master]: tbf_dl: make preemptive retransmission optional

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Wed Sep 11 06:16:30 UTC 2019


osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-pcu/+/15423 )

Change subject: tbf_dl: make preemptive retransmission optional
......................................................................

tbf_dl: make preemptive retransmission optional

Since [1], OsmoPCU already starts to retransmit 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
---
M doc/manuals/vty/osmo-pcu_vty_reference.xml
M src/bts.cpp
M src/bts.h
M src/pcu_vty.c
M src/tbf_dl.cpp
5 files changed, 44 insertions(+), 1 deletion(-)

Approvals:
  osmith: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/doc/manuals/vty/osmo-pcu_vty_reference.xml b/doc/manuals/vty/osmo-pcu_vty_reference.xml
index cc8fffa..ea2d674 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 <1-7200>'>
       <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 26dd401..60f74dd 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -216,6 +216,7 @@
 {
 	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 767605c..45d52a9 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -135,6 +135,7 @@
 	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..a566e73 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -254,6 +254,8 @@
 	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 @@
 	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 @@
 	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..510a65c 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -431,7 +431,7 @@
 			  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());

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/15423
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Id08aed513d4033aa0d4324c6ce07cbb2852f2f92
Gerrit-Change-Number: 15423
Gerrit-PatchSet: 5
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190911/eeb4835a/attachment.htm>


More information about the gerrit-log mailing list