Change in osmo-sgsn[master]: gbproxy: Add logging macros for NSE and BVC

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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Dec 2 21:40:33 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21455 )

Change subject: gbproxy: Add logging macros for NSE and BVC
......................................................................

gbproxy: Add logging macros for NSE and BVC

Change-Id: Ibb2bcf3344bdc750869223b4c4861b4bbc6f417c
Related: SYS#5233
---
M include/osmocom/sgsn/gb_proxy.h
1 file changed, 11 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h
index 9f91bd6..fae95c1 100644
--- a/include/osmocom/sgsn/gb_proxy.h
+++ b/include/osmocom/sgsn/gb_proxy.h
@@ -237,6 +237,17 @@
 	bool is_matching[GBPROX_MATCH_LAST];
 };
 
+/* Convenience logging macros for NSE/BVC */
+#define LOGPNSE_CAT(NSE, SUBSYS, LEVEL, FMT, ARGS...) \
+	LOGP(SUBSYS, LEVEL, "NSE(%05u/BSS) " FMT, (NSE)->nsei, ## ARGS)
+#define LOGPNSE(NSE, LEVEL, FMT, ARGS...) \
+	LOGPNSE_CAT(NSE, DGPRS, LEVEL, FMT, ## ARGS)
+
+#define LOGPBVC_CAT(BVC, SUBSYS, LEVEL, FMT, ARGS...) \
+	LOGP(SUBSYS, LEVEL, "NSE(%05u/BSS)-BVC(%05u/%s) " FMT, (BVC)->nse->nsei, (BVC)->bvci, \
+		(BVC)->blocked ? "BLOCKED" : "UNBLOCKED", ## ARGS)
+#define LOGPBVC(BVC, LEVEL, FMT, ARGS...) \
+	LOGPBVC_CAT(BVC, DGPRS, LEVEL, FMT, ## ARGS)
 
 /* gb_proxy_vty .c */
 

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ibb2bcf3344bdc750869223b4c4861b4bbc6f417c
Gerrit-Change-Number: 21455
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201202/2a77b1cb/attachment.htm>


More information about the gerrit-log mailing list