This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.orgHello Harald Welte, Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/459
to look at the new patch set (#4).
sgsn: add statistics counter for LLC packets
new counters are:
llc.dl_bytes
llc.ul_bytes
llc.dl_packets
llc.ul_packets
llc.dl_ip_payload_bytes
llc.ul_ip_payload_bytes
llc.dl_ip_payload_packets
llc.ul_ip_payload_packets
The ip payload bytes are waiting for payload compression
because those data are known then.
Change-Id: I068376d35e84283cb98523cd3097a12c55cdb709
---
M openbsc/include/openbsc/sgsn.h
M openbsc/src/gprs/gprs_llc.c
M openbsc/src/gprs/gprs_sgsn.c
3 files changed, 15 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/59/459/4
diff --git a/openbsc/include/openbsc/sgsn.h b/openbsc/include/openbsc/sgsn.h
index 59126fe..19496cb 100644
--- a/openbsc/include/openbsc/sgsn.h
+++ b/openbsc/include/openbsc/sgsn.h
@@ -22,6 +22,10 @@
enum sgsn_rate_ctr_keys {
+ CTR_LLC_DL_BYTES,
+ CTR_LLC_UL_BYTES,
+ CTR_LLC_DL_PACKETS,
+ CTR_LLC_UL_PACKETS,
CTR_GPRS_ATTACH_REQUEST,
CTR_GPRS_ATTACH_ACKED,
CTR_GPRS_ATTACH_REJECTED,
diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c
index 64d22b3..8041a90 100644
--- a/openbsc/src/gprs/gprs_llc.c
+++ b/openbsc/src/gprs/gprs_llc.c
@@ -26,6 +26,7 @@
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/talloc.h>
+#include <osmocom/core/rate_ctr.h>
#include <osmocom/gprs/gprs_bssgp.h>
#include <openbsc/gsm_data.h>
@@ -326,6 +327,9 @@
fcs[2] = (fcs_calc >> 16) & 0xff;
/* Identifiers passed down: (BVCI, NSEI) */
+
+ rate_ctr_inc(&sgsn->rate_ctrs->ctr[CTR_LLC_DL_PACKETS]);
+ rate_ctr_add(&sgsn->rate_ctrs->ctr[CTR_LLC_DL_BYTES], msg->len);
/* Send BSSGP-DL-UNITDATA.req */
return _bssgp_tx_dl_ud(msg, NULL);
@@ -657,6 +661,9 @@
if (rc < 0)
return rc;
+ rate_ctr_inc(&sgsn->rate_ctrs->ctr[CTR_LLC_UL_PACKETS]);
+ rate_ctr_add(&sgsn->rate_ctrs->ctr[CTR_LLC_UL_BYTES], msg->len);
+
/* llhp.data is only set when we need to send LL_[UNIT]DATA_IND up */
if (llhp.cmd == GPRS_LLC_UI && llhp.data && llhp.data_len) {
msgb_gmmh(msg) = llhp.data;
diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c
index 7639125..f26371b 100644
--- a/openbsc/src/gprs/gprs_sgsn.c
+++ b/openbsc/src/gprs/gprs_sgsn.c
@@ -91,6 +91,10 @@
};
static const struct rate_ctr_desc sgsn_ctr_description[] = {
+ { "llc.dl_bytes", "Count sent LLC bytes before giving it to the bssgp layer" },
+ { "llc.ul_bytes", "Count sucessful received LLC bytes (encrypt & fcs correct)" },
+ { "llc.dl_packets", "Count sucessful sent LLC packets before giving it to the bssgp layer" },
+ { "llc.ul_packets", "Count sucessful received LLC packets (encrypt & fcs correct)" },
{ "gprs.attach_requested", "Received attach requests" },
{ "gprs.attach_accepted", "Sent attach accepts" },
{ "gprs.attach_rejected", "Sent attach rejects" },
--
To view, visit https://gerrit.osmocom.org/459
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I068376d35e84283cb98523cd3097a12c55cdb709
Gerrit-PatchSet: 4
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder