pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/34770?usp=email )


Change subject: rlcmac: Avoid re-arming T3182 in TBF Acknowledged mode
......................................................................

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
---
M src/rlcmac/tbf_ul_fsm.c
M tests/rlcmac/rlcmac_prim_test.err
2 files changed, 26 insertions(+), 12 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/70/34770/1

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 @@
                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 @@
        } 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) 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) 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) 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) 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) 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

--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34770?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I532def7f87367b446b5370daf8c81f511e26eb5f
Gerrit-Change-Number: 34770
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to