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

pespin gerrit-no-reply at lists.osmocom.org
Mon Aug 23 16:28:27 UTC 2021


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25090 )

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

tbf: Drop unuseful flag GPRS_RLCMAC_FLAG_UL_DATA

Same information is available under ul_tbf->m_rx_counter.

Change-Id: I1d993117c7daa2609b132c2d0fd748e0338ef559
---
M src/tbf.cpp
M src/tbf.h
M src/tbf_ul.cpp
3 files changed, 15 insertions(+), 14 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved
  osmith: Looks good to me, but someone else must approve



diff --git a/src/tbf.cpp b/src/tbf.cpp
index 0154bab..67e05bb 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -997,14 +997,18 @@
 		OSMO_STRBUF_PRINTF(sb, "Assignment was on CCCH|");
 	if (tbf->state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))
 		OSMO_STRBUF_PRINTF(sb, "Assignment was on PACCH|");
-	if (tbf->state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_UL_DATA))
-		OSMO_STRBUF_PRINTF(sb, "Uplink data was received|");
-	else if (tbf->direction == GPRS_RLCMAC_UL_TBF)
-		OSMO_STRBUF_PRINTF(sb, "No uplink data received yet|");
-	if (tbf->state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_DL_ACK))
-		OSMO_STRBUF_PRINTF(sb, "Downlink ACK was received|");
-	else if (tbf->direction == GPRS_RLCMAC_DL_TBF)
-		OSMO_STRBUF_PRINTF(sb, "No downlink ACK received yet|");
+	if (tbf->direction == GPRS_RLCMAC_UL_TBF) {
+		const struct gprs_rlcmac_ul_tbf *ul_tbf = static_cast<const gprs_rlcmac_ul_tbf *>(tbf);
+		if (ul_tbf->m_rx_counter)
+			OSMO_STRBUF_PRINTF(sb, "Uplink data was received|");
+		else
+			OSMO_STRBUF_PRINTF(sb, "No uplink data received yet|");
+	} else {
+		if (tbf->state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_DL_ACK))
+			OSMO_STRBUF_PRINTF(sb, "Downlink ACK was received|");
+		else
+			OSMO_STRBUF_PRINTF(sb, "No downlink ACK received yet|");
+	}
 
 	return buf;
 }
diff --git a/src/tbf.h b/src/tbf.h
index b8f1e18..96a5788 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -127,10 +127,9 @@
 
 #define GPRS_RLCMAC_FLAG_CCCH		0 /* assignment on CCCH */
 #define GPRS_RLCMAC_FLAG_PACCH		1 /* assignment on PACCH */
-#define GPRS_RLCMAC_FLAG_UL_DATA	2 /* uplink data received */
-#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_DL_ACK		2 /* downlink acknowledge received  */
+#define GPRS_RLCMAC_FLAG_TO_UL_ACK	3
+#define GPRS_RLCMAC_FLAG_TO_DL_ACK	4
 #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.cpp b/src/tbf_ul.cpp
index 31bb273..c84f373 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -404,8 +404,6 @@
 
 	const uint16_t ws = m_window.ws();
 
-	this->state_fsm.state_flags |= (1 << GPRS_RLCMAC_FLAG_UL_DATA);
-
 	LOGPTBFUL(this, LOGL_DEBUG, "UL DATA TFI=%d received (V(Q)=%d .. "
 		"V(R)=%d)\n", rlc->tfi, this->m_window.v_q(),
 		this->m_window.v_r());

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I1d993117c7daa2609b132c2d0fd748e0338ef559
Gerrit-Change-Number: 25090
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210823/df9d4dc8/attachment.htm>


More information about the gerrit-log mailing list