aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-24 11:04:19 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-25 12:12:29 +0100
commitc4952091223e10d9e99fa035e6942656d233aa16 (patch)
treeb9a769c95acbc61f493128894d7c9cc67dfdef58 /src
parent005ee7f8626d4733e8fa01f3589154287ed163ed (diff)
tbf: Use put_frame in append_data if the TBF has no data
Currently if append_data() is used when there is no LLC data in the DL TBF, it will either call reuse_tbf() which in turn will call put_frame(), or it will append the LLC message to the queue, even if the queue and the frame buffer are empty. This only happens with the test case so far, but this would change when idle DL TBFs are kept open for some time. It results in empty LLC message being sent to the MS (see log below). This commit changes append_data to check for this case and to eventually use put_frame() instead of appending the LLC data to the queue. Addresses: TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) downlink (V(A)==0 .. V(S)==0) - Sending new block at BSN 0 -- Chunk with length 0 is less than remaining space (20): add length header to to delimit LLC frame Complete DL frame for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW)len=0 - Dequeue next LLC for TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=FLOW) (len=200) Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/tbf_dl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 0630ba17..c894f5eb 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -71,6 +71,10 @@ int gprs_rlcmac_dl_tbf::append_data(const uint8_t ms_class,
"(T3193), so reuse TBF\n", tbf_name(this));
tbf_update_ms_class(this, ms_class);
reuse_tbf(data, len);
+ } else if (!have_data()) {
+ m_llc.put_frame(data, len);
+ bts->llc_frame_sched();
+ tbf_update_ms_class(this, ms_class);
} else {
/* the TBF exists, so we must write it in the queue
* we prepend lifetime in front of PDU */