aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-08-31 14:32:05 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-09-01 11:48:25 +0200
commitcf6ae9d12f9bf406a8f164f8109410d01328d913 (patch)
tree656b396ba277b32d4ef5c97f243454074d11b16c
parentaf75ce8e15ec8584cbc96a0cd366a5df68b9dae8 (diff)
Revert "tbf: Do not kill DL TBF on Packet Resource Request"
This reverts commit e91bd3babd5c04a154f296607b401a5050dcba31. That commit seems to cause hanging DL TBFs when there was a RACH based UL TBF establishment while it that TBF is active. This could be caused by the use of a different PDCH for the SBA. Conflicts: tests/tbf/TbfTest.cpp tests/tbf/TbfTest.err
-rw-r--r--src/bts.cpp13
-rw-r--r--src/tbf.cpp4
-rw-r--r--tests/tbf/TbfTest.cpp8
-rw-r--r--tests/tbf/TbfTest.err14
4 files changed, 21 insertions, 18 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index cfb43857..98a23ccd 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -988,11 +988,14 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
ul_tbf = NULL;
}
- if (dl_tbf)
- LOGP(DRLCMACUL, LOGL_INFO, "Got RACH from "
- "TLLI=0x%08x while %s still exists.\n",
- tlli, tbf_name(dl_tbf));
-
+ if (dl_tbf) {
+ LOGP(DRLCMACUL, LOGL_NOTICE, "Got RACH from "
+ "TLLI=0x%08x while %s still exists. "
+ "Killing pending DL TBF\n", tlli,
+ tbf_name(dl_tbf));
+ tbf_free(dl_tbf);
+ dl_tbf = NULL;
+ }
LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF "
"in packet resource request of single "
"block, so we provide one:\n");
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 42d522bd..59877543 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -986,8 +986,6 @@ int gprs_rlcmac_tbf::extract_tlli(const uint8_t *data, const size_t len)
}
old_ms = bts->ms_by_tlli(new_tlli);
- /* Keep the old MS object for the update_ms() */
- GprsMs::Guard guard(old_ms);
if (old_ms) {
/* Get them before calling set_ms() */
dl_tbf = old_ms->dl_tbf();
@@ -998,7 +996,7 @@ int gprs_rlcmac_tbf::extract_tlli(const uint8_t *data, const size_t len)
/* there might be an active and valid downlink TBF */
if (!ms()->dl_tbf() && dl_tbf)
- /* Move it to the current MS (see the guard above) */
+ /* Move it to the current MS */
dl_tbf->set_ms(ms());
}
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index e83d1b5b..3c3e91f7 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -896,11 +896,11 @@ static void test_tbf_dl_flow_and_rach_two_phase()
OSMO_ASSERT(ms2 == ms);
/* DL TBF should be the same */
- OSMO_ASSERT(ms->dl_tbf());
- OSMO_ASSERT(ms->dl_tbf() == dl_tbf);
+ /* OSMO_ASSERT(ms->dl_tbf()); */
+ /* 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__);
}
@@ -961,7 +961,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 082b64df..6dc532e6 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -1792,7 +1792,12 @@ Searching for first unallocated TFI: TRX=0
Found TFI=0.
+++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
------------------------- RX : Uplink Control Block -------------------------
-Got RACH from TLLI=0xf1223344 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists.
+Got RACH from TLLI=0xf1223344 while TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) still exists. Killing pending DL TBF
+TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) free
+TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) stopping timer 0.
+PDCH(TS 7, TRX 0): Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN), 0 TBFs, USFs = 00, TFIs = 00000000.
+Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN)
+********** TBF ends here **********
MS requests UL TBF in packet resource request of single block, so we provide one:
********** TBF starts here **********
Allocating UL TBF: MS_CLASS=1
@@ -1946,13 +1951,10 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Upli
Sending data request: trx=0 ts=0 sapi=2 arfcn=0 fn=0 block=0 data=2d 06 3f 10 0f 00 00 03 8b ed 07 00 c8 00 10 0b 2b 2b 2b 2b 2b 2b 2b
UL DATA TFI=0 received (V(Q)=0 .. V(R)=0)
Detaching TBF from MS object, TLLI = 0xf1223344, TBF = TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN)
+Destroying MS object, TLLI = 0xf1223344
Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=DL STATE=ASSIGN)
-Modifying MS object, TLLI = 0x00000000, IMSI '' -> '0011223344'
-Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
-Clearing MS object, TLLI: 0xf1223344, IMSI: '0011223344'
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
Decoded premier TLLI=0xf1223344 of UL DATA TFI=0.
-Destroying MS object, TLLI = 0x00000000
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) restarting timer 3169 while old timer 3169 pending
- BSN 0 storing in window (0..63)
- Raising V(R) to 1
@@ -1969,7 +1971,7 @@ 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 = 2
+New MS: TLLI = 0xf1223344, TA = 7, IMSI = , LLC = 0
Sending data request: trx=0 ts=7 sapi=5 arfcn=0 fn=2654218 block=8 data=47 94 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
MS requests UL TBF on RACH, so we provide one:
MS requests single block allocation