aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf_dl.cpp
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-05-21 19:45:23 +0200
committerHolger Freyther <holger@freyther.de>2016-06-07 10:56:25 +0000
commit7fdbf89ef3cc14bc806ffbbfa0c7a78b24079581 (patch)
tree1390c9e458f936bc6bc3ca0e05cab753e1c38eba /src/tbf_dl.cpp
parent6f0dc96929d1d4b979ba26d09434e84365290802 (diff)
add KPI counter to count bytes for RLC and LLC frames
rlc.dl_bytes bytes before sending rlc rlc.dl_payload_bytes count data w/o LI rlc.ul_bytes bytes when received rlc (only valid) rlc.ul_payload_bytes count data fragments w/o LI llc.dl_bytes complete encapsulated LLC PDUs llc.ul_bytes complete received LLC PDUs Change-Id: I9a98a5a375d39b3f4990360056c4d6145e755f4d Reviewed-on: https://gerrit.osmocom.org/145 Reviewed-by: Harald Welte <laforge@gnumonks.org> Reviewed-by: Holger Freyther <holger@freyther.de> Tested-by: Jenkins Builder
Diffstat (limited to 'src/tbf_dl.cpp')
-rw-r--r--src/tbf_dl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 66f747b9..59316763 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -513,6 +513,7 @@ int gprs_rlcmac_dl_tbf::create_new_bsn(const uint32_t fn, GprsCodingScheme cs)
do {
bool is_final;
+ int payload_written = 0;
if (m_llc.frame_length() == 0) {
/* nothing to sent - delay the release of the TBF */
@@ -540,7 +541,10 @@ int gprs_rlcmac_dl_tbf::create_new_bsn(const uint32_t fn, GprsCodingScheme cs)
is_final = llc_queue()->size() == 0 && !keep_open(fn);
ar = Encoding::rlc_data_to_dl_append(rdbi, cs,
- &m_llc, &write_offset, &num_chunks, data, is_final, NULL);
+ &m_llc, &write_offset, &num_chunks, data, is_final, &payload_written);
+
+ if (payload_written > 0)
+ bts->rlc_dl_payload_bytes(payload_written);
if (ar == Encoding::AR_NEED_MORE_BLOCKS)
break;
@@ -548,6 +552,7 @@ int gprs_rlcmac_dl_tbf::create_new_bsn(const uint32_t fn, GprsCodingScheme cs)
LOGP(DRLCMACDL, LOGL_INFO, "Complete DL frame for %s"
"len=%d\n", tbf_name(this), m_llc.frame_length());
gprs_rlcmac_dl_bw(this, m_llc.frame_length());
+ bts->llc_dl_bytes(m_llc.frame_length());
m_llc.reset();
if (is_final) {