Change in osmo-pcu[master]: tbf: Drop unuseful flag GPRS_RLCMAC_FLAG_TO_UL_ASS

pespin gerrit-no-reply at lists.osmocom.org
Tue Jul 27 14:42:49 UTC 2021


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


Change subject: tbf: Drop unuseful flag GPRS_RLCMAC_FLAG_TO_UL_ASS
......................................................................

tbf: Drop unuseful flag GPRS_RLCMAC_FLAG_TO_UL_ASS

The flag is only used to print some uninteresting stuff, let's drop it
in order to simplify code. We can add later whatever we want in the new
shiny FSM.

Change-Id: I20aa7f83cc4f32de129e64c74a91745b983a7b16
---
M src/pdch.cpp
M src/tbf.cpp
M src/tbf.h
M src/tbf_ul_ass_fsm.c
M tests/tbf/TbfTest.err
5 files changed, 13 insertions(+), 17 deletions(-)



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

diff --git a/src/pdch.cpp b/src/pdch.cpp
index 9bbb16a..8c61293 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -394,8 +394,6 @@
 			tbf_free(tbf);
 
 		osmo_fsm_inst_dispatch(new_tbf->state_fsm.fi, TBF_EV_ASSIGN_ACK_PACCH, NULL);
-		if (new_tbf->check_n_clear(GPRS_RLCMAC_FLAG_TO_UL_ASS))
-			LOGPTBF(new_tbf, LOGL_NOTICE, "Recovered uplink assignment for UL\n");
 
 		tbf_assign_control_ts(new_tbf);
 		/* there might be LLC packets waiting in the queue, but the DL
diff --git a/src/tbf.cpp b/src/tbf.cpp
index e3b9fa8..fa916db 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -625,12 +625,6 @@
 		}
 
 	} else if (ul_ass_state_is(TBF_UL_ASS_WAIT_ACK)) {
-		if (!(state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_TO_UL_ASS))) {
-			LOGPTBF(this, LOGL_NOTICE,
-				"Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: %s\n",
-				tbf_rlcmac_diag(this));
-			state_fsm.state_flags |= (1 << GPRS_RLCMAC_FLAG_TO_UL_ASS);
-		}
 		bts_do_rate_ctr_inc(bts, CTR_RLC_ASS_TIMEDOUT);
 		bts_do_rate_ctr_inc(bts, CTR_PUA_POLL_TIMEDOUT);
 		if (n_inc(N3105)) {
diff --git a/src/tbf.h b/src/tbf.h
index da683b6..45f3a4e 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -138,8 +138,7 @@
 #define GPRS_RLCMAC_FLAG_DL_ACK		3 /* downlink acknowledge received  */
 #define GPRS_RLCMAC_FLAG_TO_UL_ACK	4
 #define GPRS_RLCMAC_FLAG_TO_DL_ACK	5
-#define GPRS_RLCMAC_FLAG_TO_UL_ASS	6
-#define GPRS_RLCMAC_FLAG_TO_DL_ASS	7
+#define GPRS_RLCMAC_FLAG_TO_DL_ASS	6
 #define GPRS_RLCMAC_FLAG_TO_MASK	0xf0 /* timeout bits */
 
 #define T_START(tbf, t, T, r, f) tbf->t_start(t, T, r, f, __FILE__, __LINE__)
diff --git a/src/tbf_ul_ass_fsm.c b/src/tbf_ul_ass_fsm.c
index 39daf89..95574b4 100644
--- a/src/tbf_ul_ass_fsm.c
+++ b/src/tbf_ul_ass_fsm.c
@@ -211,11 +211,16 @@
 
 static void st_wait_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data)
 {
+	struct tbf_ul_ass_fsm_ctx *ctx = (struct tbf_ul_ass_fsm_ctx *)fi->priv;
+
 	switch (event) {
 	case TBF_UL_ASS_EV_RX_ASS_CTRL_ACK:
 		tbf_ul_ass_fsm_state_chg(fi, TBF_UL_ASS_NONE);
 		break;
 	case TBF_UL_ASS_EV_ASS_POLL_TIMEOUT:
+		LOGPTBF(ctx->tbf, LOGL_NOTICE,
+			"Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: %s\n",
+			tbf_rlcmac_diag(ctx->tbf));
 		/* Reschedule Plt Ul Ass */
 		tbf_ul_ass_fsm_state_chg(fi, TBF_UL_ASS_SEND_ASS);
 		break;
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 7a691ba..f9c8a4b 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -8422,9 +8422,9 @@
 PDCH(bts=0,trx=0,ts=7) Expiring FN=56 but previous FN=2654231 is still reserved!
 PDCH(bts=0,trx=0,ts=7) Timeout for registered POLL (FN=2654231): TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN EGPRS)
 TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN EGPRS) poll timeout for FN=2654231, TS=7 (curr FN 56)
-TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN EGPRS) N3105 0 => 1 (< MAX 8)
 UL_ASS_TBF{WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
+TBF(TFI=0 TLLI=0xffeeddcc DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 UL_ASS_TBF{WAIT_ACK}: state_chg to SEND_ASS
 UL_ASS_TBF{SEND_ASS}: Received Event CREATE_RLCMAC_MSG
 PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654218 + 13 = 2654231
@@ -8472,9 +8472,9 @@
 PDCH(bts=0,trx=0,ts=7) Expiring FN=60 but previous FN=2654231 is still reserved!
 PDCH(bts=0,trx=0,ts=7) Timeout for registered POLL (FN=2654231): TBF(TFI=1 TLLI=0xffeeddcd DIR=UL STATE=ASSIGN EGPRS)
 TBF(TFI=1 TLLI=0xffeeddcd DIR=UL STATE=ASSIGN EGPRS) poll timeout for FN=2654231, TS=7 (curr FN 60)
-TBF(TFI=1 TLLI=0xffeeddcd DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 TBF(TFI=1 TLLI=0xffeeddcd DIR=UL STATE=ASSIGN EGPRS) N3105 0 => 1 (< MAX 8)
 UL_ASS_TBF{WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
+TBF(TFI=1 TLLI=0xffeeddcd DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 UL_ASS_TBF{WAIT_ACK}: state_chg to SEND_ASS
 UL_ASS_TBF{SEND_ASS}: Received Event CREATE_RLCMAC_MSG
 PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654218 + 13 = 2654231
@@ -8522,9 +8522,9 @@
 PDCH(bts=0,trx=0,ts=7) Expiring FN=65 but previous FN=2654231 is still reserved!
 PDCH(bts=0,trx=0,ts=7) Timeout for registered POLL (FN=2654231): TBF(TFI=2 TLLI=0xffeeddce DIR=UL STATE=ASSIGN EGPRS)
 TBF(TFI=2 TLLI=0xffeeddce DIR=UL STATE=ASSIGN EGPRS) poll timeout for FN=2654231, TS=7 (curr FN 65)
-TBF(TFI=2 TLLI=0xffeeddce DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 TBF(TFI=2 TLLI=0xffeeddce DIR=UL STATE=ASSIGN EGPRS) N3105 0 => 1 (< MAX 8)
 UL_ASS_TBF{WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
+TBF(TFI=2 TLLI=0xffeeddce DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 UL_ASS_TBF{WAIT_ACK}: state_chg to SEND_ASS
 UL_ASS_TBF{SEND_ASS}: Received Event CREATE_RLCMAC_MSG
 PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654218 + 13 = 2654231
@@ -8572,9 +8572,9 @@
 PDCH(bts=0,trx=0,ts=7) Expiring FN=69 but previous FN=2654231 is still reserved!
 PDCH(bts=0,trx=0,ts=7) Timeout for registered POLL (FN=2654231): TBF(TFI=3 TLLI=0xffeeddcf DIR=UL STATE=ASSIGN EGPRS)
 TBF(TFI=3 TLLI=0xffeeddcf DIR=UL STATE=ASSIGN EGPRS) poll timeout for FN=2654231, TS=7 (curr FN 69)
-TBF(TFI=3 TLLI=0xffeeddcf DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 TBF(TFI=3 TLLI=0xffeeddcf DIR=UL STATE=ASSIGN EGPRS) N3105 0 => 1 (< MAX 8)
 UL_ASS_TBF{WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
+TBF(TFI=3 TLLI=0xffeeddcf DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 UL_ASS_TBF{WAIT_ACK}: state_chg to SEND_ASS
 UL_ASS_TBF{SEND_ASS}: Received Event CREATE_RLCMAC_MSG
 PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654218 + 13 = 2654231
@@ -8622,9 +8622,9 @@
 PDCH(bts=0,trx=0,ts=7) Expiring FN=73 but previous FN=2654231 is still reserved!
 PDCH(bts=0,trx=0,ts=7) Timeout for registered POLL (FN=2654231): TBF(TFI=4 TLLI=0xffeeddd0 DIR=UL STATE=ASSIGN EGPRS)
 TBF(TFI=4 TLLI=0xffeeddd0 DIR=UL STATE=ASSIGN EGPRS) poll timeout for FN=2654231, TS=7 (curr FN 73)
-TBF(TFI=4 TLLI=0xffeeddd0 DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 TBF(TFI=4 TLLI=0xffeeddd0 DIR=UL STATE=ASSIGN EGPRS) N3105 0 => 1 (< MAX 8)
 UL_ASS_TBF{WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
+TBF(TFI=4 TLLI=0xffeeddd0 DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 UL_ASS_TBF{WAIT_ACK}: state_chg to SEND_ASS
 UL_ASS_TBF{SEND_ASS}: Received Event CREATE_RLCMAC_MSG
 PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654218 + 13 = 2654231
@@ -8672,9 +8672,9 @@
 PDCH(bts=0,trx=0,ts=7) Expiring FN=78 but previous FN=2654231 is still reserved!
 PDCH(bts=0,trx=0,ts=7) Timeout for registered POLL (FN=2654231): TBF(TFI=5 TLLI=0xffeeddd1 DIR=UL STATE=ASSIGN EGPRS)
 TBF(TFI=5 TLLI=0xffeeddd1 DIR=UL STATE=ASSIGN EGPRS) poll timeout for FN=2654231, TS=7 (curr FN 78)
-TBF(TFI=5 TLLI=0xffeeddd1 DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 TBF(TFI=5 TLLI=0xffeeddd1 DIR=UL STATE=ASSIGN EGPRS) N3105 0 => 1 (< MAX 8)
 UL_ASS_TBF{WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
+TBF(TFI=5 TLLI=0xffeeddd1 DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 UL_ASS_TBF{WAIT_ACK}: state_chg to SEND_ASS
 UL_ASS_TBF{SEND_ASS}: Received Event CREATE_RLCMAC_MSG
 PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654218 + 13 = 2654231
@@ -8722,9 +8722,9 @@
 PDCH(bts=0,trx=0,ts=7) Expiring FN=82 but previous FN=2654231 is still reserved!
 PDCH(bts=0,trx=0,ts=7) Timeout for registered POLL (FN=2654231): TBF(TFI=6 TLLI=0xffeeddd2 DIR=UL STATE=ASSIGN EGPRS)
 TBF(TFI=6 TLLI=0xffeeddd2 DIR=UL STATE=ASSIGN EGPRS) poll timeout for FN=2654231, TS=7 (curr FN 82)
-TBF(TFI=6 TLLI=0xffeeddd2 DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 TBF(TFI=6 TLLI=0xffeeddd2 DIR=UL STATE=ASSIGN EGPRS) N3105 0 => 1 (< MAX 8)
 UL_ASS_TBF{WAIT_ACK}: Received Event ASS_POLL_TIMEOUT
+TBF(TFI=6 TLLI=0xffeeddd2 DIR=UL STATE=ASSIGN EGPRS) Timeout for polling PACKET CONTROL ACK for PACKET UPLINK ASSIGNMENT: |Assignment was on PACCH|No uplink data received yet|
 UL_ASS_TBF{WAIT_ACK}: state_chg to SEND_ASS
 UL_ASS_TBF{SEND_ASS}: Received Event CREATE_RLCMAC_MSG
 PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654218 + 13 = 2654231

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I20aa7f83cc4f32de129e64c74a91745b983a7b16
Gerrit-Change-Number: 25059
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210727/bae92d17/attachment.htm>


More information about the gerrit-log mailing list