From nobody Mon Apr 11 14:53:18 2022 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 8EBA81AAB562; Mon, 11 Apr 2022 14:53:18 +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 4KcX0Z2yf1z3Qdn; Mon, 11 Apr 2022 14:53:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649688798; 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=nx5sHUvvztfWEEIDrCFOVFkH02eq8ukyWKCNx6SCXeQ=; b=u+wmGYPgCkNqNMlIQgEdIscklgO3NzBlVOg+5+SlwoQ3bh6sLGkLJbhMFFYeLUfH327CCs jvRkpVTliVLjOmbORu5wD1bEP2A4Dh2tQESgVeI/U/YEJiIc2VFMWx9mv6SaSoBcKpe3y5 q6SLqJqdIbzCfHaaJKasFcLQWvI7XVHjKgWrr3gKy0yZ9S2i61H/tH6Kl9XFfwZzOsYrLk H3Xee2hQLsMt58+6eIkPnmKlYsYJNTxNWdV0Iw5hbFom7+PEBgX3++1deHfz5eOyek0n5j w2yxAAMq4N6b8pLIFlqJw/PMceh1IVLH+gfXZJJQbOeCdeJ2KGOotub2GAQT0Q== 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 46E2425109; Mon, 11 Apr 2022 14:53:18 +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 23BErI17023093; Mon, 11 Apr 2022 14:53:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23BErISd023092; Mon, 11 Apr 2022 14:53:18 GMT (envelope-from git) Date: Mon, 11 Apr 2022 14:53:18 GMT Message-Id: <202204111453.23BErISd023092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 44250a19c8fd - stable/12 - pfsync: Add CTLFLAG_VNET to carp_demotion_factor sysctl 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/12 X-Git-Reftype: branch X-Git-Commit: 44250a19c8fd442e106aeb586bba33215caaedc5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649688798; 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=nx5sHUvvztfWEEIDrCFOVFkH02eq8ukyWKCNx6SCXeQ=; b=Pgqk7RzcjuTXmzUoGIar0J3HAAJnG1lqEYILeRtEiUrV6Pov6GQ58SprRIwMSZm6yC5nCP q3jNbNKYcYlgCAaiOckZ2e2bouFkSXZ/pE0/dDvbhsFzFmO6yUyOPVPW0KNWXJSEWGfdWF CE2EQkZ/5WO9JeC40ZiKWNxtRvPvp9fb4LiMdEMP6j0So/bGUPTkWcJE0v7HflYpdcbFhl YFEFW3bqC2mf1WdAGkjD1QthVrVa6GmKPIEUdtqwKbOlaWjvvB6x81CSMRQr/tEaqIquGM dpUTzcRNgD9hfo6Ct7ljZ90igH2Xh6YzZYy4qsLFftdQ3Oon3l6Uv4uV5qQuMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649688798; a=rsa-sha256; cv=none; b=AdsieFyrZPUwqwGk8hSPeXlDCZuvoSCkTRKHry/4s6B41VkH43j12nNJ91tMuwi7eoOk7s VOhSU4tdfAwI7t/nVzkno4Vcle8xg8KKBsAqYldmWwOjhKbrLYyWJLzHjUB0LeKq6//DgP hRm73d4TLZrODoXKSKvVqMkXi94kbaMh629qJlkbq2INqrF2zd38cIhWaWkJwMFZGhMlxc kwKEwmJ0CuumxZfelra5ELXplxDNjIYVOWfu23bJYIvXXH3Td4MhQxi9rAPT+sgjlAJfrJ 01Liogg8eW6P9G9B2yorD0Z5i3jO3NG0/+hcQKUX5x7tSBAQRm+fZ1UHOQxo6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=44250a19c8fd442e106aeb586bba33215caaedc5 commit 44250a19c8fd442e106aeb586bba33215caaedc5 Author: Luiz Amaral AuthorDate: 2022-04-02 10:09:06 +0000 Commit: Kristof Provost CommitDate: 2022-04-11 14:52:51 +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 (cherry picked from commit 654c1b8ef3c0fcbad3a77ea2a6f35c0dffc86e88) --- 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 b8886cd237a3..cc053b53204a 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -277,7 +277,7 @@ SYSCTL_NODE(_net, OID_AUTO, pfsync, CTLFLAG_RW, 0, "PFSYNC"); 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");