From 8d347143bab0e8193fe02674028c08f1621d1498 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 16 Oct 2023 17:20:30 +0200 Subject: rlcmac: Avoid re-arming T3182 in TBF Acknowledged mode Re-arming upon retransmission of block CV=0 is only described in the unacknowledged mode of operation. Change-Id: I532def7f87367b446b5370daf8c81f511e26eb5f --- src/rlcmac/tbf_ul_fsm.c | 21 ++++++++++++++------- tests/rlcmac/rlcmac_prim_test.err | 5 ----- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/rlcmac/tbf_ul_fsm.c b/src/rlcmac/tbf_ul_fsm.c index e5a2f9a..43cb02f 100644 --- a/src/rlcmac/tbf_ul_fsm.c +++ b/src/rlcmac/tbf_ul_fsm.c @@ -88,9 +88,13 @@ static void reinit_pkt_acces_procedure(struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx) gprs_rlcmac_ul_tbf_free(ctx->ul_tbf); } -/* 9.3.3.3.2: Upon each retransmission of the last block with CV=0, the mobile station shall restart timer T3182 for the TBF. -* Slight impl deviation from spec: If tbf is still in contention resolution, keep using T3166, otherwise start T3182 -*/ +/* 9.3.2.4.2 (acknowledged mode): When the mobile station has sent the RLC data + * block with CV = 0 and there are no elements in the V(B) array set to the value + * Nacked, it shall start timer T3182 for this TBF. + * 9.3.3.3.2 (unacknowledged mode): Upon each retransmission of the last block + * with CV=0, the mobile station shall restart timer T3182 for the TBF. + * Slight impl deviation from spec: If tbf is still in contention resolution, keep using T3166, otherwise start T3182 + */ static void arm_T3182_if_needed(struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx) { struct osmo_fsm_inst *fi = ctx->fi; @@ -102,10 +106,13 @@ static void arm_T3182_if_needed(struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx) } else { OSMO_ASSERT(!osmo_timer_pending(&fi->timer) || (osmo_timer_pending(&fi->timer) && fi->T == 3182)); - LOGPFSML(ctx->fi, LOGL_INFO, "Last UL block sent (CV=0), start T3182\n"); - fi->T = 3182; - val_sec = osmo_tdef_get(g_rlcmac_ctx->T_defs, fi->T, OSMO_TDEF_S, -1); - osmo_timer_schedule(&fi->timer, val_sec, 0); + /* TODO: once unacked mode is supported: || unacked_mode(ctx->ul_tbf) */ + if (!osmo_timer_pending(&fi->timer)) { + LOGPFSML(ctx->fi, LOGL_INFO, "Last UL block sent (CV=0), start T3182\n"); + fi->T = 3182; + val_sec = osmo_tdef_get(g_rlcmac_ctx->T_defs, fi->T, OSMO_TDEF_S, -1); + osmo_timer_schedule(&fi->timer, val_sec, 0); + } } } diff --git a/tests/rlcmac/rlcmac_prim_test.err b/tests/rlcmac/rlcmac_prim_test.err index 19b289f..9435c04 100644 --- a/tests/rlcmac/rlcmac_prim_test.err +++ b/tests/rlcmac/rlcmac_prim_test.err @@ -599,7 +599,6 @@ DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN=1 CV=0) DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 1, CS-2): 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 DLGLOBAL INFO UL_TBF{FINISHED}: Received Event LAST_UL_DATA_SENT DLGLOBAL INFO UL_TBF{FINISHED}: Data block with CV=0 retransmit attempts=1 -DLGLOBAL INFO UL_TBF{FINISHED}: Last UL block sent (CV=0), start T3182 DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_DATA.request DLGLOBAL DEBUG Rx from lower layers: L1CTL-PDCH_RTS.indication DLGLOBAL DEBUG Rx RTS.ind (fn=17, ts=7, usf=0) @@ -611,7 +610,6 @@ DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN=1 CV=0) DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 1, CS-2): 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 DLGLOBAL INFO UL_TBF{FINISHED}: Received Event LAST_UL_DATA_SENT DLGLOBAL INFO UL_TBF{FINISHED}: Data block with CV=0 retransmit attempts=2 -DLGLOBAL INFO UL_TBF{FINISHED}: Last UL block sent (CV=0), start T3182 DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_DATA.request DLGLOBAL DEBUG Rx from lower layers: L1CTL-PDCH_RTS.indication DLGLOBAL DEBUG Rx RTS.ind (fn=21, ts=7, usf=0) @@ -623,7 +621,6 @@ DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN=1 CV=0) DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 1, CS-2): 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 DLGLOBAL INFO UL_TBF{FINISHED}: Received Event LAST_UL_DATA_SENT DLGLOBAL INFO UL_TBF{FINISHED}: Data block with CV=0 retransmit attempts=3 -DLGLOBAL INFO UL_TBF{FINISHED}: Last UL block sent (CV=0), start T3182 DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_DATA.request DLGLOBAL DEBUG Rx from lower layers: L1CTL-PDCH_RTS.indication DLGLOBAL DEBUG Rx RTS.ind (fn=26, ts=7, usf=0) @@ -635,7 +632,6 @@ DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN=1 CV=0) DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 1, CS-2): 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 DLGLOBAL INFO UL_TBF{FINISHED}: Received Event LAST_UL_DATA_SENT DLGLOBAL INFO UL_TBF{FINISHED}: Data block with CV=0 retransmit attempts=4 -DLGLOBAL INFO UL_TBF{FINISHED}: Last UL block sent (CV=0), start T3182 DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_DATA.request DLGLOBAL DEBUG Rx from lower layers: L1CTL-PDCH_RTS.indication DLGLOBAL DEBUG Rx RTS.ind (fn=30, ts=7, usf=0) @@ -647,7 +643,6 @@ DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN=1 CV=0) DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 1, CS-2): 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 DLGLOBAL INFO UL_TBF{FINISHED}: Received Event LAST_UL_DATA_SENT DLGLOBAL INFO UL_TBF{FINISHED}: Data block with CV=0 retransmit attempts=5 -DLGLOBAL INFO UL_TBF{FINISHED}: Last UL block sent (CV=0), start T3182 DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_DATA.request DLGLOBAL INFO UL_TBF{FINISHED}: Timeout of T3182 DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated -- cgit v1.2.3