From nobody Sat Apr 2 12:11:48 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 F2E211A62776; Sat, 2 Apr 2022 12:11:48 +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 4KVwrN62Yjz3prx; Sat, 2 Apr 2022 12:11:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648901508; 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=/jWA2idpdyhi6luEtOdAl0OcIWZ7c5sCXpzzs6y4jz0=; b=m41kp3FK+YTiSuEgJwO0NFIj9n3AQlvIa/KYAVZHsW8qrW2DTgxOZDsHhzG+7KM80S71j3 US1SPCBXNCkyI1mz2qjxptd1y7BmBOVl+CEzummBfV086dNMYhUiVro+oDhB3W1NzEQYQA EIdxBIVhbhv5ARIyOhWcL05xSQvUghMFcC7219UpjoS9mhmMISGvDCmPL+xobMD0fEmQMP uuhNDSILfsxLaiscTxwbSiGNaGO7r2V93Bzt/brWbqy9P8MBA4YDgnXlQNsDUjDTWd9Ek3 zsayOWQ5g5Jxr95GxZUo8Cm28E73uMhXKJVlkpDExiioRlDuyRtlNTwIUDBScg== 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 B101998B; Sat, 2 Apr 2022 12:11:48 +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 232CBm0O088662; Sat, 2 Apr 2022 12:11:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 232CBmkC088661; Sat, 2 Apr 2022 12:11:48 GMT (envelope-from git) Date: Sat, 2 Apr 2022 12:11:48 GMT Message-Id: <202204021211.232CBmkC088661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 654c1b8ef3c0 - main - pfsync: Add CTLFLAG_VNET to carp_demotion_factor sysctl 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 654c1b8ef3c0fcbad3a77ea2a6f35c0dffc86e88 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648901508; 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=/jWA2idpdyhi6luEtOdAl0OcIWZ7c5sCXpzzs6y4jz0=; b=ihD3qv5+rpdmJ04FwkZoOKNF8wLLdze73yvtXgD3ZyeWIRzubTUVMUB7n4etv5LcPSvOua Xjhx8iE5AW7Bj+OZZr7eOA3CxIt4iAYe9pfJ3lwMZR1uZlvMOUXlreCdKMvxdbrRAdSJbJ kIxwDm4UUFU0d3FJRRodpIO/1ZC2g1W7dWppYyvVhUbMMRzHWUVAF37VeqebP3f7Uvu1sN I16psRcCXiVN8jewsywIDVZruCSQUSINw5agNLYp/u2g+PQyDoTSY50Rfwg71LWPmG+cGd kq7YaZfbjAV5901xSNGFFKKWpp3bZP2DavcWwLSvrnJpfhMg0Sa+oz2CHxrGzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648901508; a=rsa-sha256; cv=none; b=n5mI5T6WI5/H2tu7c6jTfIwBh8E/MR3Fq1uKXxwY61ZMdSBg4vcta0tZ+A1DjqDF2zTAZn u+RT2eCgsm3nerNhMrx97BvU5YMaaZahSe8LiItn0UNd8HnaMFrK7TiGRpwDmKHmE/VmI9 WhXnmA2TpqKpq4VI31HpBgerL/23BBN8QwI6FwKH30Gz6GdK7Un9vGI37YPRc7iDKIBp1L nmgyV6mNnN7BBzT0O5NRBB3y5e3VJuipcuXauwbg/bW+EuKoW5hNMUc32uHQT9bUFCRAlV zrcn+/mZI/4IspegStSBRwk3F2m3s13ldo1dD5IXYUN2xv0fqIq01Uw+BPCswg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=654c1b8ef3c0fcbad3a77ea2a6f35c0dffc86e88 commit 654c1b8ef3c0fcbad3a77ea2a6f35c0dffc86e88 Author: Luiz Amaral AuthorDate: 2022-04-02 10:09:06 +0000 Commit: Kristof Provost CommitDate: 2022-04-02 10:11:32 +0000 pfsync: Add CTLFLAG_VNET to carp_demotion_factor sysctl When trying to avoid a CARP demotion during a pfsync service restart, I noticed that a non-default value for the net.pfsync.carp_demotion_factor sysctl was not being applied during the demotion. The CARP was always demoted by 240. After investigating, I realized that the sysctl was using VNET_NAME() without the CTLFLAG_VNET. PR: 262983 Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D34737 --- sys/netpfil/pf/if_pfsync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 641300d2aeeb..1f4afad129ca 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -278,7 +278,7 @@ SYSCTL_NODE(_net, OID_AUTO, pfsync, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, SYSCTL_STRUCT(_net_pfsync, OID_AUTO, stats, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(pfsyncstats), pfsyncstats, "PFSYNC statistics (struct pfsyncstats, net/if_pfsync.h)"); -SYSCTL_INT(_net_pfsync, OID_AUTO, carp_demotion_factor, CTLFLAG_RW, +SYSCTL_INT(_net_pfsync, OID_AUTO, carp_demotion_factor, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(pfsync_carp_adj), 0, "pfsync's CARP demotion factor adjustment"); SYSCTL_ULONG(_net_pfsync, OID_AUTO, pfsync_buckets, CTLFLAG_RDTUN, &pfsync_buckets, 0, "Number of pfsync hash buckets");