aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-13 18:36:56 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-13 19:51:50 +0200
commit04e72d34f5cf885a4d6e2e6b2f2575ad09d0c007 (patch)
tree3cd68d0ce78f6cfdbcd7fd3a0f449b87c8d147b3 /src
parent6eed1911fd619fb594a9d1a7fc734c1f62ff2f08 (diff)
tbf: Always start T3193 when changing state to GPRS_RLCMAC_WAIT_RELEASE
Currently when receiving a PACKET DL ACK/NACK message with the Final Ack Indicator bit set, the TBF's state is set to GPRS_RLCMAC_WAIT_RELEASE but T3193 is only started when the LLC queue is empty. Otherwise the reuse_tbf() method is called to establish a new DL TBF. In that case, the timer is not started. This will leave the current TBF without a timer so it is potentially not released later on. This is recognisable by sticky entries in the output of the 'show tbf all' command and possibly allocation failures if there are too many of them. This commit changes the code to always start T3193 to make sure, that a timer is always active when the the state is set to GPRS_RLCMAC_WAIT_RELEASE. Note that TS 44.060, 9.3.2.6 requests to release the 'old' TBF immediately in some cases, which is not implemented by this change. This will lead to a longer reservation period of the TFI only, which is safer than reassigning it too early. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/tbf_dl.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 4739a50..01e6add 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -821,20 +821,16 @@ int gprs_rlcmac_dl_tbf::maybe_start_new_window()
set_state(GPRS_RLCMAC_WAIT_RELEASE);
+ /* start T3193 */
+ tbf_timer_start(this, 3193,
+ bts_data()->t3193_msec / 1000,
+ (bts_data()->t3193_msec % 1000) * 1000);
+
/* check for LLC PDU in the LLC Queue */
- if (!have_data()) {
- /* no message, start T3193, change state to RELEASE */
- LOGP(DRLCMACDL, LOGL_DEBUG, "- No new message, so we release.\n");
- /* start T3193 */
- tbf_timer_start(this, 3193,
- bts_data()->t3193_msec / 1000,
- (bts_data()->t3193_msec % 1000) * 1000);
-
- return 0;
- }
+ if (have_data())
+ /* we have more data so we will re-use this tbf */
+ reuse_tbf();
- /* we have more data so we will re-use this tbf */
- reuse_tbf();
return 0;
}