Change in osmo-pcu[master]: pdch: Log pdch_ulc reason upon rx of pkt ctrl ack

pespin gerrit-no-reply at lists.osmocom.org
Mon Jun 7 16:18:42 UTC 2021


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


Change subject: pdch: Log pdch_ulc reason upon rx of pkt ctrl ack
......................................................................

pdch: Log pdch_ulc reason upon rx of pkt ctrl ack

Change-Id: I7c7a421b1e9189e2814e9a28698d66655fc9ba60
---
M src/pdch.cpp
M src/pdch_ul_controller.c
M src/pdch_ul_controller.h
M tests/tbf/TbfTest.err
4 files changed, 30 insertions(+), 18 deletions(-)



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

diff --git a/src/pdch.cpp b/src/pdch.cpp
index cab81df..8e0a24a 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -333,7 +333,8 @@
 
 	tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
 
-	LOGPTBF(tbf, LOGL_DEBUG, "RX: [PCU <- BTS] Packet Control Ack\n");
+	LOGPTBF(tbf, LOGL_DEBUG, "FN=%" PRIu32 " Rx Packet Control Ack (reason=%s)\n",
+		fn, get_value_string(pdch_ulc_tbf_poll_reason_names, reason));
 	pdch_ulc_release_fn(ulc, fn);
 
 	/* check if this control ack belongs to packet uplink ack */
@@ -420,8 +421,9 @@
 		 */
 		return;
 	}
-	LOGPDCH(this, DRLCMAC, LOGL_ERROR,
-		"Error: received PACET CONTROL ACK at no request\n");
+	LOGPDCH(this, DRLCMAC, LOGL_ERROR, "FN=%" PRIu32 " "
+		"Error: received PACKET CONTROL ACK at no request (reason=%s)\n", fn,
+		get_value_string(pdch_ulc_tbf_poll_reason_names, reason));
 }
 
 void gprs_rlcmac_pdch::rcv_control_dl_ack_nack(Packet_Downlink_Ack_Nack_t *ack_nack, uint32_t fn, struct pcu_l1_meas *meas)
diff --git a/src/pdch_ul_controller.c b/src/pdch_ul_controller.c
index f8089ff..e7a721c 100644
--- a/src/pdch_ul_controller.c
+++ b/src/pdch_ul_controller.c
@@ -38,6 +38,15 @@
 	{ 0, NULL }
 };
 
+const struct value_string pdch_ulc_tbf_poll_reason_names[] = {
+	{ PDCH_ULC_POLL_UL_ASS, "UL_ASS" },
+	{ PDCH_ULC_POLL_DL_ASS, "DL_ASS" },
+	{ PDCH_ULC_POLL_UL_ACK, "UL_ACK" },
+	{ PDCH_ULC_POLL_DL_ACK, "DL_ACK" },
+	{ PDCH_ULC_POLL_CELL_CHG_CONTINUE, "CELL_CHG_CONTINUE" },
+	{ 0, NULL }
+};
+
 #define GSM_MAX_FN_THRESH (GSM_MAX_FN >> 1)
 /* 0: equal, -1: fn1 BEFORE fn2, 1: fn1 AFTER fn2 */
 static inline int fn_cmp(uint32_t fn1, uint32_t fn2)
diff --git a/src/pdch_ul_controller.h b/src/pdch_ul_controller.h
index 776f5ba..c56945f 100644
--- a/src/pdch_ul_controller.h
+++ b/src/pdch_ul_controller.h
@@ -59,6 +59,7 @@
 	PDCH_ULC_POLL_DL_ACK, /* Expect DL ACK/NACK requested by RRBP */
 	PDCH_ULC_POLL_CELL_CHG_CONTINUE, /* Expect CTRL ACK for Pkt cell Change Continue we transmit */
 };
+extern const struct value_string pdch_ulc_tbf_poll_reason_names[];
 
 struct pdch_ulc_node {
 	struct rb_node node;	  /*! entry in pdch_ulc->tree_root */
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index c2bcb57..0306562 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -1602,7 +1602,7 @@
 Detected FN jump! 2654270 -> 2654283
 PDCH(bts=0,trx=0,ts=7) FN=2654283 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654283 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) FN=2654283 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -1686,7 +1686,7 @@
 Detected FN jump! 2654270 -> 2654283
 PDCH(bts=0,trx=0,ts=7) FN=2654283 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654283 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) FN=2654283 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -1737,7 +1737,7 @@
 Detected FN jump! 2654275 -> 2654288
 PDCH(bts=0,trx=0,ts=7) FN=2654288 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654288 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) FN=2654288 Rx Packet Control Ack (reason=DL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) [UPLINK] DOWNLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) changes DL ASS state from GPRS_RLCMAC_DL_ASS_WAIT_ACK to GPRS_RLCMAC_DL_ASS_NONE
 TBF(DL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -1840,7 +1840,7 @@
 Detected FN jump! 2654348 -> 2654361
 PDCH(bts=0,trx=0,ts=7) FN=2654361 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654361 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) FN=2654361 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_1){ASSIGN}: state_chg to FLOW
@@ -1917,7 +1917,7 @@
 Detected FN jump! 2654270 -> 2654283
 PDCH(bts=0,trx=0,ts=7) FN=2654283 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654283 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) FN=2654283 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -2003,7 +2003,7 @@
 Detected FN jump! 2654327 -> 2654340
 PDCH(bts=0,trx=0,ts=7) FN=2654340 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654340 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) FN=2654340 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -2062,7 +2062,7 @@
 Detected FN jump! 2654270 -> 2654283
 PDCH(bts=0,trx=0,ts=7) FN=2654283 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654283 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) FN=2654283 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -2210,7 +2210,7 @@
 Detected FN jump! 2654270 -> 2654283
 PDCH(bts=0,trx=0,ts=7) FN=2654283 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654283 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) FN=2654283 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -2301,7 +2301,7 @@
 Detected FN jump! 2654275 -> 2654288
 PDCH(bts=0,trx=0,ts=7) FN=2654288 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654288 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) FN=2654288 Rx Packet Control Ack (reason=DL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) [UPLINK] DOWNLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) changes DL ASS state from GPRS_RLCMAC_DL_ASS_WAIT_ACK to GPRS_RLCMAC_DL_ASS_NONE
 TBF(DL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -2969,7 +2969,7 @@
 Detected FN jump! 2654379 -> 2654409
 PDCH(bts=0,trx=0,ts=7) FN=2654409 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654409 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT_RELEASE) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT_RELEASE) FN=2654409 Rx Packet Control Ack (reason=DL_ACK)
 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT_RELEASE) [UPLINK] DOWNLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=WAIT_RELEASE) changes DL ASS state from GPRS_RLCMAC_DL_ASS_WAIT_ACK to GPRS_RLCMAC_DL_ASS_NONE
 TBF(DL-TFI_0){WAIT_RELEASE}: state_chg to RELEASING
@@ -3347,7 +3347,7 @@
 Detected FN jump! 2654270 -> 2654283
 PDCH(bts=0,trx=0,ts=7) FN=2654283 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654283 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) FN=2654283 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -3439,7 +3439,7 @@
 Detected FN jump! 2654270 -> 2654283
 PDCH(bts=0,trx=0,ts=7) FN=2654283 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654283 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) FN=2654283 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -6062,7 +6062,7 @@
 Detected FN jump! 2654270 -> 2654283
 PDCH(bts=0,trx=0,ts=7) FN=2654283 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654283 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) FN=2654283 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -6227,7 +6227,7 @@
 Detected FN jump! 2654270 -> 2654283
 PDCH(bts=0,trx=0,ts=7) FN=2654283 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654283 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) FN=2654283 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW
@@ -6562,7 +6562,7 @@
 Detected FN jump! 2654270 -> 2654283
 PDCH(bts=0,trx=0,ts=7) FN=2654283 +++++++++++++++++++++++++ RX : Uplink Control Block +++++++++++++++++++++++++
 PDCH(bts=0,trx=0,ts=7) FN=2654283 ------------------------- RX : Uplink Control Block -------------------------
-TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) RX: [PCU <- BTS] Packet Control Ack
+TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) FN=2654283 Rx Packet Control Ack (reason=UL_ASS)
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) [DOWNLINK] UPLINK ASSIGNED
 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_WAIT_ACK to GPRS_RLCMAC_UL_ASS_NONE
 TBF(UL-TFI_0){ASSIGN}: state_chg to FLOW

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I7c7a421b1e9189e2814e9a28698d66655fc9ba60
Gerrit-Change-Number: 24599
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/20210607/93cf573a/attachment.htm>


More information about the gerrit-log mailing list