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
This commit is contained in:
Jacob Erlbeck 2015-08-21 18:30:05 +02:00
parent 257b630216
commit e0b21f41c2
3 changed files with 4 additions and 2 deletions

View File

@ -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();
}

View File

@ -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__);
}

View File

@ -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