aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-19 14:21:33 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-25 12:34:38 +0100
commite25b5b91f60f20f61096bc6199a05b58ee6c6328 (patch)
tree3bdb0254368f24536b6a093f25503a59d7bb934d
parent2cbe80b53e54b1ca832b2b30722ffacfa92f6117 (diff)
tbf: Only create dummy frames if necessary
Currently a lot of LLC dummy commands will be generated while waiting for an ACK for the DL TBF, even if there are blocks that could be resent instead. This patch modifies create_dl_acked_block to only call create_new_bsn() if there is unsent LLC data or m_window is empty. If the TBF is in state FLOW, no unsent LLC data is left, but there are blocks left in m_window, those are resent instead. Sponsored-by: On-Waves ehf
-rw-r--r--src/tbf_dl.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 65b164eb..dab733e5 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -275,8 +275,16 @@ do_resend:
"because all window is stalled.\n",
m_window.v_a());
bts->rlc_stalled();
+ } else if (have_data()) {
+ /* New blocks may be send */
+ return create_new_bsn(fn, ts);
+ } else if (!m_window.window_empty()) {
+ LOGP(DRLCMACDL, LOGL_DEBUG, "- Restarting at BSN %d, "
+ "because all blocks have been transmitted (FLOW).\n",
+ m_window.v_a());
+ bts->rlc_restarted();
} else {
- /* No blocks are left */
+ /* Nothing left to send, create dummy LLC commands */
return create_new_bsn(fn, ts);
}