Attention is currently required from: dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33418 )
Change subject: BTS_Tests: Add support for PCUIF protocol version 11
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33418
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I08de02e951e10bc8b4381cc2ad32e63f2747e3c4
Gerrit-Change-Number: 33418
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 23 Jun 2023 15:11:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33417 )
Change subject: PCUIF_Types: fix record PCUIF_pch_dt
......................................................................
PCUIF_Types: fix record PCUIF_pch_dt
The record PCUIF_pch_dt uses ALIGN(left) variants for imsi data. This is
not correct, since it would pad the data with zeros if it does not fit the
specified length. This is unwanted in particular in the case of the IMSI
since the struct also allows for IMSIs shorter than 17 characters as long
as the minimum lenght is 3.
Related: OS#5927
Change-Id: I011eb2496b1422c49736b227dfa1e2a2d6096d67
---
M library/PCUIF_Types.ttcn
1 file changed, 18 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/33417/1
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 5ddcc9e..8f5d4eb 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -320,8 +320,8 @@
octetstring data length(23)
} with {
variant (tlli) "BYTEORDER(last)"
- variant (imsi) "FIELDLENGTH(17), ALIGN(left)"
- variant (data) "FIELDLENGTH(23), ALIGN(left)"
+ variant (imsi) "FIELDLENGTH(17)"
+ variant (data) "FIELDLENGTH(23)"
};
type union PCUIF_MsgUnion {
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33417
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I011eb2496b1422c49736b227dfa1e2a2d6096d67
Gerrit-Change-Number: 33417
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33415 )
Change subject: tbf_ul: Avoid processing rx UL bocks for UL TBFs in RELEASING state
......................................................................
tbf_ul: Avoid processing rx UL bocks for UL TBFs in RELEASING state
Change-Id: I1da9b665b9ed83a644ea798008d456d6298b7460
---
M src/tbf_ul.cpp
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/15/33415/1
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 9a139ba..4a5df6b 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -258,6 +258,18 @@
"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 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());
+ }
+
/* 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: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33416 )
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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/16/33416/1
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: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: fixeria.
pespin 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: Code-Review+1
(2 comments)
File src/host/layer23/src/modem/grr.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/33414/comment/3e784f71_69f81105
PS3, Line 264: LOGP(DRR, LOGL_INFO,
probably fits in one line (same line 271)
https://gerrit.osmocom.org/c/osmocom-bb/+/33414/comment/c7c3b626_695fc9ee
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
--
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: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 23 Jun 2023 13:46:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33390 )
Change subject: ranap_rab_ass: do not free never allocated FieldItems
......................................................................
ranap_rab_ass: do not free never allocated FieldItems
When we check for an assignment failure in a RAB AssignmnetResponse, we
use decode_rab_flitms_from_resp_ies to search through the list of RAB
FailedItemsIEs for the RAB id we want to check. In case of failure, we
get a positive index back from this function. We then know that the RAB
that we checked for has failed bcause it was in the FailedItemsList.
In that case, we also must free the RAB FailedItemsIEs that
decode_rab_flitms_from_resp_ies has decoded. At the moment we also free
the RAB FailedItemsIEs also when decode_rab_flitms_from_resp_ies returns
with a negative return code, which may mean that the RAB was not found
or some other error occured. In this case we must not free since then
no valid RAB FailedItemsIEs are allocated.
Related: OS#6062
Change-Id: I755ba6599079810a048bf5b6d8947b5a9ffa622d
---
M src/osmo-hnbgw/ranap_rab_ass.c
M tests/ranap_rab_ass/ranap_rab_ass_test.c
2 files changed, 55 insertions(+), 5 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/osmo-hnbgw/ranap_rab_ass.c b/src/osmo-hnbgw/ranap_rab_ass.c
index cd8e625..e8addcd 100644
--- a/src/osmo-hnbgw/ranap_rab_ass.c
+++ b/src/osmo-hnbgw/ranap_rab_ass.c
@@ -176,7 +176,9 @@
return ies->raB_FailedList.raB_FailedList_ies.list.array[index];
}
-/* find the RAB specified by rab_id in ies and when found, decode the result into items_ies */
+/* Find the RAB specified by rab_id in ies, decode the result into items_ies and return a positive index.
+ * The caller is responsible for freeing the contents in items_ies. In case of failure, the return code
+ * will be negative. */
static int decode_rab_smditms_from_resp_ies(RANAP_RAB_SetupOrModifiedItemIEs_t *items_ies,
RANAP_RAB_AssignmentResponseIEs_t *ies, uint8_t rab_id)
{
@@ -576,17 +578,16 @@
RANAP_RAB_FailedItemIEs_t _rab_failed_items_ies;
RANAP_RAB_FailedItemIEs_t *rab_failed_items_ies = &_rab_failed_items_ies;
int rc;
- bool result = true;
- /* If we can get a failed item for the specified RAB ID, then we know that the
+ /* If we can get a failed item (rc >= 0) for the specified RAB ID, then we know that the
* HNB reported the RAB Assignment as failed */
rc = decode_rab_flitms_from_resp_ies(rab_failed_items_ies, ies, rab_id);
if (rc < 0)
- result = false;
+ return false;
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_FailedItem, rab_failed_items_ies);
- return result;
+ return true;
}
/*! Check if a specific RAB is present in an RAB-ReleaseList inside RANAP_RAB_AssignmentRequestIEs.
diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.c b/tests/ranap_rab_ass/ranap_rab_ass_test.c
index fc2992d..fbdfa77 100644
--- a/tests/ranap_rab_ass/ranap_rab_ass_test.c
+++ b/tests/ranap_rab_ass/ranap_rab_ass_test.c
@@ -299,6 +299,31 @@
ranap_cn_rx_co_free(&message);
}
+/* Same as above but with a message that does not even contain a FailedItemsIEs list */
+void test_ranap_rab_ass_resp_ies_check_failure_no_faileditemies(void)
+{
+ int rc;
+ ranap_message message;
+ bool rab_failed_at_hnb;
+ uint8_t testvec[] = {
+ 0x60, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x01, 0x00,
+ 0x34, 0x40, 0x23, 0x00, 0x00, 0x01, 0x00, 0x33,
+ 0x40, 0x1c, 0x60, 0x3a, 0x7c, 0x35, 0x00, 0x01,
+ 0x0a, 0x09, 0x01, 0xa4, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x40, 0x04, 0x0a, 0x00, 0x00
+ };
+
+ rc = ranap_cn_rx_co_decode2(&message, testvec, sizeof(testvec));
+
+ OSMO_ASSERT(rc == 0);
+ rab_failed_at_hnb =
+ ranap_rab_ass_resp_ies_check_failure(&message.msg.raB_AssignmentResponseIEs, 23);
+ OSMO_ASSERT(rab_failed_at_hnb == 0)
+
+ ranap_cn_rx_co_free(&message);
+}
+
void test_ranap_rab_ass_req_ies_check_release(void)
{
int rc;
@@ -413,6 +438,7 @@
test_ranap_rab_ass_req_ies_replace_inet_addr();
test_ranap_rab_ass_resp_ies_replace_inet_addr();
test_ranap_rab_ass_resp_ies_check_failure();
+ test_ranap_rab_ass_resp_ies_check_failure_no_faileditemies();
test_ranap_rab_ass_req_ies_check_release();
test_ranap_rab_ass_req_ies_get_count();
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33390
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I755ba6599079810a048bf5b6d8947b5a9ffa622d
Gerrit-Change-Number: 33390
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: falconia.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/29973 )
Change subject: msc_a: send MNCC_RTP_CONNECT in call waiting scenarios
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
i mean "a call waiting scenario" seems to say it all, but when i think about it i'm not so sure after all. like, is it A and B are in a call, then C also dials A's number, and then what, B hangs up? A hangs up? puts B on hold? ...
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/29973
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ibb62cb3c154b99769b2dfe708f73c20e8b632f5d
Gerrit-Change-Number: 29973
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Comment-Date: Fri, 23 Jun 2023 13:08:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment