diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-08-21 18:30:05 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-08-21 19:02:18 +0200 |
commit | e0b21f41c2b66d3f06a9aea5ac397857832671c8 (patch) | |
tree | e7d171dfbe304e4daf6cee437925422b3fac1dcf | |
parent | 257b630216f0dc702013ecc51ac680b5296ae898 (diff) |
tbf: Move pending LLC frames when merging MS objects
Currently the pending LLC packets are lost in some cases when MS
objects are merged, for instance after a RACH when there were 2 MS
object for the same MS (they get merged, when the TLLI is known for
both objects).
This patch modifies GprsMs::merge_old_ms to move all pending LLC
packets (if there are any) to the current MS object.
Sponsored-by: On-Waves ehf
-rw-r--r-- | src/gprs_ms.cpp | 2 | ||||
-rw-r--r-- | tests/tbf/TbfTest.cpp | 2 | ||||
-rw-r--r-- | tests/tbf/TbfTest.err | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp index a5a6cfda..cb7773fc 100644 --- a/src/gprs_ms.cpp +++ b/src/gprs_ms.cpp @@ -322,6 +322,8 @@ void GprsMs::merge_old_ms(GprsMs *old_ms) if (!ms_class() && old_ms->ms_class()) set_ms_class(old_ms->ms_class()); + m_llc_queue.move_and_merge(&old_ms->m_llc_queue); + old_ms->reset(); } diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 6f9a8ba7..03c01688 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -936,7 +936,7 @@ static void test_tbf_dl_flow_and_rach_single_phase() OSMO_ASSERT(ms->dl_tbf() == dl_tbf); /* No queued packets should be lost */ - /* OSMO_ASSERT(ms->llc_queue()->size() == 2); */ + OSMO_ASSERT(ms->llc_queue()->size() == 2); printf("=== end %s ===\n", __func__); } diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index caf35e71..15d2efe2 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1932,4 +1932,4 @@ No bctx TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) changes state from FLOW to FINISHED - Scheduling Ack/Nack, because TLLI is included. - Scheduling Ack/Nack, because last block has CV==0. -New MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 0 +New MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 2 |