git: 3985e96ac5c6 - stable/14 - route: Wrap long lines
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 22 Jul 2024 00:55:35 UTC
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=3985e96ac5c6cf407642e9ccfdd3094989508121
commit 3985e96ac5c6cf407642e9ccfdd3094989508121
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-07-14 16:20:48 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-07-22 00:55:27 +0000
route: Wrap long lines
No functional change intended.
MFC after: 1 week
Sponsored by: Klara, Inc.
(cherry picked from commit ec1b18c7353ad20d2d373e58931aeccfccd5599d)
---
sys/net/route/route_debug.h | 36 +++++++++++++++++++++++-------------
sys/net/rtsock.c | 4 +++-
2 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/sys/net/route/route_debug.h b/sys/net/route/route_debug.h
index b00fbf1784e7..ebf0d9408171 100644
--- a/sys/net/route/route_debug.h
+++ b/sys/net/route/route_debug.h
@@ -78,33 +78,42 @@ SYSCTL_DECL(_net_route_debug);
* This is NOT compiled in by default. Turning it on should NOT seriously impact performance
* LOG_DEBUG3 - last debug level. Per-item large debug outputs.
* This is NOT compiled in by default. All performance bets are off.
- *
*/
-#define _output printf
+#define _output printf
#define _DEBUG_PASS_MSG(_l) (DEBUG_VAR_NAME >= (_l))
-#define IF_DEBUG_LEVEL(_l) if ((DEBUG_MAX_LEVEL >= (_l)) && (__predict_false(DEBUG_VAR_NAME >= (_l))))
+#define IF_DEBUG_LEVEL(_l) \
+ if ((DEBUG_MAX_LEVEL >= (_l)) && (__predict_false(DEBUG_VAR_NAME >= (_l))))
/*
* Logging for events specific for particular family and fib
- * Example: [nhop_neigh] inet.0 find_lle: nhop nh#4/inet/vtnet0/10.0.0.1: mapped to lle NULL
+ * Example: [nhop_neigh] inet.0 find_lle: <message>
*/
-#define FIB_LOG(_l, _fib, _fam, _fmt, ...) FIB_LOG_##_l(_l, _fib, _fam, _fmt, ## __VA_ARGS__)
-#define _FIB_LOG(_l, _fib, _fam, _fmt, ...) if (_DEBUG_PASS_MSG(_l)) { \
- _output("[" DEBUG_PREFIX_NAME "] %s.%u %s: " _fmt "\n", rib_print_family(_fam), _fib, __func__, ##__VA_ARGS__); \
-}
+#define FIB_LOG(_l, _fib, _fam, _fmt, ...) \
+ FIB_LOG_##_l(_l, _fib, _fam, _fmt, ## __VA_ARGS__)
+#define _FIB_LOG(_l, _fib, _fam, _fmt, ...) \
+ if (_DEBUG_PASS_MSG(_l)) { \
+ _output("[" DEBUG_PREFIX_NAME "] %s.%u %s: " _fmt "\n", \
+ rib_print_family(_fam), _fib, __func__, ##__VA_ARGS__); \
+ }
/* Same as FIB_LOG, but uses nhop to get fib and family */
-#define FIB_NH_LOG(_l, _nh, _fmt, ...) FIB_LOG_##_l(_l, nhop_get_fibnum(_nh), nhop_get_upper_family(_nh), _fmt, ## __VA_ARGS__)
+#define FIB_NH_LOG(_l, _nh, _fmt, ...) \
+ FIB_LOG_##_l(_l, nhop_get_fibnum(_nh), nhop_get_upper_family(_nh), \
+ _fmt, ## __VA_ARGS__)
/* Same as FIB_LOG, but uses rib_head to get fib and family */
-#define FIB_RH_LOG(_l, _rh, _fmt, ...) FIB_LOG_##_l(_l, (_rh)->rib_fibnum, (_rh)->rib_family, _fmt, ## __VA_ARGS__)
+#define FIB_RH_LOG(_l, _rh, _fmt, ...) \
+ FIB_LOG_##_l(_l, (_rh)->rib_fibnum, (_rh)->rib_family, _fmt, \
+ ## __VA_ARGS__)
/* Same as FIB_LOG, but uses nh_control to get fib and family from linked rib */
-#define FIB_CTL_LOG(_l, _ctl, _fmt, ...) FIB_LOG_##_l(_l, (_ctl)->ctl_rh->rib_fibnum, (_ctl)->ctl_rh->rib_family, _fmt, ## __VA_ARGS__)
+#define FIB_CTL_LOG(_l, _ctl, _fmt, ...) \
+ FIB_LOG_##_l(_l, (_ctl)->ctl_rh->rib_fibnum, \
+ (_ctl)->ctl_rh->rib_family, _fmt, ## __VA_ARGS__)
/*
* Generic logging for routing subsystem
- * Example: [nhop_neigh] nhops_update_neigh: L2 prepend update from lle/inet/valid/vtnet0/10.0.0.157
+ * Example: [nhop_neigh] nhops_update_neigh: <message>
*/
#define RT_LOG(_l, _fmt, ...) RT_LOG_##_l(_l, _fmt, ## __VA_ARGS__)
#define _RT_LOG(_l, _fmt, ...) if (_DEBUG_PASS_MSG(_l)) { \
@@ -113,7 +122,8 @@ SYSCTL_DECL(_net_route_debug);
/*
- * Wrapper logic to avoid compiling high levels of debugging messages for production systems.
+ * Wrapper logic to avoid compiling high levels of debugging messages for
+ * production systems.
*/
#if DEBUG_MAX_LEVEL>=LOG_DEBUG3
#define FIB_LOG_LOG_DEBUG3 _FIB_LOG
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index caee9bd6e83f..3905584e431d 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -138,7 +138,9 @@ struct linear_buffer {
};
#define SCRATCH_BUFFER_SIZE 1024
-#define RTS_PID_LOG(_l, _fmt, ...) RT_LOG_##_l(_l, "PID %d: " _fmt, curproc ? curproc->p_pid : 0, ## __VA_ARGS__)
+#define RTS_PID_LOG(_l, _fmt, ...) \
+ RT_LOG_##_l(_l, "PID %d: " _fmt, curproc ? curproc->p_pid : 0, \
+ ## __VA_ARGS__)
MALLOC_DEFINE(M_RTABLE, "routetbl", "routing tables");