pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/33530 )


Change subject: tbf_dl_fsm: Fix '{FLOW}: Event ASSIGN_PCUIF_CNF not permitted'
......................................................................

tbf_dl_fsm: Fix '{FLOW}: Event ASSIGN_PCUIF_CNF not permitted'

As seen during manual testing:
20230628140439674 DTBF tbf_dl.cpp:116 
MS(IMSI-901700000015256:TLLI-0xd4d57c9d:TA-0:MSCLS-12-12) Allocating DL TBF
...
20230628140439674 DTBFDL tbf_dl.cpp:489 
DL_TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){NEW}: Received 
Event ASSIGN_ADD_CCCH
20230628140439674 DTBFDL bts.cpp:1108 
TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){ASSIGN} Tx CCCH (PCH) 
Immediate Assignment [PktDlAss=PDCH(bts=0,trx=0,ts=5)] TA=0
...
20230628140440238 DMS pdch.cpp:681 
MS(IMSI-901700000015256:TLLI-0xd4d57c9d:TA-0:MSCLS-12-12:DL): + 
rcv_resource_request: now used by 2 (tbf,rcv_resource_request)
20230628140440238 DTBFDL pdch.cpp:738 
TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){ASSIGN} Got PACKET 
RESOURCE REQ while DL-TBF pending, killing it
20230628140440238 DTBF tbf.cpp:271 
TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){ASSIGN} free
...
20230628140440377 DTBFUL tbf_ul_fsm.c:169 
UL_TBF(UL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){ASSIGN}: state_chg 
to FLOW
20230628140440377 DTBF tbf_dl.cpp:116 
MS(IMSI-901700000015256:TLLI-0xd4d57c9d:TA-0:MSCLS-12-12:UL) Allocating DL TBF
20230628140440377 DTBFDL tbf_dl.cpp:475 
DL_TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){NEW}: Received 
Event ASSIGN_ADD_PACCH
20230628140440387 DTBF tbf_dl_ass_fsm.c:105 
TBF(UL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){FLOW} start Packet 
Downlink Assignment (PACCH) for 
TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){ASSIGN}
...
20230628140440816 DTBFDL bts.cpp:737 
DL_TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){FLOW}: Received 
Event ASSIGN_PCUIF_CNF
20230628140440816 DTBFDL bts.cpp:737 
DL_TBF(DL:TFI-0-0-0:E:IMSI-901700000015256:TLLI-0xd4d57c9d){FLOW}: Event 
ASSIGN_PCUIF_CNF not permitted

Change-Id: I042b0117552acae25c750e762f5cc254399da64f
---
M src/tbf_dl_fsm.c
1 file changed, 42 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/30/33530/1

diff --git a/src/tbf_dl_fsm.c b/src/tbf_dl_fsm.c
index 3a963ce..e647e91 100644
--- a/src/tbf_dl_fsm.c
+++ b/src/tbf_dl_fsm.c
@@ -213,6 +213,20 @@
        struct tbf_dl_fsm_ctx *ctx = (struct tbf_dl_fsm_ctx *)fi->priv;

        switch (event) {
+       case TBF_EV_ASSIGN_PCUIF_CNF:
+               if (!(ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH))) {
+                       /* This can happen if we initiated a CCCH DlAss from an
+                        * older TBF object (same TLLI) towards BTS, and the 
DL-TBF
+                        * was recreated (this one) and was successfully 
assigned over PACCH.
+                        * This is usually the case if MS requests 2phase access
+                        * to get an UL TBF while we were waiting for a DL TBF
+                        * assignment for that same MS over PCH.
+                        */
+                       LOGPTBFDL(ctx->dl_tbf, LOGL_INFO,
+                                 "Ignoring event ASSIGN_PCUIF_CNF from BTS "
+                                 "(CCCH was not requested on current 
assignment)\n");
+               }
+               break;
        case TBF_EV_DL_ACKNACK_MISS:
                /* DL TBF: we missed a DL ACK/NACK. If we started assignment
                 * over CCCH and never received any DL ACK/NACK yet, it means we
@@ -436,6 +450,7 @@
        },
        [TBF_ST_FLOW] = {
                .in_event_mask =
+                       X(TBF_EV_ASSIGN_PCUIF_CNF) |
                        X(TBF_EV_DL_ACKNACK_MISS) |
                        X(TBF_EV_LAST_DL_DATA_SENT) |
                        X(TBF_EV_MAX_N3105),

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33530
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I042b0117552acae25c750e762f5cc254399da64f
Gerrit-Change-Number: 33530
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to