tbf: Set ms in call to tbf_alloc_dl_tbf

The call to tbf_alloc_dl_tbf misses the pointer to the GprsMs object
which is already known in that case (tbf_reuse). This leads to a full
reallocation of the PDCH slots, which is possibly incompatible with
the old set of slots. This can result in hanging TCP connections and
TCP connection failures.

This commit replaces the old NULL value by the actual GprsMs object.
Since the set_ms() is also done within the tbf_alloc_dl_tbf method,
that call is removed.

Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2015-07-02 12:04:20 +02:00
parent 5cd496d208
commit 4944c195d4
2 changed files with 1 additions and 13 deletions

View File

@ -850,7 +850,7 @@ void gprs_rlcmac_dl_tbf::reuse_tbf()
tfi = bts->tfi_find_free(GPRS_RLCMAC_DL_TBF, &trx, this->trx->trx_no);
if (tfi >= 0)
new_tbf = tbf_alloc_dl_tbf(bts->bts_data(), NULL, tfi, trx,
new_tbf = tbf_alloc_dl_tbf(bts->bts_data(), ms(), tfi, trx,
ms_class(), 0);
if (!new_tbf) {
@ -858,8 +858,6 @@ void gprs_rlcmac_dl_tbf::reuse_tbf()
return;
}
new_tbf->set_ms(ms());
/* reset rlc states */
m_tx_counter = 0;
m_wait_confirm = 0;

View File

@ -81,8 +81,6 @@ Searching for first unallocated TFI: TRX=0 first TS=4
Found TFI=1.
********** TBF starts here **********
Allocating DL TBF: TFI=1 TRX=0 MS_CLASS=45
Creating MS object, TLLI = 0x00000000
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
Slot Allocation (Algorithm A) for class 45
- Skipping TS 0, because not enabled
- Skipping TS 1, because not enabled
@ -94,9 +92,6 @@ Slot Allocation (Algorithm A) for class 45
- Assign downlink TS=4
PDCH(TS 4, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs.
- Setting Control TS 4
Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL)
Detaching TBF from MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL)
Destroying MS object, TLLI = 0x00000000
Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=NULL)
Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE)
********** TBF update **********
@ -173,8 +168,6 @@ Searching for first unallocated TFI: TRX=0 first TS=4
Found TFI=1.
********** TBF starts here **********
Allocating DL TBF: TFI=1 TRX=0 MS_CLASS=45
Creating MS object, TLLI = 0x00000000
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 45
Slot Allocation (Algorithm A) for class 45
- Skipping TS 0, because not enabled
- Skipping TS 1, because not enabled
@ -186,9 +179,6 @@ Slot Allocation (Algorithm A) for class 45
- Assign downlink TS=4
PDCH(TS 4, TRX 0): Attaching TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL), 2 TBFs.
- Setting Control TS 4
Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL)
Detaching TBF from MS object, TLLI = 0x00000000, TBF = TBF(TFI=1 TLLI=0x00000000 DIR=DL STATE=NULL)
Destroying MS object, TLLI = 0x00000000
Attaching TBF to MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=1 TLLI=0xffeeddcc DIR=DL STATE=NULL)
Detaching TBF from MS object, TLLI = 0xffeeddcc, TBF = TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=WAIT RELEASE)
********** TBF update **********