aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf_dl.cpp
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-11-27 14:51:27 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-12-01 15:57:37 +0100
commit7d0f9a0ec383fcfca934731bd6979b6be6629c90 (patch)
treec359d5cd883253dd0c7c5f0d7cf0c5a218b7a5a5 /src/tbf_dl.cpp
parent30d9a5989e939f665623d998eb2f772c5dd91598 (diff)
Dl TBF: Get rid of LLC UI dummy blocks following other data
According to: * 3GPP TS 44.060 version 16.0.0 "9.3.1a Delayed release of downlink Temporary Block Flow" * 3GPP TS 44.064 version 16.0.0 "6.4.2.2 Unconfirmed Information (UI) Dummy command" LLC UI Dummy frames are to be used when there no more data to send, only in order to delay the release of a TBF. Hence, while not incorrect per se, makes no sense to send those LLC UI Dummy frames inserted into rlcmac blocks which already contain other LLC frames, since the MS in that case is already being kept active. It only makes sense to send those LLC UI Dummy frames when we have nothing else to send, that is, alone inside a RLCMAC block without other LLC frames. Related: OS#4849 Change-Id: Ifae1a7b2b3dfad8df19585063088ba0df2749c8f
Diffstat (limited to 'src/tbf_dl.cpp')
-rw-r--r--src/tbf_dl.cpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index ad98510c..bb89e819 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -694,9 +694,33 @@ int gprs_rlcmac_dl_tbf::create_new_bsn(const uint32_t fn, enum CodingScheme cs)
int payload_written = 0;
if (m_llc.frame_length() == 0) {
- /* nothing to sent - delay the release of the TBF */
+ /* It is not clear, when the next real data will
+ * arrive, so request a DL ack/nack now */
+ request_dl_ack();
int space = block_data_len - write_offset;
+
+ if (num_chunks != 0) {
+ /* Nothing to send, and we already put some data in
+ * rlcmac data block, we are done */
+ LOGPTBFDL(this, LOGL_DEBUG,
+ "LLC queue completely drained and there's "
+ "still %d free bytes in rlcmac data block\n", space);
+ if (mcs_is_edge(cs)) {
+ /* in EGPRS there's no M bit, so we need
+ * to flag padding with LI=127 */
+ Encoding::rlc_data_to_dl_append_egprs_li_padding(rdbi,
+ &write_offset,
+ &num_chunks,
+ data);
+ }
+ break;
+ }
+
+ /* Nothing to send from upper layers (LLC), but still
+ * requested to send something to MS to delay the
+ * release of the TBF. See 3GPP TS 44.060 9.3.1a
+ * "Delayed release of downlink Temporary Block Flow" */
/* A header will need to by added, so we just need
* space-1 octets */
m_llc.put_dummy_frame(space - 1);
@@ -705,10 +729,6 @@ int gprs_rlcmac_dl_tbf::create_new_bsn(const uint32_t fn, enum CodingScheme cs)
if (m_last_dl_drained_fn < 0)
m_last_dl_drained_fn = fn;
- /* It is not clear, when the next real data will
- * arrive, so request a DL ack/nack now */
- request_dl_ack();
-
LOGPTBFDL(this, LOGL_DEBUG,
"Empty chunk, added LLC dummy command of size %d, drained_since=%d\n",
m_llc.frame_length(), frames_since_last_drain(fn));