aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tbf/TbfTest.cpp
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 /tests/tbf/TbfTest.cpp
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 'tests/tbf/TbfTest.cpp')
-rw-r--r--tests/tbf/TbfTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 39f57ad8..80bc8188 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -45,6 +45,10 @@ int16_t spoof_mnc = 0, spoof_mcc = 0;
static void check_tbf(gprs_rlcmac_tbf *tbf)
{
OSMO_ASSERT(tbf);
+ if (tbf->state_is(GPRS_RLCMAC_WAIT_RELEASE))
+ OSMO_ASSERT(tbf->T == 3191 || tbf->T == 3193);
+ if (tbf->state_is(GPRS_RLCMAC_RELEASING))
+ OSMO_ASSERT(tbf->T != 0);
}
/*