aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-02 12:04:20 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-03 15:53:15 +0200
commit4944c195d4a71f4aa5d9a3274907fa0bfed0e6ce (patch)
tree24c1e411d153ff44d93332f9957e588f13f3f864
parent5cd496d2083bef03d9f2425cabec9ec51c8e9254 (diff)
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
-rw-r--r--src/tbf_dl.cpp4
-rw-r--r--tests/tbf/TbfTest.err10
2 files changed, 1 insertions, 13 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 771b35b..f307288 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -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;
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 1f016ed..b0dff02 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -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 **********