From nobody Thu Aug 01 18:02:07 2024 X-Original-To: dev-commits-src-branches@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 4WZcHN0L7vz5R9cq; Thu, 01 Aug 2024 18:02:08 +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 4WZcHM6zWxz417g; Thu, 1 Aug 2024 18:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722535328; 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=NJ1VjSvEfY/G657RpNy88wL9Egr2u8aDSW9/6p0gWbE=; b=uP6rAuikXY1HOC6v1sn82nKdaYT26rSE1fvnKlSm39IuZNAHlrRfChJLOYLijJerMX9V3t /MMgAmZW9l6+a7UPPgs/b6P/+q9fNXShVozFqAGHJgwo5lXoeNCwsuSvPxdsIMabRnB/8H DUXNygJFcS20b0dUhkOfzM730JsRngjGfzSBQdwAA96r3Qi2R8Fea+dEC97IK0BQPr8si1 +/hL9NJ41qcJKZVYpXE0rA9zVNIHVsIvOTgnd79ZB+kSlM88O1K3ItLUbHxRv16qCgzXMK fZwx1gT6HooaZp18H9JQp+coqmJxRogJ655SR1aiZy/f84tI1oeaVb7Kj/t92g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722535328; a=rsa-sha256; cv=none; b=ktSFMmoxNDRU95Xrk6q6vKLmP8sd3WObxhcEFAqvrZky7sLUzzHvSq5+svwZuYDLolHKnd EKltpCITyMxDrTK8NBBLq8fMZZWPSjqj+oXYC8aQovRJSTL5Jnzc71ut1qHS+WJLv+C3Ey 66r/OWVA/RNTJmMxNio17VXmZUpJha4fQvLY0FLRv9/t1ATmxpeP63+anmpVsz/fxoHjP7 42dTBZT6V7/m0gqQeVSBk4vqSKjtwj8oQCvemdfZGQONbL7mJ3STSCVWILjab6w27lpVob FjrfaLhkmZD3z7be/Oq6VxJb2/QMmdJpDV8+sVsQMhx7ZpUBVZ1frd3yLzwoJA== 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=1722535328; 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=NJ1VjSvEfY/G657RpNy88wL9Egr2u8aDSW9/6p0gWbE=; b=CquZ2k9PFb6RiIOr9fTtV/DhFhEwrjLPF95h1kmoETzCrolhsg6v1xD7Rb2WFTUox8bnfp x/+hbFsWqoJfdxMYVZMSxS3WDafe5p2x9W2bbnYQi45hlqDWCuyS06/83pSN3uWZvNhsHw MwPkoPqs8mRn9qduoaj2pTDRX+fLCIt8zFSw/rM5kJrF8QBCoMzr4CeUaC4sJOQxBH5ytk NXbTsIRQv6Znryxm3hpZmbhQD4SDJSlXLjUU1EWru4LnchZXSevAZiVLmFuqwXGdX+NpPO gygrgrgdahkjF2+hahqsAFx1eaClfI5u/AL1jW7vW38upMIHs8333DtpGwYnKg== 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 4WZcHM6bbSzvNn; Thu, 1 Aug 2024 18:02:07 +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 471I27Ku081237; Thu, 1 Aug 2024 18:02:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471I27CE081234; Thu, 1 Aug 2024 18:02:07 GMT (envelope-from git) Date: Thu, 1 Aug 2024 18:02:07 GMT Message-Id: <202408011802.471I27CE081234@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 352dd826ffdd - stable/14 - fibs: Limit the WARNING message to only once when setting up with multiple fibs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 352dd826ffdd88d26744023fe8bcff795bdf64d8 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=352dd826ffdd88d26744023fe8bcff795bdf64d8 commit 352dd826ffdd88d26744023fe8bcff795bdf64d8 Author: Zhenlei Huang AuthorDate: 2024-08-01 18:00:45 +0000 Commit: Zhenlei Huang CommitDate: 2024-08-01 18:00:45 +0000 fibs: Limit the WARNING message to only once when setting up with multiple fibs In main [1] this warning message is suppressed but no plans to MFC the change as the message may be still useful for users that upgrade from older releases to 14.x or 13.x. Well emitting this warning message every time increasing the fib number is confusing for users not for the feature `net.add_addr_allfibs`, let's limit it to be printed only once. 1. a48f7a2eb90b fibs: Suppress the WARNING message for setups with multiple fibs This is a direct commit to stable/14 and stable/13. PR: 280097 Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46204 --- sys/net/route/route_tables.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c index fd211bcd5dda..f1c96f813d91 100644 --- a/sys/net/route/route_tables.c +++ b/sys/net/route/route_tables.c @@ -218,6 +218,7 @@ populate_kernel_routes(struct rib_head **new_rt_tables, struct rib_head *rh) static void grow_rtables(uint32_t num_tables) { + static bool printedonce; struct domain *dom; struct rib_head **prnh, *rh; struct rib_head **new_rt_tables, **old_rt_tables; @@ -231,10 +232,12 @@ grow_rtables(uint32_t num_tables) new_rt_tables = mallocarray(num_tables * (AF_MAX + 1), sizeof(void *), M_RTABLE, M_WAITOK | M_ZERO); - if ((num_tables > 1) && (V_rt_add_addr_allfibs == 0)) + if (num_tables > 1 && V_rt_add_addr_allfibs == 0 && !printedonce) { + printedonce = true; printf("WARNING: Adding ifaddrs to all fibs has been turned off " "by default. Consider tuning %s if needed\n", "net.add_addr_allfibs"); + } #ifdef FIB_ALGO fib_grow_rtables(num_tables);