pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33455 )
Change subject: tbf_dl_fsm: Ignore DL_ACKNACK_MISS events in WAIT_{RELEASE,REUSE_TFI} states
......................................................................
tbf_dl_fsm: Ignore DL_ACKNACK_MISS events in WAIT_{RELEASE,REUSE_TFI} states
If in those states, we already left the FINISHED step which means we
already received a FinalACk previously, hence it means we are missing
requested retransmissions of the last DL ACK/NACK due to fn-advance
(several DL blocks in transit before receiving UL response).
Change-Id: Ib0f23a9cc3c614fe428b682e01502930cd2e478f
---
M src/tbf_dl_fsm.c
1 file changed, 26 insertions(+), 0 deletions(-)
Approvals:
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/tbf_dl_fsm.c b/src/tbf_dl_fsm.c
index 557fb7a..d604f6f 100644
--- a/src/tbf_dl_fsm.c
+++ b/src/tbf_dl_fsm.c
@@ -286,6 +286,11 @@
case TBF_EV_FINAL_ACK_RECVD:
/* ignore, duplicate ACK, we already know about since we left ST_FINISHED */
break;
+ case TBF_EV_DL_ACKNACK_MISS:
+ /* ignore, miss for retransmitted ACK, but a previous one was
+ * already ACKED since we left ST_FINISHED. This happens due to
+ * fn-advance scheduling several DL blocks in advance. */
+ break;
default:
OSMO_ASSERT(0);
}
@@ -320,6 +325,11 @@
case TBF_EV_FINAL_ACK_RECVD:
/* ignore, duplicate ACK, we already know about since we left ST_FINISHED */
break;
+ case TBF_EV_DL_ACKNACK_MISS:
+ /* ignore, miss for retransmitted ACK, but a previous one was
+ * already ACKED since we left ST_FINISHED. This happens due to
+ * fn-advance scheduling several DL blocks in advance. */
+ break;
default:
OSMO_ASSERT(0);
}
@@ -450,6 +460,7 @@
},
[TBF_ST_WAIT_RELEASE] = {
.in_event_mask =
+ X(TBF_EV_DL_ACKNACK_MISS) |
X(TBF_EV_FINAL_ACK_RECVD) |
X(TBF_EV_MAX_N3105),
.out_state_mask =
@@ -461,6 +472,7 @@
},
[TBF_ST_WAIT_REUSE_TFI] = {
.in_event_mask =
+ X(TBF_EV_DL_ACKNACK_MISS) |
X(TBF_EV_FINAL_ACK_RECVD),
.out_state_mask =
X(TBF_ST_RELEASING),
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33455
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ib0f23a9cc3c614fe428b682e01502930cd2e478f
Gerrit-Change-Number: 33455
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33454 )
Change subject: Avoid re-assigning DL TBF over PACCH upon duplicate FinalACKs received
......................................................................
Avoid re-assigning DL TBF over PACCH upon duplicate FinalACKs received
Due to the fn-advance feature, we schedule DL blocks in advance, which
may make several retransmitted DL ACK/NACK [RRBP] be in flight, and
hence several of them may be answered by the MS.
When the first one is received, we attempt to initiate a PktDlAss over
PACCH if new DL data was received meanwhile from SGSN.
However, if we receive duplicates of that final PKT CTRL ACK, we don't
want to re-initiate it again, since it is already ongoing.
Related: OS#5471
Change-Id: Idc204aba61ad98f75853dcd46200f5dcc4139203
---
M src/tbf_dl.cpp
M src/tbf_dl_fsm.c
2 files changed, 29 insertions(+), 8 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 40442c3..f4439d3 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -1053,9 +1053,7 @@
int gprs_rlcmac_dl_tbf::rcvd_dl_final_ack()
{
uint16_t received;
- int rc = 0;
-
- osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_FINAL_ACK_RECVD, NULL);
+ int rc;
/* range V(A)..V(S)-1 */
received = m_window.count_unacked();
@@ -1064,10 +1062,7 @@
m_tx_counter = 0;
m_window.reset();
- /* check for LLC PDU in the LLC Queue */
- if (llc_queue_size(llc_queue()) > 0)
- /* we have more data so we will re-use this tbf */
- rc = ms_new_dl_tbf_assigned_on_pacch(ms(), dl_tbf_as_tbf(this));
+ rc = osmo_fsm_inst_dispatch(this->state_fi, TBF_EV_FINAL_ACK_RECVD, NULL);
return rc;
}
diff --git a/src/tbf_dl_fsm.c b/src/tbf_dl_fsm.c
index ba7fc5a..557fb7a 100644
--- a/src/tbf_dl_fsm.c
+++ b/src/tbf_dl_fsm.c
@@ -260,8 +260,10 @@
static void st_wait_release_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
struct tbf_dl_fsm_ctx *ctx = (struct tbf_dl_fsm_ctx *)fi->priv;
+ struct GprsMs *ms = tbf_ms(ctx->tbf);
- /* T3192 is running on the MS and has also been armed by this FSM now.
+ /* This state was entered because FinalACK was received; now T3192 is
+ * running on the MS and has also been armed by this FSM.
* During that time, it is possible to reach the MS over PACCH to assign
* new DL TBF.
* Upon T3192 expiration, FSM will transition to TBF_ST_WAIT_REUSE_TFI
@@ -270,6 +272,12 @@
*/
mod_ass_type(ctx, GPRS_RLCMAC_FLAG_CCCH, false);
+
+ /* check for LLC PDU in the LLC Queue */
+ if (llc_queue_size(ms_llc_queue(ms)) > 0) {
+ /* we have more data so we will re-use this tbf */
+ ms_new_dl_tbf_assigned_on_pacch(ms, ctx->tbf);
+ }
}
static void st_wait_release(struct osmo_fsm_inst *fi, uint32_t event, void *data)
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33454
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Idc204aba61ad98f75853dcd46200f5dcc4139203
Gerrit-Change-Number: 33454
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33415 )
Change subject: tbf_ul: Avoid processing rx UL blocks for UL TBFs in RELEASING state
......................................................................
tbf_ul: Avoid processing rx UL blocks for UL TBFs in RELEASING state
Change-Id: I1da9b665b9ed83a644ea798008d456d6298b7460
---
M src/tbf_ul.cpp
1 file changed, 22 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 9a139ba..5ae0d49 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -258,6 +258,19 @@
"V(R)=%d)\n", rlc->tfi, this->m_window.v_q(),
this->m_window.v_r());
+ if (tbf_state(this) == TBF_ST_RELEASING) {
+ /* This may happen if MAX_N3101 is hit previously, moving the UL
+ * TBF to RELEASING state. Since we have an fn-advance where DL
+ * blocks are scheduled in advance, we may have requested USF for
+ * this UL TBF before triggering and hence we are now receiving a
+ * UL block from it. If this is the case, simply ignore the block.
+ */
+ LOGPTBFUL(this, LOGL_INFO,
+ "UL DATA TFI=%d received (V(Q)=%d .. V(R)=%d) while in RELEASING state, discarding\n",
+ rlc->tfi, this->m_window.v_q(), this->m_window.v_r());
+ return 0;
+ }
+
/* process RSSI */
gprs_rlcmac_rssi(this, rssi);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33415
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I1da9b665b9ed83a644ea798008d456d6298b7460
Gerrit-Change-Number: 33415
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33524 )
Change subject: ms_need_dl_tbf(): Fix state checks and document function
......................................................................
ms_need_dl_tbf(): Fix state checks and document function
A new state TBF_ST_WAIT_REUSE_TFI was added lately in dl_tbf_fsm, which
allows differentiating the time where the MS is listening on PACCH
after having sent last DL ACK/NACK, and time where it should already be
in idle mode.
In the former, the ms_need_dl_tbf() should return false since the MS is
still ongoing in packet-active mode (and new data incoming from SGSN
will trigger new DL TBF assignment over PACCH as needed), while in the
later we want to start a new PCH assignment.
Fixes: 40a297f3b0c8e1670d46a4974750dd3335bc7885
Change-Id: I96f311480d036859511c6ba825ccd36bdc71190b
---
M src/gprs_ms.h
1 file changed, 41 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index ef1cc4e..276733c 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -157,11 +157,30 @@
return &ms->llc_queue;
}
+/* Function used in code where a ul_tbf related event occurs and hence its state
+ * changes, which in turn may change the entire MS state (eg becoming reachable
+ * over PCH or PACCH) and the caller may want to know if it is a good time to
+ * assign a DL TBF (and whether we have DL data to send) */
static inline bool ms_need_dl_tbf(struct GprsMs *ms)
{
- if (ms_dl_tbf(ms) != NULL &&
- tbf_state((const struct gprs_rlcmac_tbf *)ms_dl_tbf(ms)) != TBF_ST_WAIT_RELEASE)
- return false;
+ struct gprs_rlcmac_dl_tbf *dl_tbf = ms_dl_tbf(ms);
+ if (dl_tbf) {
+ switch (tbf_state(dl_tbf_as_tbf(dl_tbf))) {
+ case TBF_ST_NEW:
+ case TBF_ST_ASSIGN:
+ case TBF_ST_FLOW:
+ case TBF_ST_FINISHED:
+ case TBF_ST_WAIT_RELEASE:
+ return false; /* TBF in use, hence no need for new DL TBF */
+ case TBF_ST_WAIT_REUSE_TFI:
+ case TBF_ST_RELEASING:
+ /* TBF cannot be used to send further data, a new one
+ * may be needed, check below */
+ break;
+ default:
+ OSMO_ASSERT(0);
+ }
+ }
return llc_queue_size(ms_llc_queue(ms)) > 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33524
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I96f311480d036859511c6ba825ccd36bdc71190b
Gerrit-Change-Number: 33524
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33416 )
(
2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: tbf_ul_fsm: Delay moving ul_tbf to FLOW
......................................................................
tbf_ul_fsm: Delay moving ul_tbf to FLOW
Otherwise the scheduler selects the UL TBF for USF during that time, and
of course no one has that USF assigned yet, so no answer and that ends
up triggering MAX_N3101 on the UL TBF.
This is specially important when PCU is connected to the BSC, since the
amount of time for the ImmAss to be scheduled on the BTS and reach the
MS can be bigger.
Change-Id: I48babd70ca44f11110240cbcfbab43d0e3a0fb59
---
M src/tbf_ul_fsm.c
M tests/tbf/TbfTest.cpp
M tests/tbf/TbfTest.err
M tests/types/TypesTest.err
4 files changed, 98 insertions(+), 30 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/tbf_ul_fsm.c b/src/tbf_ul_fsm.c
index a26d161..49849ba 100644
--- a/src/tbf_ul_fsm.c
+++ b/src/tbf_ul_fsm.c
@@ -89,7 +89,7 @@
switch (event) {
case TBF_EV_ASSIGN_ADD_CCCH:
mod_ass_type(ctx, GPRS_RLCMAC_FLAG_CCCH, true);
- tbf_ul_fsm_state_chg(fi, TBF_ST_FLOW);
+ tbf_ul_fsm_state_chg(fi, TBF_ST_ASSIGN);
ul_tbf_contention_resolution_start(ctx->ul_tbf);
break;
case TBF_EV_ASSIGN_ADD_PACCH:
@@ -126,6 +126,22 @@
"Starting timer T3168 [UL TBF Ass (PACCH)] with %u sec. %u microsec\n",
sec, micro);
osmo_timer_schedule(&fi->timer, sec, micro);
+ } else if (ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH)) {
+ /* Wait a bit for the AGCH ImmAss[PktUlAss] sent BSC->BTS to
+ * arrive at the MS, and for the MS to jump and starting
+ * listening on USFs in the assigned PDCH.
+ * Ideally we would first wait for TBF_EV_ASSIGN_PCUIF_CNF to
+ * account for queueing time, but that's only sent for data on PCH
+ * so far, while ImmAss for UL TBF is sent on AGCH.
+ */
+ fi->T = -2002;
+ val = osmo_tdef_get(the_pcu->T_defs, fi->T, OSMO_TDEF_MS, -1);
+ sec = val / 1000;
+ micro = (val % 1000) * 1000;
+ LOGPTBFUL(ctx->ul_tbf, LOGL_DEBUG,
+ "Starting timer X2002 [assignment (AGCH)] with %u sec. %u microsec\n",
+ sec, micro);
+ osmo_timer_schedule(&fi->timer, sec, micro);
}
}
@@ -152,6 +168,10 @@
}
tbf_ul_fsm_state_chg(fi, TBF_ST_FLOW);
break;
+ case TBF_EV_ASSIGN_READY_CCCH:
+ /* change state to FLOW, so scheduler will start requesting USF */
+ tbf_ul_fsm_state_chg(fi, TBF_ST_FLOW);
+ break;
default:
OSMO_ASSERT(0);
}
@@ -259,6 +279,9 @@
{
struct tbf_ul_fsm_ctx *ctx = (struct tbf_ul_fsm_ctx *)fi->priv;
switch (fi->T) {
+ case -2002:
+ osmo_fsm_inst_dispatch(fi, TBF_EV_ASSIGN_READY_CCCH, NULL);
+ break;
case 3168:
LOGPTBFUL(ctx->ul_tbf, LOGL_NOTICE, "Releasing due to UL TBF PACCH assignment timeout\n");
/* fall-through */
@@ -286,7 +309,8 @@
.in_event_mask =
X(TBF_EV_ASSIGN_ADD_CCCH) |
X(TBF_EV_ASSIGN_ADD_PACCH) |
- X(TBF_EV_ASSIGN_ACK_PACCH),
+ X(TBF_EV_ASSIGN_ACK_PACCH) |
+ X(TBF_EV_ASSIGN_READY_CCCH),
.out_state_mask =
X(TBF_ST_FLOW) |
X(TBF_ST_FINISHED),
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index bf30891..0205f2b 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -650,10 +650,18 @@
tfi = bts_tfi_find_free(bts, GPRS_RLCMAC_UL_TBF, &pdch->trx->trx_no, -1);
+ /* We set X2002 timeout to 0 here to get immediate trigger through osmo_select_main() below */
+ OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2002, 0, OSMO_TDEF_MS) == 0);
bts_handle_rach(bts, 0x03, *fn, qta);
ul_tbf = bts_ul_tbf_by_tfi(bts, tfi, pdch->trx->trx_no, pdch->ts_no);
OSMO_ASSERT(ul_tbf != NULL);
+ OSMO_ASSERT(ul_tbf->state_is(TBF_ST_ASSIGN));
+
+ /* ImmAss has been sent PCU=PCUIF=>BTS. This means UL TBF is in state
+ * ASSIGN with X2002 armed. It will move to FLOW once it expires. */
+ osmo_select_main(0);
+ OSMO_ASSERT(ul_tbf->state_is(TBF_ST_FLOW));
OSMO_ASSERT(ul_tbf->ta() == qta / 4);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 83bf6db..e582807 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -2271,11 +2271,15 @@
MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf)
UL_TBF(UL:TFI-0-0-0:G){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-0:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to FLOW
-TBF(UL:TFI-0-0-0:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
+UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 0 microsec
+TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf)
Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7
Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=0 USF=0
+UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Timeout of X2002
+UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Received Event ASSIGN_READY_CCCH
+UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: state_chg to FLOW
PDCH(bts=0,trx=0,ts=7) Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184
PDCH(bts=0,trx=0,ts=7) FN=2654167 Rx UL DATA from unexpected TBF(UL:TFI-0-0-0:G){FLOW}
TBF(UL:TFI-0-0-0:G){FLOW} UL DATA TFI=0 received (V(Q)=0 .. V(R)=0)
@@ -2337,11 +2341,15 @@
MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf)
UL_TBF(UL:TFI-0-0-0:G){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-0:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to FLOW
-TBF(UL:TFI-0-0-0:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
+UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 0 microsec
+TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf)
Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7
Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=0 USF=0
+UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Timeout of X2002
+UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Received Event ASSIGN_READY_CCCH
+UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: state_chg to FLOW
PDCH(bts=0,trx=0,ts=7) Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184
PDCH(bts=0,trx=0,ts=7) FN=2654167 Rx UL DATA from unexpected TBF(UL:TFI-0-0-0:G){FLOW}
TBF(UL:TFI-0-0-0:G){FLOW} UL DATA TFI=0 received (V(Q)=0 .. V(R)=0)
@@ -3225,11 +3233,15 @@
MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf)
UL_TBF(UL:TFI-0-0-0:G){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-0:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to FLOW
-TBF(UL:TFI-0-0-0:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654283
+UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 0 microsec
+TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654283
MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf)
Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7
Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=0 USF=0
+UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Timeout of X2002
+UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: Received Event ASSIGN_READY_CCCH
+UL_TBF(UL:TFI-0-0-0:G){ASSIGN}: state_chg to FLOW
PDCH(bts=0,trx=0,ts=7) Got CS-1 RLC block: R=0, SI=0, TFI=0, CPS=0, RSB=0, rc=184
PDCH(bts=0,trx=0,ts=7) FN=2654275 Rx UL DATA from unexpected TBF(UL:TFI-0-0-0:G){FLOW}
TBF(UL:TFI-0-0-0:G){FLOW} UL DATA TFI=0 received (V(Q)=0 .. V(R)=0)
@@ -9317,8 +9329,9 @@
MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf)
UL_TBF(UL:TFI-0-0-0:G){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-0:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to FLOW
-TBF(UL:TFI-0-0-0:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
+UL_TBF(UL:TFI-0-0-0:G){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec
+TBF(UL:TFI-0-0-0:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf)
Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7
Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=0 USF=0
@@ -9348,8 +9361,9 @@
MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf)
UL_TBF(UL:TFI-0-0-1:G){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-1:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-1:G){NEW}: state_chg to FLOW
-TBF(UL:TFI-0-0-1:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
+UL_TBF(UL:TFI-0-0-1:G){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0-1:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec
+TBF(UL:TFI-0-0-1:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf)
Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7
Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=1 USF=1
@@ -9379,8 +9393,9 @@
MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf)
UL_TBF(UL:TFI-0-0-2:G){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-2:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-2:G){NEW}: state_chg to FLOW
-TBF(UL:TFI-0-0-2:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
+UL_TBF(UL:TFI-0-0-2:G){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0-2:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec
+TBF(UL:TFI-0-0-2:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf)
Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7
Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=2 USF=2
@@ -9410,8 +9425,9 @@
MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf)
UL_TBF(UL:TFI-0-0-3:G){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-3:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-3:G){NEW}: state_chg to FLOW
-TBF(UL:TFI-0-0-3:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
+UL_TBF(UL:TFI-0-0-3:G){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0-3:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec
+TBF(UL:TFI-0-0-3:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf)
Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7
Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=3 USF=3
@@ -9441,8 +9457,9 @@
MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf)
UL_TBF(UL:TFI-0-0-4:G){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-4:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-4:G){NEW}: state_chg to FLOW
-TBF(UL:TFI-0-0-4:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
+UL_TBF(UL:TFI-0-0-4:G){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0-4:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec
+TBF(UL:TFI-0-0-4:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf)
Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7
Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=4 USF=4
@@ -9472,8 +9489,9 @@
MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf)
UL_TBF(UL:TFI-0-0-5:G){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-5:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-5:G){NEW}: state_chg to FLOW
-TBF(UL:TFI-0-0-5:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
+UL_TBF(UL:TFI-0-0-5:G){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0-5:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec
+TBF(UL:TFI-0-0-5:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf)
Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7
Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=5 USF=5
@@ -9503,8 +9521,9 @@
MS(TA-220:MSCLS-0-0:UL): + tbf: now used by 2 (bts_rcv_rach,tbf)
UL_TBF(UL:TFI-0-0-6:G){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-6:G){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-6:G){NEW}: state_chg to FLOW
-TBF(UL:TFI-0-0-6:G){FLOW} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
+UL_TBF(UL:TFI-0-0-6:G){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0-6:G){ASSIGN} Starting timer X2002 [assignment (AGCH)] with 0 sec. 200000 microsec
+TBF(UL:TFI-0-0-6:G){ASSIGN} Starting timer T3141 [Contention resolution (UL-TBF, CCCH)] with 10 sec. 0 microsec, cur_fn=2654167
MS(TA-220:MSCLS-0-0:UL): - bts_rcv_rach: now used by 1 (tbf)
Modifying MS object, TLLI = 0xffffffff, TA 220 -> 7
Tx Immediate Assignment on AGCH: TRX=0 (ARFCN 0) TS=7 TA=7 TSC=0 TFI=6 USF=6
@@ -9527,25 +9546,25 @@
MS(TA-220:MSCLS-0-0) Destroying MS object
Tx Immediate Assignment Reject on AGCH
MS(TA-7:MSCLS-0-0:UL) Destroying MS object
-MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-6:G){FLOW}
+MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-6:G){ASSIGN}
MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-)
MS(TA-7:MSCLS-0-0:UL) Destroying MS object
-MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-5:G){FLOW}
+MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-5:G){ASSIGN}
MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-)
MS(TA-7:MSCLS-0-0:UL) Destroying MS object
-MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-4:G){FLOW}
+MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-4:G){ASSIGN}
MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-)
MS(TA-7:MSCLS-0-0:UL) Destroying MS object
-MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-3:G){FLOW}
+MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-3:G){ASSIGN}
MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-)
MS(TA-7:MSCLS-0-0:UL) Destroying MS object
-MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-2:G){FLOW}
+MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-2:G){ASSIGN}
MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-)
MS(TA-7:MSCLS-0-0:UL) Destroying MS object
-MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-1:G){FLOW}
+MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-1:G){ASSIGN}
MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-)
MS(TA-7:MSCLS-0-0:UL) Destroying MS object
-MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-0:G){FLOW}
+MS(TA-7:MSCLS-0-0:UL) Detaching TBF: TBF(UL:TFI-0-0-0:G){ASSIGN}
MS(TA-7:MSCLS-0-0): - tbf: now used by 0 (-)
=== end test_immediate_assign_rej_multi_block ===
=== start test_immediate_assign_rej_single_block ===
diff --git a/tests/types/TypesTest.err b/tests/types/TypesTest.err
index 4c20672..55453c9 100644
--- a/tests/types/TypesTest.err
+++ b/tests/types/TypesTest.err
@@ -41,7 +41,7 @@
TBF(UL:TFI-0-0-0:E){NEW} setting EGPRS UL window size to 64, base(64) slots(1) ws_pdch(0)
UL_TBF(UL:TFI-0-0-0:E){NEW}: Received Event ASSIGN_ADD_CCCH
TBF(UL:TFI-0-0-0:E){NEW} set ass. type CCCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0-0:E){NEW}: state_chg to FLOW
+UL_TBF(UL:TFI-0-0-0:E){NEW}: state_chg to ASSIGN
************** Test with empty window
************** Test with 1 lost packet
************** Test with compressed window
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33416
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I48babd70ca44f11110240cbcfbab43d0e3a0fb59
Gerrit-Change-Number: 33416
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33453 )
Change subject: Avoid using UL TBF in RELEASE state to assign DL TBF over PACCH
......................................................................
Avoid using UL TBF in RELEASE state to assign DL TBF over PACCH
In RELEASE state, the UL TBF is considered not available anymore, and we
are simply waiting in order to be able to reuse the allocated resources
(just in case it was still around). Hence, a UL TBF in that state should
not be selectable to initiate a DL TBF assignment over PACCH.
Related: OS#5472
Change-Id: Ia11f7802779cfeea15a71bddad9f7e0c6c1afb11
---
M src/gprs_ms.c
1 file changed, 17 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/gprs_ms.c b/src/gprs_ms.c
index dda2f29..06d012c 100644
--- a/src/gprs_ms.c
+++ b/src/gprs_ms.c
@@ -1106,7 +1106,8 @@
if (!ul_tbf)
return true;
if (ul_tbf_contention_resolution_done(ul_tbf) &&
- !tbf_ul_ack_waiting_cnf_final_ack(ul_tbf))
+ !tbf_ul_ack_waiting_cnf_final_ack(ul_tbf) &&
+ tbf_state(ul_tbf_as_tbf(ul_tbf)) != TBF_ST_RELEASING)
return true;
return false;
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33453
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ia11f7802779cfeea15a71bddad9f7e0c6c1afb11
Gerrit-Change-Number: 33453
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33453 )
Change subject: Avoid using UL TBF in RELEASE state to assign DL TBF over PACCH
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33453
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ia11f7802779cfeea15a71bddad9f7e0c6c1afb11
Gerrit-Change-Number: 33453
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 29 Jun 2023 14:32:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: osmith, laforge, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33414 )
Change subject: modem: properly handle Dedicated mode or TBF IE
......................................................................
Patch Set 3:
(1 comment)
File src/host/layer23/src/modem/grr.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/33414/comment/0a026618_78d79b30
PS3, Line 278: if ((dm_or_tbf & (1 << 1)) == 0) {
> it is not clear by looking at this conditon + comment whether the if condition is UL TBF or DL TBF
The comment clearly states "Uplink TBF", so the if-condition is obviously checking if it's an Uplink TBF assignment. The 2nd LSB bit (indicating DL TBF) is expected to be unset.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33414
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Idb9b3203147be3b42256c0bcab3ecdabcf2d2fa9
Gerrit-Change-Number: 33414
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 29 Jun 2023 13:42:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment