Change in osmo-pcu[master]: gprs_rlcmac_sched: fix incorrect length for CTR_RLC_DL_BYTES

fixeria gerrit-no-reply at lists.osmocom.org
Mon Jun 21 17:19:59 UTC 2021


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

Change subject: gprs_rlcmac_sched: fix incorrect length for CTR_RLC_DL_BYTES
......................................................................

gprs_rlcmac_sched: fix incorrect length for CTR_RLC_DL_BYTES

msg->data_len is the total number of bytes available in the buffer,
while for CTR_RLC_DL_BYTES we need to count size of the actual
payload within the buffer.  A consequence of this bug: osmo-pcu
was counting more Downlink bytes than it's actually transmitted.

Change-Id: I6884d220f3d06a79b16c18ccc2d2a6cd047b8251
---
M src/gprs_rlcmac_sched.cpp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 4c1a6ab..2adf1f3 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -506,7 +506,7 @@
 	}
 
 	/* msg is now available */
-	bts_do_rate_ctr_add(bts, CTR_RLC_DL_BYTES, msg->data_len);
+	bts_do_rate_ctr_add(bts, CTR_RLC_DL_BYTES, msgb_length(msg));
 
 	/* set USF */
 	OSMO_ASSERT(msgb_length(msg) > 0);

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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I6884d220f3d06a79b16c18ccc2d2a6cd047b8251
Gerrit-Change-Number: 24723
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy 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/20210621/2901c893/attachment.htm>


More information about the gerrit-log mailing list