laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36498?usp=email )
Change subject: counters: Distinguish between normal and abnormal release cause
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36498?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Idd2f845b7db448064b693ac1efdc8db006a47a11
Gerrit-Change-Number: 36498
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: iedemam <michael(a)kapsulate.com>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 09 Apr 2024 08:12:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: nft_kpi: add rate_ctr gtpu:ue_bytes:ul,dl
......................................................................
nft_kpi: add rate_ctr gtpu:ue_bytes:ul,dl
So far we have the nftables based counters for total GTP-U bytes (UL,
DL), as well as a packet count.
Add another counter for the computed UE payload bytes:
total_bytes - packets * (20 + 8 + 8)
Related: SYS#6773
Change-Id: Ib2f0a9252715ea4b2fe9c367aa65f771357768ca
---
M include/osmocom/hnbgw/hnbgw.h
M include/osmocom/hnbgw/nft_kpi.h
M src/osmo-hnbgw/hnbgw.c
M src/osmo-hnbgw/nft_kpi.c
4 files changed, 43 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/39/36539/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib2f0a9252715ea4b2fe9c367aa65f771357768ca
Gerrit-Change-Number: 36539
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36385?usp=email )
Change subject: per-HNB GTP-U traffic counters via nft
......................................................................
Patch Set 17:
(3 comments)
This change is ready for review.
Patchset:
PS3:
> Thanks for the cool pointers! […]
see https://gerrit.osmocom.org/c/osmo-hnbgw/+/36540
Patchset:
PS8:
> right, it appears we need a compiler switch for the gerrit verification, too. […]
Done
PS8:
> current problem is getting it to pass the gerrit verification, which has problems with the nftables […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36385?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I35b7e97fd039e36633dfde1317170527c82f9f68
Gerrit-Change-Number: 36385
Gerrit-PatchSet: 17
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 09 Apr 2024 03:55:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: comment
Attention is currently required from: neels.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36540?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: nft_kpi: retrieve counters in a separate thread
......................................................................
nft_kpi: retrieve counters in a separate thread
Introduce an NFT thread which does:
- periodically run nftables command to read all counters
- parse the response
- update rate_ctr values.
The main thread still runs the rule addition / removal when a HNB
registers or deregisters. See the comment added in nft_kpi.c, starting
with "A more scalable solution...".
This patch requires the new osmo_stats_report_lock(), see 'Depends'.
Related: SYS#6773
Depends: libosmocore Ib335bea7d2a440ca284e6c439066f96456bf2c2d
Change-Id: I9dc54e6bc94c553f45adfa71ae8ad70be4afbc8f
---
M src/osmo-hnbgw/hnbgw.c
M src/osmo-hnbgw/nft_kpi.c
M src/osmo-hnbgw/osmo_hnbgw_main.c
M src/osmo-hnbgw/tdefs.c
4 files changed, 171 insertions(+), 34 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/40/36540/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36540?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I9dc54e6bc94c553f45adfa71ae8ad70be4afbc8f
Gerrit-Change-Number: 36540
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36538?usp=email )
Change subject: add osmo_stats_report_lock api
......................................................................
Patch Set 2:
(1 comment)
File src/core/stats.c:
https://gerrit.osmocom.org/c/libosmocore/+/36538/comment/6acfa08f_c4541089
PS2, Line 791: static pthread_mutex_t *g_report_lock = NULL;
just a thought, it would be far simpler to only publish this pointer on public API. But it's good to have these formal three API functions instead, right?
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36538?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib335bea7d2a440ca284e6c439066f96456bf2c2d
Gerrit-Change-Number: 36538
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 09 Apr 2024 03:47:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/36546?usp=email )
Change subject: add API logging_vty_subsys_strip_leading_char()
......................................................................
add API logging_vty_subsys_strip_leading_char()
Allow an application to use subsystem names without a leading 'D'. With
this patch, a program can:
- remove the 'D' from struct log_info_cat[] entries -- normally, the VTY
would then strip the 'M' from "MAIN" and we'd get 'ain'.
- call logging_vty_subsys_strip_leading_char(false) during startup --
hence the VTY does not strip anything, and we get 'main' on the VTY
config.
So this allows an application to remove the odd 'D' from category names,
without any changes in any VTY configuration.
Background: I am hacking on some project where I want logging subsys
names without a leading 'D'. So I noticed that the cfg file has mangled
category names.
Change-Id: I5faedf7d6525d744a734ebe54c185fcc904f763e
---
M include/osmocom/core/logging.h
M src/core/libosmocore.map
M src/core/logging.c
3 files changed, 48 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/46/36546/1
diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index da90d58..e58c25c 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -430,6 +430,7 @@
void log_set_category_filter(struct log_target *target, int category,
int enable, int level);
+void log_subsys_strip_leading_char(bool do_strip);
const char *log_subsys_name(const struct log_info *log_info, int cat_idx);
/* management of the targets */
diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map
index 3bb2abd..919897a 100644
--- a/src/core/libosmocore.map
+++ b/src/core/libosmocore.map
@@ -71,6 +71,7 @@
log_parse_category;
log_parse_category_mask;
log_parse_level;
+log_subsys_strip_leading_char;
log_subsys_name;
logp_stub;
log_reset_context;
diff --git a/src/core/logging.c b/src/core/logging.c
index 2429a0c..ba22914 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -428,11 +428,32 @@
return get_value_string(loglevel_strs, lvl);
}
+static bool g_subsys_strip_leading_char = true;
+
+/** Set whether on the VTY, the leading 'D' commonly in use for category names should be stripped.
+ * If true, a category name 'DMAIN' will be identified on VTY as 'main'.
+ * If false, a category name 'FOO' will be identified on VTY as 'foo' (instead of 'oo').
+ *
+ * This must be called *before* logging_vty_add_cmds() to take effect!
+ *
+ * There is a common coding style in osmocom that all category names start with a 'D'.
+ * This flag allows programs to name logging categories without a leading 'D'.
+ * \param[in] do_strip true to strip leading D on VTY, false to use names as-is.
+ */
+void log_subsys_strip_leading_char(bool do_strip)
+{
+ g_subsys_strip_leading_char = do_strip;
+}
+
/* skip the leading 'D' in category name */
const char *log_subsys_name(const struct log_info *log_info, int cat_idx)
{
const char *name = log_info->cat[cat_idx].name;
- return name + 1;
+ /* The category names in internal_cat[] will always have a leading 'D'. */
+ if (g_subsys_strip_leading_char
+ || cat_idx >= log_info->num_cat_user)
+ return name + 1;
+ return name;
}
/*! parse a human-readable log category into numeric form
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36546?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I5faedf7d6525d744a734ebe54c185fcc904f763e
Gerrit-Change-Number: 36546
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange