From nobody Mon Sep 05 10:46:07 2022 X-Original-To: dev-commits-src-main@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 4MLlYW50vcz4c0JH; Mon, 5 Sep 2022 10:46:07 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MLlYW4WQKz3VCd; Mon, 5 Sep 2022 10:46:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662374767; 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=aKXHvbKog9C1DdFjWryKPhQ6N2XCAcP8Eand3z5IhBM=; b=Q/JO4QeKUmQ+hwX8tTnIHLfXXqUSonhCWU7HBRWKFiMskopa5PUXz79hAJAwzIOa8JCjYY GYKRszH4wbGAYBAiT9j3114v9Yp7xhw5JL9ECpQeMNVe+hculuvCmY47oo/ZbaievBHxpT VeN2zg8KRkxZ+H7PGGpjZsCWM5RRBy8zHtnbzUz6wazzc5IOnyUZom0IhWI7qGWN1apQTE dyOL92wJinJ4QrqlIzp5VDry3G42DPle91loLpAjCYwF8Cy0ZQ1dUbW8ceaPNBSvQ9/HT0 UELDJaD35xeikf0z8sM05POkCYjPJWBo6iFzn2vp3lALR6dU4iTOo2+tkhV4Gg== 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 4MLlYW3SZFzp6g; Mon, 5 Sep 2022 10:46:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 285Ak7c3089846; Mon, 5 Sep 2022 10:46:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 285Ak7kZ089845; Mon, 5 Sep 2022 10:46:07 GMT (envelope-from git) Date: Mon, 5 Sep 2022 10:46:07 GMT Message-Id: <202209051046.285Ak7kZ089845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 4bccbf03d81b - main - routing: allow logging framework to be used outside of the subsystem List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4bccbf03d81b2bafb93c1674eaa2f70e7226a25a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662374767; 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=aKXHvbKog9C1DdFjWryKPhQ6N2XCAcP8Eand3z5IhBM=; b=VLG1w0/1XgPuF+OzJKgaSBpqJCQujXkVluCXhfU8urju+Qa8L0PFvOyB60v/DFH00fRHUk CLmOlnWogYjaeQJgwPeOlxMOnnofbiEDUOKfF6X/ipJ3XExukNFMk8+XqXim528WyVggJ4 YgcVDKymUSMRerqDOmvwcn/wjkKCj6r1DdrldO0jlYrP94MYRI0uWxcdrA098n3Jox0PGg XU3PyJaPwaZTuKFujAbNu6ovhq9hOsPYKovQIiuKrkc/MNFOH5FLAu9ISlpAfZ1gyUgIy+ DIMHLV8JLTVXA1ApVFTalZ3N1cxk2/3Y9mf59ZbtQaToh0M1M2hcGqNW6wtHfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662374767; a=rsa-sha256; cv=none; b=WwMpcE70Hc/PI/L6gtfSPAwlRN37W/uXqN/mHUeYYHdwh+aSe2MxI+ebO1m+YxM6Gua/ZL 4evL+jdPJR+Q1bX1n2C5EELWfJPBdkQtkFfOGRVYBm2q4BjzpmQVJHmulGzi0cHvS0/57Y B/T6P0dQ1i1o4lvMTCw8bEJG3KeuGMKPWyFyq7oD8O7rnrR2xPCDPqD6UIipT1qgKZS/CQ IIyvonW40vum+HUR0QEzZCArUkELkRnb7FuBhIvokLz7NhXymn+o5IPn/ZjNqezX6JzNGs t4NFJqI+ZI5Lp/YTYnl6JJ2jMn4xs1kpFZUIG8IcW9Ha1zTxVdr/cs+Ksth4yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=4bccbf03d81b2bafb93c1674eaa2f70e7226a25a commit 4bccbf03d81b2bafb93c1674eaa2f70e7226a25a Author: Alexander V. Chernikov AuthorDate: 2022-09-05 10:44:27 +0000 Commit: Alexander V. Chernikov CommitDate: 2022-09-05 10:44:27 +0000 routing: allow logging framework to be used outside of the subsystem MFC after: 2 weeks --- sys/net/route/route_debug.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/net/route/route_debug.h b/sys/net/route/route_debug.h index b7c8c79f7ffa..5be39a53076e 100644 --- a/sys/net/route/route_debug.h +++ b/sys/net/route/route_debug.h @@ -35,10 +35,14 @@ #include #include - /* DEBUG logic */ #if defined(DEBUG_MOD_NAME) && defined(DEBUG_MAX_LEVEL) +#ifndef _DEBUG_SYSCTL_OID +#define _DEBUG_SYSCTL_OID _net_route_debug +SYSCTL_DECL(_net_route_debug); +#endif + #define DEBUG_VAR_NAME _DEBUG_VAR_NAME(DEBUG_MOD_NAME) #define _DEBUG_VAR_NAME(a) _DEBUG_VAR_NAME_INDIRECT(a) #define _DEBUG_VAR_NAME_INDIRECT(prefix) prefix##_debug_level @@ -48,9 +52,8 @@ #define __DEBUG_PREFIX_NAME(n) #n #define _DECLARE_DEBUG(_default_level) \ - SYSCTL_DECL(_net_route_debug); \ static int DEBUG_VAR_NAME = _default_level; \ - SYSCTL_INT(_net_route_debug, OID_AUTO, DEBUG_VAR_NAME, \ + SYSCTL_INT(_DEBUG_SYSCTL_OID, OID_AUTO, DEBUG_VAR_NAME, \ CTLFLAG_RW | CTLFLAG_RWTUN, \ &(DEBUG_VAR_NAME), 0, "debuglevel")