aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-06-21 02:04:32 +0200
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-06-21 02:33:07 +0200
commit826576287e9370ab2fb9ed2a499f62f4ad05d40a (patch)
tree7c06225572a1db632d3e9fe712c2dea44fb39039
parent86f4c093d1ead974ab0b8d67eaa5ca8946379616 (diff)
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
-rw-r--r--src/gprs_rlcmac_sched.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 4c1a6abc..2adf1f3d 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -506,7 +506,7 @@ int gprs_rlcmac_rcv_rts_block(struct gprs_rlcmac_bts *bts,
}
/* 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);