From nobody Mon Jul 22 00:55:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WS1zX3KKxz5Qwjw; Mon, 22 Jul 2024 00:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WS1zX0zyzz4j17; Mon, 22 Jul 2024 00:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721609736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zi8ajJC420nGpve2eNNwKHw6DkY8d6k/2vgGvcaZV9s=; b=wy8o1EOvwSztX6Ep6cE033H8deqsOmbWYRMaquX/0Mh/GWs3PsCVyUgnoj92mEekKFyPQk FYwz/+1/0beUyj4LeySO+Psl1n3qwZguovjHwC/xeFJYP59EbfdxkVgPVVmHDqfM21um95 QpT1V+HZmicfAkOJN8E5AhtXypovKyiAEJLZG1J7xY+qOPbSns6dP7cqiDf8VZKDGn4NJe zQAltVsWIaZw48NZiSIcjNsR57GxB9jN7Gik/zXw81FAaMDd+U5sfWvTVI7MEC/PdpWSZR mTAy+4sweNvFuPmUjE0x95lrJd7G3PWYebgUS3VaPb2fPOYNsg6/VpfazaFHTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721609736; a=rsa-sha256; cv=none; b=NN895ZJl7lcAA9FgbkRlCCBp7/EzWf9nXECCsXCyMN+/Uyw4GDkEgVWnuo/5mIk6Rysh1R Qwr6dmeIcDObZ25w6c/qRNK2BpUbOtq7agyz9dbBBuRW7h5OCBQRIz6FKfSSfgvUph2kal 1Q2Tn07bleeFgKy1TUvj6FyT7jZRrjAu/NN3rri+gWzonJymq5mA1TNb48cDqOKOkRBLdD LyaDijyKof/rNwsMXCJhzySO/DKCC1NqAcqb0aNq1wDlLExwy4jjd8Y2Q8RKrSeOBFAChP udEemvo+nktukkY++7lFkwZgW8bypPxwAlUYhV9qIco7GkS8i+gI5+7yWkjtmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721609736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zi8ajJC420nGpve2eNNwKHw6DkY8d6k/2vgGvcaZV9s=; b=K28Z/liz3Kt/QO2OfTYXKCypVKSvzwhMEonmNVSUW3jKtfWfmnaEEwvzPSZ4ilrCvRsGma 7LeXMepBTBeMO+uxAkcIgGxQRnDKfCTlX86maxo8QmMMQi2Xck41rJDq8776JlKkZ5Uo8S tXkPfhHwL7NLHPW/HoVEnecPBe/CJuw1ttsU0cHqzCPILMuGzE6toZJu5oeb0U2n1y+P3D u34HS5bgLTpOjhBnvv4eogOMXvwtKAT9YmAWQtAS1YzoXgeEN2mxtreXs1mhQD8iDvkSrd M8h219CljspNC2KxADbdwySmfJsbXwK7Pg4asIzu6by6VYfaBC+orRbqkoSpqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WS1zX0b9rzNcY; Mon, 22 Jul 2024 00:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46M0tZhW007244; Mon, 22 Jul 2024 00:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46M0tZQd007241; Mon, 22 Jul 2024 00:55:35 GMT (envelope-from git) Date: Mon, 22 Jul 2024 00:55:35 GMT Message-Id: <202407220055.46M0tZQd007241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3985e96ac5c6 - stable/14 - route: Wrap long lines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3985e96ac5c6cf407642e9ccfdd3094989508121 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3985e96ac5c6cf407642e9ccfdd3094989508121 commit 3985e96ac5c6cf407642e9ccfdd3094989508121 Author: Mark Johnston AuthorDate: 2024-07-14 16:20:48 +0000 Commit: Mark Johnston 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: */ -#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: */ #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");