From nobody Mon Apr 17 10:26:27 2023 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 4Q0NWS5rc8z45htZ; Mon, 17 Apr 2023 10:26:28 +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 4Q0NWR3xtXz3K3T; Mon, 17 Apr 2023 10:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681727187; 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=rzQk7O9VckMQB2KhTp7TNoicXiApJyq9K1Td/Y+CEqk=; b=mYIFoBJ5z3L54sekd88IlSIvUQtewbrmIh9IVchGC9dxscpMmVl687+lqiM/R8eoY6wZcO ujgFlLndRH/6IvgHpD+ltiUILt121DWRXOCKdg3W7baI9XrIkbYIlxyjo503tus6IXjcMG t8pL8C7I2PnXQXuGMs+/wePdEU8ePrpfWnDzG8RVqDeJjUT4a1BcCApboVhWp2NpHQ/QbV s4O6CMORdR1nN7SGgnCXETqYltG8uQ2e9vKeb5IewJE+VxNGbP3tKmJq6yvod1m40HZV9r N+hqB/UwW2Sw+ufGEpdKhGZkRNfQkKKCJyz0TCKZF3V1AV6eojZxyekW0SBMVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681727187; 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=rzQk7O9VckMQB2KhTp7TNoicXiApJyq9K1Td/Y+CEqk=; b=Ex2jLzXVeTQVDFf9qFHCEq5SFotq2JSJr8fkhTBQYUfjfIuhea1fRlKSWNvZEsu8KD7uv3 wvGVxtcZqdPaU1Uhpay5+AH/d3m3b996Fn+wOA3VC6bRt0ZzlWcO9hEHcTLtVcmhpJ83u+ V03Fyq2bTQvcZbPB2TKVqiNEnI70L9d6aHU1gicJkyS0rtpP0pw2KA2mw1iMojwr3+vlIS MF2bDXLMITdA0iKhsDJ2sgFBHZJ0VlmJgOwYAUoobhObshJO5X+APLzDLFqJTNK4LeKREO 4S/TkQIhD2POuGKCrZZgpkWSUOaB1ns+vK+Xs/cX4B1w7D+lwzkt2O5WoZDfuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681727187; a=rsa-sha256; cv=none; b=oTN3DrVfiFyOHugg4pp1jEQBToKlmPBYGGmR2i3In3hsWRH0A4IS9zVrvtP1MyQ2Vu8Bh8 QSA18SoOaTiyl8+/G1AEApc8A14U1OmZqXYoNzNrpobIMlDQlMFba4DrFPz602vRD2l/vL +0WSMV0a0buPFOUCwINl0u+TTgIu6KC0QA8Lb26zjNr1GY3W0YBbKJWzrvF300GQDwdh6t 8+cPmEUSzELacnbVk8FkJ5VyaGTyZFFEryDEGMNiW8N8iNhOeHqP6ooTgk3xHNVcUBiffK Rkp4L5IVwI+Vl0rZbh+2f2y8SzVktObYmJScO3JE5dEHbcH4EgDEwegOl05h4Q== 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 4Q0NWR1rRjzQXH; Mon, 17 Apr 2023 10:26:27 +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 33HAQRj1042269; Mon, 17 Apr 2023 10:26:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33HAQRkg042268; Mon, 17 Apr 2023 10:26:27 GMT (envelope-from git) Date: Mon, 17 Apr 2023 10:26:27 GMT Message-Id: <202304171026.33HAQRkg042268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 401f03445e4a - main - lagg(4): Correctly define some sysctl variables 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 401f03445e4aa42960e337604560593c7096e589 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=401f03445e4aa42960e337604560593c7096e589 commit 401f03445e4aa42960e337604560593c7096e589 Author: Zhenlei Huang AuthorDate: 2023-04-17 10:24:35 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-17 10:24:35 +0000 lagg(4): Correctly define some sysctl variables 939a050ad96c virtualized lagg(4), but the corresponding sysctl of some virtualized global variables are not marked with CTLFLAG_VNET. A try to operate on those variables via sysctl will effectively go to the 'master' copies and the virtualized ones are not read or set accordingly. As a side effect, on updating the 'master' copy, the virtualized global variables of newly created vnets will have correct values. PR: 270705 Reviewed by: kp Fixes: 939a050ad96c Virtualize lagg(4) cloner MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39467 --- sys/net/if_lagg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index c07deb3217fa..1b90d1220722 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -276,22 +276,22 @@ SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW | CTLFLAG_VNET, /* Default value for using flowid */ VNET_DEFINE_STATIC(int, def_use_flowid) = 0; #define V_def_use_flowid VNET(def_use_flowid) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RWTUN, - &VNET_NAME(def_use_flowid), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_use_flowid), 0, "Default setting for using flow id for load sharing"); /* Default value for using numa */ VNET_DEFINE_STATIC(int, def_use_numa) = 1; #define V_def_use_numa VNET(def_use_numa) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_numa, CTLFLAG_RWTUN, - &VNET_NAME(def_use_numa), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_numa, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_use_numa), 0, "Use numa to steer flows"); /* Default value for flowid shift */ VNET_DEFINE_STATIC(int, def_flowid_shift) = 16; #define V_def_flowid_shift VNET(def_flowid_shift) -SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, CTLFLAG_RWTUN, - &VNET_NAME(def_flowid_shift), 0, +SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, + CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(def_flowid_shift), 0, "Default setting for flowid shift for load sharing"); static void