From nobody Thu Jan 6 10:24:11 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 D9DB01925F9B; Thu, 6 Jan 2022 10:24:11 +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 4JV2Wv4MTSz3Q10; Thu, 6 Jan 2022 10:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 751661DEFF; Thu, 6 Jan 2022 10:24:11 +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 206AOBkt058404; Thu, 6 Jan 2022 10:24:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 206AOBI8058403; Thu, 6 Jan 2022 10:24:11 GMT (envelope-from git) Date: Thu, 6 Jan 2022 10:24:11 GMT Message-Id: <202201061024.206AOBI8058403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vincenzo Maffione Subject: git: 5df59718ed52 - stable/12 - net: iflib: sync isc_capenable to if_capenable 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: vmaffione X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5df59718ed52e66963e81bb16e400a257745ae96 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641464651; 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=60c+UAqGB7en6rcwzGWTeR2helPWULjPiURHm4CO0z4=; b=fkXcFAcNwKVgv/evqTfvcFcvnKXYoaZ2/kIaWKR2bHSw2AAwBQzy/zt2wmtgecEzNkRpFg df2cpaK9oG70S5j0xsmgLX9/DUH9fdSp2H9X604qsKTm+mnIC1bYqDGSjqo5mN9jQhnvn1 TYPBNX9Aaojuh/uQkhJCve6D6KMuiDrPaEJ4d/2dJZ4C0k1GkvgqAhsszCK8v9/uGU1vIc eLWmjh8BIgdNnnfPER0767WFnqWiVsA8fE1TDGt/ZqgtL1WxXF+zYr774z6HNqDAhypsG2 grQK9/7rp/FZ/gyGS51GWphi0vULW1tq5jHTts4c8vPoj/SaokovWtm0dUcyKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641464651; a=rsa-sha256; cv=none; b=O0TRqhJKqzFB4DJ7BNPhArIP0m3kPe/f6BPagyeSy7Lo5sEhKnWB0fn8HMhHWy9UwTMmjh gMHYfZylJXFVfMaas6jBYl0ynN6GBRSxgT0OlrPHzQ4A/sBPO4xgb2PF/zfx1Dpq3pHK7j MUEz1gVL2o9+t/ljfUAPv5WfdrFI0Onhc+q03xbQE5FCQkF/ivvy9UuC2AT5Y82tlGX2ou //rwMzqPvGG/i19j4zn9A9S4/tCgwTKmXZrWxdtfVYvdJ6ok4fXWxQSQ8OhgllwNvBEurQ rxZt+jTDmdoq1SwMzxWco/erMqFfOzmM829eBNTNgFpKQ1KBxrF1KRwReNUMtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=5df59718ed52e66963e81bb16e400a257745ae96 commit 5df59718ed52e66963e81bb16e400a257745ae96 Author: Vincenzo Maffione AuthorDate: 2021-12-28 10:47:13 +0000 Commit: Vincenzo Maffione CommitDate: 2022-01-06 10:14:44 +0000 net: iflib: sync isc_capenable to if_capenable On SIOCSIFCAP, some bits in ifp->if_capenable may be toggled. When this happens, apply the same change to isc_capenable, which is the iflib private copy of if_capenable (for a subset of the IFCAP_* bits). In this way the iflib drivers can check the bits using isc_capenable rather than if_capenable. This is convenient because the latter access requires an additional indirection through the ifp, and it is also less likely to be in cache. PR: 260068 Reviewed by: kbowling, gallatin MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33156 (cherry picked from commit 4561c4f0ca59da5b704238074bd488ff907b4b50) --- sys/net/iflib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 304518e2a24d..d2d073b82945 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4443,6 +4443,7 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) iflib_stop(ctx); STATE_LOCK(ctx); if_togglecapenable(ifp, setmask); + ctx->ifc_softc_ctx.isc_capenable ^= setmask; STATE_UNLOCK(ctx); if (bits & IFF_DRV_RUNNING && setmask & ~IFCAP_WOL) iflib_init_locked(ctx);