From nobody Sun Jul 14 18:30:23 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 4WMYmH4zs8z5R84f; Sun, 14 Jul 2024 18:30:23 +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 4WMYmH2WF3z4Y6Y; Sun, 14 Jul 2024 18:30:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720981823; 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=Ar8iXG7ovJ5C1mnXAa6mstkrW1pjNYYTPE6O4RoxjIE=; b=Oz7Ppv1ovGhLoHx7YpSYJVW+ztnfUocmLNVF0PT68wC5Kkc4njBh0Tku1/eUJntf39G7jQ NqPghWoy+NNRjSkVQJLa5dBXwgZZlQI+OvcGWt+FQsLeeEIOKi4iTtYPPKdZAqEts82+mY rCYa8Jys089QEBXhBx13iW6AlCmclLXmXEHGjjbgoUeM3uQXyt2G37x4fzjKblHrIj0B+j l/yexLu2pqMiZU6jEusJ7kPD2kG7whKu9DkP/rUUU7JhC7cQIDi4ookqEXkmt/lfKAOk54 aZ2n0gKBoMyjcf98otBlcsXZnx338qZhR9UEB3SmQ7ygC2IG/eb8MTpKEnkTCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720981823; a=rsa-sha256; cv=none; b=Na8MRqmlGjBvd6spmb4cM9FLAetSnvJW6YwTHnw6slWS2g4LB2Eb7+aMn/EsgUjJw0WVlu IkCAXStqbU1AELbUrNDooBQTqqeixqpBgCT4v00oaNxUKvJH7SK3yaguBpB76vdHeHfApx VHXS0Xn66/R5l1Jh0r9qqQXm5iINB4JcwTBXqZrngqAcsLq+7Qp95bpK6c77PD9DIJSqxG OOplIzGE1dl2JeLFGuXVonoolPEPBkFjvWp3Lu9E8KDhL4cgpBW3fjKLhyb3BOhywZvQGp 0ZyZ7z1FsR7OvRu+t7WTMFivPMuW1VIl2gvW/z+MmMsEyq0OETPzdOiRm0EK4g== 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=1720981823; 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=Ar8iXG7ovJ5C1mnXAa6mstkrW1pjNYYTPE6O4RoxjIE=; b=I27jwYluChsF8w3yCJTkrKLqmCSgIyZTuwJacdqlmLOqnsCjrTZQx+SPnQpX9pe9AobooQ W77QL6EhGrbS1QhV7l5ycIm7dXapQ9BLZlhUJRIIdwLZAeCqsnbNshwAQ7VQm78KSZKuiV zKsDVXyY19sWlvbMYsjxm8z7Jbnm0D+4GP1bskrAwytVIoiRnbj01iFrHTqLFsWKvpeczR oEBBdv0x9PPkGqqGqJd9obx0x0sATIwF8nl+pfycAZN+pFX0VMd2Txjf1P01k6wpb3nrJc z5dJcr+D7GfE73rPGMW8wHbG9urufjzzKPaKT976YKuR1nd0zuZiNZ5Xy5faLg== 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 4WMYmH26RpzKvl; Sun, 14 Jul 2024 18:30:23 +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 46EIUNpm020725; Sun, 14 Jul 2024 18:30:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46EIUNNO020722; Sun, 14 Jul 2024 18:30:23 GMT (envelope-from git) Date: Sun, 14 Jul 2024 18:30:23 GMT Message-Id: <202407141830.46EIUNNO020722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ec1b18c7353a - main - 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/main X-Git-Reftype: branch X-Git-Commit: ec1b18c7353ad20d2d373e58931aeccfccd5599d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ec1b18c7353ad20d2d373e58931aeccfccd5599d commit ec1b18c7353ad20d2d373e58931aeccfccd5599d Author: Mark Johnston AuthorDate: 2024-07-14 16:20:48 +0000 Commit: Mark Johnston CommitDate: 2024-07-14 18:29:15 +0000 route: Wrap long lines No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. --- 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 1e682bd4561b..d0b1f864eec9 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, ...) do { \ @@ -114,7 +123,8 @@ SYSCTL_DECL(_net_route_debug); } while (0) /* - * 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 e0411ed0c1d0..09d463dc17af 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -136,7 +136,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");