diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-06-21 17:33:28 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-07-04 14:29:25 +0200 |
commit | 806426525d0fa4cdd76c4c5f2b1d315053ae2247 (patch) | |
tree | c3b9fe5d048795a02a8b063e3b73b7664b5999fa | |
parent | 2f47cf4edb9e5e6734d98960dcc9507df1f1acdf (diff) |
rlcmac: tbf_ul: Move to packet-idle state when T3164 triggers
TS 44.018 3.5.2.1.4:
"The one phase packet access procedure is completed at a successful
contention resolution. The mobile station has entered the packet transfer
mode. Timer T3141 is stopped on the network side. Timer T3164 is stopped
on the mobile station side."
Change-Id: Ic7420a42e2e81effdde587d7e49acd66b404354c
-rw-r--r-- | include/osmocom/gprs/rlcmac/gre.h | 3 | ||||
-rw-r--r-- | include/osmocom/gprs/rlcmac/rlcmac_private.h | 1 | ||||
-rw-r--r-- | src/rlcmac/gre.c | 97 | ||||
-rw-r--r-- | src/rlcmac/rlcmac.c | 12 | ||||
-rw-r--r-- | src/rlcmac/tbf_dl_ass_fsm.c | 13 | ||||
-rw-r--r-- | src/rlcmac/tbf_ul_fsm.c | 4 | ||||
-rw-r--r-- | tests/rlcmac/rlcmac_prim_test.err | 54 | ||||
-rw-r--r-- | tests/rlcmac/rlcmac_prim_test.ok | 32 |
8 files changed, 174 insertions, 42 deletions
diff --git a/include/osmocom/gprs/rlcmac/gre.h b/include/osmocom/gprs/rlcmac/gre.h index c976b4a..0e17836 100644 --- a/include/osmocom/gprs/rlcmac/gre.h +++ b/include/osmocom/gprs/rlcmac/gre.h @@ -24,6 +24,8 @@ struct gprs_rlcmac_entity { struct gprs_rlcmac_dl_tbf *dl_tbf; struct gprs_rlcmac_ul_tbf *ul_tbf; + + bool freeing; /* Set to true during destructor */ }; struct gprs_rlcmac_entity *gprs_rlcmac_entity_alloc(uint32_t tlli); @@ -32,6 +34,7 @@ void gprs_rlcmac_entity_free(struct gprs_rlcmac_entity *gre); bool gprs_rlcmac_entity_in_packet_idle_mode(const struct gprs_rlcmac_entity *gre); bool gprs_rlcmac_entity_in_packet_transfer_mode(const struct gprs_rlcmac_entity *gre); bool gprs_rlcmac_entity_have_tx_data_queued(const struct gprs_rlcmac_entity *gre); +int gprs_rlcmac_entity_start_ul_tbf_pkt_acc_proc_if_needed(struct gprs_rlcmac_entity *gre); int gprs_rlcmac_entity_llc_enqueue(struct gprs_rlcmac_entity *gre, uint8_t *ll_pdu, unsigned int ll_pdu_len, enum osmo_gprs_rlcmac_llc_sapi sapi, uint8_t radio_prio); diff --git a/include/osmocom/gprs/rlcmac/rlcmac_private.h b/include/osmocom/gprs/rlcmac/rlcmac_private.h index 76fa3fd..0fefd11 100644 --- a/include/osmocom/gprs/rlcmac/rlcmac_private.h +++ b/include/osmocom/gprs/rlcmac/rlcmac_private.h @@ -90,6 +90,7 @@ struct gprs_rlcmac_entity *gprs_rlcmac_find_entity_by_ptmsi(uint32_t ptmsi); struct gprs_rlcmac_entity *gprs_rlcmac_find_entity_by_imsi(const char *imsi); struct gprs_rlcmac_dl_tbf *gprs_rlcmac_find_dl_tbf_by_tfi(uint8_t dl_tfi); struct gprs_rlcmac_ul_tbf *gprs_rlcmac_find_ul_tbf_by_tfi(uint8_t ul_tfi); +int gprs_rlcmac_submit_l1ctl_pdch_rel_req(void); int gprs_rlcmac_handle_ccch_imm_ass(const struct gsm48_imm_ass *ia, uint32_t fn); int gprs_rlcmac_handle_ccch_pag_req1(const struct gsm48_paging1 *pag); int gprs_rlcmac_handle_ccch_pag_req2(const struct gsm48_paging2 *pag); diff --git a/src/rlcmac/gre.c b/src/rlcmac/gre.c index 6340437..9021faa 100644 --- a/src/rlcmac/gre.c +++ b/src/rlcmac/gre.c @@ -71,6 +71,8 @@ void gprs_rlcmac_entity_free(struct gprs_rlcmac_entity *gre) if (!gre) return; + gre->freeing = true; + gprs_rlcmac_tbf_dl_ass_fsm_destructor(&gre->dl_tbf_dl_ass_fsm); gprs_rlcmac_dl_tbf_free(gre->dl_tbf); gprs_rlcmac_ul_tbf_free(gre->ul_tbf); @@ -83,16 +85,68 @@ void gprs_rlcmac_entity_free(struct gprs_rlcmac_entity *gre) * Hence memory pointed by "dl_tbf" is already freed and shall not be accessed. */ void gprs_rlcmac_entity_dl_tbf_freed(struct gprs_rlcmac_entity *gre, const struct gprs_rlcmac_dl_tbf *dl_tbf) { - if (gre->dl_tbf == dl_tbf) - gre->dl_tbf = NULL; + OSMO_ASSERT(gre); + OSMO_ASSERT(gre->dl_tbf); + OSMO_ASSERT(dl_tbf); + + /* GRE is freeing (destructor being called) do nothing */ + if (gre->freeing) + return; + + if (gre->dl_tbf != dl_tbf) { + /* This may happen if we already have a new DL TBF allocated + * immediately prior to freeing the old one (PACCH assignment + * reusing resources of old one). Nothing to do, simply wait for + * new DL TBF to do its job. + */ + return; + } + + gre->dl_tbf = NULL; + + /* Nothing to do, we are still in packet-transfer-mode using UL TBF. */ + if (gre->ul_tbf) + return; + + /* we have no DL nor UL TBFs. Go back to PACKET-IDLE state, and start + * packet-access-procedure if we still have data to be transmitted. + */ + gprs_rlcmac_submit_l1ctl_pdch_rel_req(); + gprs_rlcmac_entity_start_ul_tbf_pkt_acc_proc_if_needed(gre); } /* Called by ul_tbf destructor to inform the UL TBF pointer has been freed. * Hence memory pointed by "ul_tbf" is already freed and shall not be accessed. */ void gprs_rlcmac_entity_ul_tbf_freed(struct gprs_rlcmac_entity *gre, const struct gprs_rlcmac_ul_tbf *ul_tbf) { - if (gre->ul_tbf == ul_tbf) - gre->ul_tbf = NULL; + OSMO_ASSERT(gre); + OSMO_ASSERT(gre->ul_tbf); + OSMO_ASSERT(ul_tbf); + + /* GRE is freeing (destructor being called) do nothing */ + if (gre->freeing) + return; + + if (gre->ul_tbf != ul_tbf) { + /* This may happen if we already have a new UL TBF allocated + * immediately prior to freeing the old one (PACCH assignment + * reusing resources of old one). Nothing to do, simply wait for + * new UL TBF to do its job. + */ + return; + } + + gre->ul_tbf = NULL; + + /* Nothing to do, dl_tbf will eventually trigger request for UL TBF PACCH assignment. */ + if (gre->dl_tbf) + return; + + /* we have no DL nor UL TBFs. Go back to PACKET-IDLE state, and start + * packet-access-procedure if we still have data to be transmitted. + */ + gprs_rlcmac_submit_l1ctl_pdch_rel_req(); + gprs_rlcmac_entity_start_ul_tbf_pkt_acc_proc_if_needed(gre); } /* TS 44.060 5.3 In packet idle mode: @@ -129,6 +183,27 @@ bool gprs_rlcmac_entity_have_tx_data_queued(const struct gprs_rlcmac_entity *gre return gprs_rlcmac_llc_queue_size(gre->llc_queue) > 0; } +/* Create a new UL TBF and start Packet access procedure to get an UL assignment if needed */ +int gprs_rlcmac_entity_start_ul_tbf_pkt_acc_proc_if_needed(struct gprs_rlcmac_entity *gre) +{ + /* TS 44.060 5.3 "In packet idle mode, upper layers may require the + * transfer of a upper layer PDU, which implicitly triggers the + * establishment of a TBF and the transition to packet transfer mode." */ + if (!gprs_rlcmac_entity_in_packet_idle_mode(gre)) + return 0; + + if (!gprs_rlcmac_entity_have_tx_data_queued(gre)) + return 0; + + OSMO_ASSERT(!gre->ul_tbf); + /* We have data in the queue but we have no ul_tbf. Allocate one and start UL Assignment. */ + gre->ul_tbf = gprs_rlcmac_ul_tbf_alloc(gre); + if (!gre->ul_tbf) + return -ENOMEM; + /* We always use 1phase for now... */ + return gprs_rlcmac_tbf_ul_ass_start(gre->ul_tbf, GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); +} + int gprs_rlcmac_entity_llc_enqueue(struct gprs_rlcmac_entity *gre, uint8_t *ll_pdu, unsigned int ll_pdu_len, enum osmo_gprs_rlcmac_llc_sapi sapi, uint8_t radio_prio) { @@ -138,19 +213,7 @@ int gprs_rlcmac_entity_llc_enqueue(struct gprs_rlcmac_entity *gre, uint8_t *ll_p if (rc < 0) return rc; - /* TS 44.060 5.3 "In packet idle mode, upper layers may require the - * transfer of a upper layer PDU, which implicitly triggers the - * establishment of a TBF and the transition to packet transfer mode." */ - if (gprs_rlcmac_entity_in_packet_idle_mode(gre)) { - OSMO_ASSERT(!gre->ul_tbf); - /* We have new data in the queue but we have no ul_tbf. Allocate one and start UL Assignment. */ - gre->ul_tbf = gprs_rlcmac_ul_tbf_alloc(gre); - if (!gre->ul_tbf) - return -ENOMEM; - /* We always use 1phase for now... */ - rc = gprs_rlcmac_tbf_ul_ass_start(gre->ul_tbf, GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); - } - + rc = gprs_rlcmac_entity_start_ul_tbf_pkt_acc_proc_if_needed(gre); return rc; } diff --git a/src/rlcmac/rlcmac.c b/src/rlcmac/rlcmac.c index b026048..5cf4bb9 100644 --- a/src/rlcmac/rlcmac.c +++ b/src/rlcmac/rlcmac.c @@ -189,6 +189,18 @@ struct gprs_rlcmac_ul_tbf *gprs_rlcmac_find_ul_tbf_by_tfi(uint8_t ul_tfi) return NULL; } +/* Request lower layers to go to packet-idle mode: */ +int gprs_rlcmac_submit_l1ctl_pdch_rel_req(void) +{ + struct osmo_gprs_rlcmac_prim *rlcmac_prim; + + rlcmac_prim = gprs_rlcmac_prim_alloc_l1ctl_pdch_rel_req(); + + LOGRLCMAC(LOGL_INFO, "Tx L1CTL-PDCH_REL.req\n"); + + return gprs_rlcmac_prim_call_down_cb(rlcmac_prim); +} + static int gprs_rlcmac_handle_ccch_imm_ass_ul_tbf(uint8_t ts_nr, uint32_t fn, const struct gsm48_imm_ass *ia, const IA_RestOctets_t *iaro) { int rc = -ENOENT; diff --git a/src/rlcmac/tbf_dl_ass_fsm.c b/src/rlcmac/tbf_dl_ass_fsm.c index 40bd17c..9acf723 100644 --- a/src/rlcmac/tbf_dl_ass_fsm.c +++ b/src/rlcmac/tbf_dl_ass_fsm.c @@ -202,22 +202,23 @@ static void st_wait_tbf_starting_time(struct osmo_fsm_inst *fi, uint32_t event, static void st_compl_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) { struct gprs_rlcmac_tbf_dl_ass_fsm_ctx *ctx = (struct gprs_rlcmac_tbf_dl_ass_fsm_ctx *)fi->priv; - struct gprs_rlcmac_dl_tbf *dl_tbf; + struct gprs_rlcmac_dl_tbf *old_dl_tbf, *new_dl_tbf; - dl_tbf = gprs_rlcmac_dl_tbf_alloc(ctx->gre); + old_dl_tbf = ctx->gre->dl_tbf; + new_dl_tbf = gprs_rlcmac_dl_tbf_alloc(ctx->gre); /* Update TBF with allocated content: */ - memcpy(&dl_tbf->cur_alloc, &ctx->alloc, sizeof(ctx->alloc)); + memcpy(&new_dl_tbf->cur_alloc, &ctx->alloc, sizeof(ctx->alloc)); /* Replace old DL TBF with new one. 8.1.1.1.3: "the mobile station shall * release all ongoing downlink TBFs not addressed by this message and * shall act on the message. All ongoing uplink TBFs shall be maintained;" */ - gprs_rlcmac_dl_tbf_free(ctx->gre->dl_tbf); - ctx->gre->dl_tbf = dl_tbf; + ctx->gre->dl_tbf = new_dl_tbf; + gprs_rlcmac_dl_tbf_free(old_dl_tbf); /* Inform the main TBF state about the assignment completed: */ - osmo_fsm_inst_dispatch(dl_tbf->state_fsm.fi, GPRS_RLCMAC_TBF_DL_EV_DL_ASS_COMPL, NULL); + osmo_fsm_inst_dispatch(new_dl_tbf->state_fsm.fi, GPRS_RLCMAC_TBF_DL_EV_DL_ASS_COMPL, NULL); /* Go back to IDLE state. */ tbf_dl_ass_fsm_state_chg(fi, GPRS_RLCMAC_TBF_DL_ASS_ST_IDLE); } diff --git a/src/rlcmac/tbf_ul_fsm.c b/src/rlcmac/tbf_ul_fsm.c index e713085..37d2e4a 100644 --- a/src/rlcmac/tbf_ul_fsm.c +++ b/src/rlcmac/tbf_ul_fsm.c @@ -97,7 +97,7 @@ static void reinit_pkt_acces_procedure(struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx) { int rc; /* TS 44.060 sub-clause 7.1.4. Reinitiate the packet access procedure: - * Move to NEW state, start Ass and wait for GPRS_RLCMAC_TBF_UL_ASS_EV_START */ + * Move to NEW state, start Ass and wait for GPRS_RLCMAC_TBF_UL_ASS_EV_START */ tbf_ul_fsm_state_chg(ctx->fi, GPRS_RLCMAC_TBF_UL_ST_NEW); /* We always use 1phase for now... */ rc = gprs_rlcmac_tbf_ul_ass_start(ctx->ul_tbf, GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); @@ -139,6 +139,8 @@ static void st_new_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) gprs_rlcmac_rlc_ul_window_mark_for_resend(ctx->ul_tbf->ulw); /* Make sure the lower layers realize this tbf_nr has no longer any assigned resource: */ release_ul_tbf(ctx); + /* Move back to CCCH */ + gprs_rlcmac_submit_l1ctl_pdch_rel_req(); } static void st_new(struct osmo_fsm_inst *fi, uint32_t event, void *data) diff --git a/tests/rlcmac/rlcmac_prim_test.err b/tests/rlcmac/rlcmac_prim_test.err index ea4d2e5..5f8cbbb 100644 --- a/tests/rlcmac/rlcmac_prim_test.err +++ b/tests/rlcmac/rlcmac_prim_test.err @@ -69,6 +69,8 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated DLGLOBAL INFO UL_TBF{RELEASING}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request DLGLOBAL INFO UL_TBF{RELEASING}: Deallocated +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL INFO DL_TBF_ASS{IDLE}: Deallocated DLGLOBAL INFO Rx from upper layers: GRR-UNITDATA.request DLGLOBAL INFO TLLI=0x00002342 not found, creating entity on the fly @@ -97,6 +99,8 @@ DLGLOBAL INFO UL_TBF{FLOW}: T3164 timeout attempts=1 DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN @@ -119,6 +123,8 @@ DLGLOBAL INFO UL_TBF{FLOW}: T3164 timeout attempts=2 DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN @@ -141,6 +147,8 @@ DLGLOBAL INFO UL_TBF{FLOW}: T3164 timeout attempts=3 DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN @@ -165,7 +173,21 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated DLGLOBAL INFO UL_TBF{FLOW}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request DLGLOBAL INFO UL_TBF{FLOW}: Deallocated +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request +DLGLOBAL INFO UL_TBF{NEW}: Allocated +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Allocated +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START +DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START +DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7a +DLGLOBAL DEBUG Tx to lower layers: L1CTL-RACH.request +DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL INFO DL_TBF_ASS{IDLE}: Deallocated +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Deallocated +DLGLOBAL INFO UL_TBF{ASSIGN}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=1 (release) +DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request +DLGLOBAL INFO UL_TBF{ASSIGN}: Deallocated DLGLOBAL INFO Rx from upper layers: GRR-UNITDATA.request DLGLOBAL INFO TLLI=0x00002342 not found, creating entity on the fly DLGLOBAL INFO DL_TBF_ASS{IDLE}: Allocated @@ -174,7 +196,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: Allocated DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN -DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7a +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7c DLGLOBAL DEBUG Tx to lower layers: L1CTL-RACH.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication @@ -207,10 +229,12 @@ DLGLOBAL INFO UL_TBF{FLOW}: T3166 timeout attempts=1 DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN -DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7c +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x79 DLGLOBAL DEBUG Tx to lower layers: L1CTL-RACH.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication @@ -240,10 +264,12 @@ DLGLOBAL INFO UL_TBF{FLOW}: T3166 timeout attempts=2 DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN -DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x79 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7d DLGLOBAL DEBUG Tx to lower layers: L1CTL-RACH.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication @@ -273,10 +299,12 @@ DLGLOBAL INFO UL_TBF{FLOW}: T3166 timeout attempts=3 DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN -DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7d +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7a DLGLOBAL DEBUG Tx to lower layers: L1CTL-RACH.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication @@ -308,6 +336,8 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated DLGLOBAL INFO UL_TBF{FLOW}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request DLGLOBAL INFO UL_TBF{FLOW}: Deallocated +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL INFO DL_TBF_ASS{IDLE}: Deallocated DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL DEBUG Rx SI13 from lower layers @@ -319,7 +349,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: Allocated DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN -DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7a +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7b DLGLOBAL DEBUG Tx to lower layers: L1CTL-RACH.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL INFO Rx from upper layers: GRR-UNITDATA.request @@ -460,10 +490,12 @@ DLGLOBAL INFO UL_TBF{FINISHED}: Received Event N3104_MAX DLGLOBAL INFO UL_TBF{FINISHED}: state_chg to NEW DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN -DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7b +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7a DLGLOBAL DEBUG Tx to lower layers: L1CTL-RACH.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_DATA.request @@ -491,7 +523,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: Allocated DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN -DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7a +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7b DLGLOBAL DEBUG Tx to lower layers: L1CTL-RACH.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication @@ -547,6 +579,8 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated DLGLOBAL INFO UL_TBF{FINISHED}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request DLGLOBAL INFO UL_TBF{FINISHED}: Deallocated +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL INFO DL_TBF_ASS{IDLE}: Deallocated DLGLOBAL INFO Rx from upper layers: GRR-UNITDATA.request DLGLOBAL INFO TLLI=0x00002342 not found, creating entity on the fly @@ -655,6 +689,8 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated DLGLOBAL INFO UL_TBF{FINISHED}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request DLGLOBAL INFO UL_TBF{FINISHED}: Deallocated +DLGLOBAL INFO Tx L1CTL-PDCH_REL.req +DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_RELEASE.request DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_DATA.request DLGLOBAL INFO DL_TBF_ASS{IDLE}: Deallocated DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication @@ -667,7 +703,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: Allocated DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN -DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7b +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7e DLGLOBAL DEBUG Tx to lower layers: L1CTL-RACH.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication @@ -776,7 +812,7 @@ DLGLOBAL INFO UL_TBF_ASS{IDLE}: Allocated DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN -DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7e +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7c DLGLOBAL DEBUG Tx to lower layers: L1CTL-RACH.request DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication diff --git a/tests/rlcmac/rlcmac_prim_test.ok b/tests/rlcmac/rlcmac_prim_test.ok index 12e5ece..a3e82c3 100644 --- a/tests/rlcmac/rlcmac_prim_test.ok +++ b/tests/rlcmac/rlcmac_prim_test.ok @@ -8,6 +8,7 @@ test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=4 ts=7 data_len=34 dat test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=8 ts=7 data_len=34 data=[00 01 02 1d 00 00 23 42 11 e5 10 00 e2 18 f2 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 ] test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=21 ts=7 data_len=23 data=[40 04 00 00 8d 08 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b ] test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request === test_ul_tbf_attach end === === test_ul_tbf_t3164_timeout start === sys={0.000000}, mono={0.000000}: clock_override_set @@ -17,28 +18,34 @@ test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask= sys={5.000000}, mono={5.000000}: clock_override_add sys={5.000000}, mono={5.000000}: Expect T3164 timeout test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7b test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 sys={10.000000}, mono={10.000000}: clock_override_add sys={10.000000}, mono={10.000000}: Expect T3164 timeout test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x79 test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 sys={15.000000}, mono={15.000000}: clock_override_add sys={15.000000}, mono={15.000000}: Expect T3164 timeout test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x78 test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 sys={20.000000}, mono={20.000000}: clock_override_add sys={20.000000}, mono={20.000000}: Expect T3164 timeout test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7a === test_ul_tbf_t3164_timeout end === +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=1 ul_slotmask=0x00 === test_ul_tbf_t3166_timeout start === sys={0.000000}, mono={0.000000}: clock_override_set -test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7a +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7c test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 test_rlcmac_prim_up_cb(): Rx GMMRR-LLC_TRANSMITTED.indication TLLI=0x00002342 @@ -46,31 +53,35 @@ test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=4 ts=7 data_len=34 dat sys={5.000000}, mono={5.000000}: clock_override_add sys={5.000000}, mono={5.000000}: Expect T3166 timeout test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 -test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7c +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x79 test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=4 ts=7 data_len=34 data=[3c 01 01 00 00 23 42 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 00 ] sys={10.000000}, mono={10.000000}: clock_override_add sys={10.000000}, mono={10.000000}: Expect T3166 timeout test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 -test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x79 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7d test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=4 ts=7 data_len=34 data=[3c 01 01 00 00 23 42 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 00 ] sys={15.000000}, mono={15.000000}: clock_override_add sys={15.000000}, mono={15.000000}: Expect T3166 timeout test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 -test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7d +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7a test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=4 ts=7 data_len=34 data=[3c 01 01 00 00 23 42 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 00 ] sys={20.000000}, mono={20.000000}: clock_override_add sys={20.000000}, mono={20.000000}: Expect T3166 timeout test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request === test_ul_tbf_t3166_timeout end === === test_ul_tbf_n3104_timeout start === sys={0.000000}, mono={0.000000}: clock_override_set -test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7a +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7b test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 RTS 0: FN=8 @@ -99,7 +110,8 @@ RTS 10: FN=52 test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=52 ts=7 data_len=34 data=[3c 01 02 1f 00 00 23 42 11 e5 10 00 e2 18 f2 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 00 ] RTS 11: FN=56 test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 -test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7b +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7a test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=56 ts=7 data_len=34 data=[00 01 04 3d 00 00 23 42 71 62 f2 24 6c 84 44 04 11 e5 10 00 e2 18 f2 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 ] test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 @@ -107,7 +119,7 @@ test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask= test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 === test_ul_tbf_t3182_timeout start === sys={0.000000}, mono={0.000000}: clock_override_set -test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7a +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7b test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 test_rlcmac_prim_up_cb(): Rx GMMRR-LLC_TRANSMITTED.indication TLLI=0x00002342 @@ -116,6 +128,7 @@ test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=8 ts=7 data_len=34 dat sys={5.000000}, mono={5.000000}: clock_override_add sys={5.000000}, mono={5.000000}: Expect T3182 timeout test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request === test_ul_tbf_t3182_timeout end === === test_ul_tbf_last_data_cv0_retrans_max start === sys={0.000000}, mono={0.000000}: clock_override_set @@ -133,11 +146,12 @@ RTS 2: FN=21 test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=21 ts=7 data_len=34 data=[00 00 02 1d 11 e5 10 00 e2 18 f2 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 ] RTS 3: FN=26 test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_RELEASE.request test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=26 ts=7 data_len=34 data=[00 00 02 1d 11 e5 10 00 e2 18 f2 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 ] === test_ul_tbf_last_data_cv0_retrans_max end === === test_ul_tbf_countdown_procedure start === sys={0.000000}, mono={0.000000}: clock_override_set -test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7b +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7e test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 test_rlcmac_prim_up_cb(): Rx GMMRR-LLC_TRANSMITTED.indication TLLI=0x00002342 @@ -158,7 +172,7 @@ test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=30 ts=7 data_len=34 da test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 === test_ul_tbf_request_another_ul_tbf start === sys={0.000000}, mono={0.000000}: clock_override_set -test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7e +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7c test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 test_rlcmac_prim_up_cb(): Rx GMMRR-LLC_TRANSMITTED.indication TLLI=0x00002342 |