From nobody Thu Jan 06 10:12:50 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 8A2F81922CEB; Thu, 6 Jan 2022 10:12:50 +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 4JV2Gp1vcpz3NHw; Thu, 6 Jan 2022 10:12:50 +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 21D9F1DCBC; Thu, 6 Jan 2022 10:12:50 +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 206ACopH045247; Thu, 6 Jan 2022 10:12:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 206ACoPP045246; Thu, 6 Jan 2022 10:12:50 GMT (envelope-from git) Date: Thu, 6 Jan 2022 10:12:50 GMT Message-Id: <202201061012.206ACoPP045246@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: 6000a417d32a - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 6000a417d32a417911ed3d96d3bb3f59fce5a9ae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641463970; 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=/o883qyYPS741YTjjQL3kID9txrrBELeO0a3evQt0x0=; b=wIXkWdIdS0pyvEeuN3Hv/6aanyj+HICBzVr4T1cAYE9v2G9RxQRYDCeXgdr5DZJszZ94CJ cLY+gMzM6M/29UnsieZH2buNodIFY0T5thUGbiuO9yGqIKEIszQ3B2iiq4eHNL3FM402ZX b1/qy4ZIF6U+Pqc2h9+jQ0p5/UvwNl+ts4eQBryfZoCkX+zqe59/aZlb9GojTKwEJvj9/X nEtADr1eOtGz3u8MNj6qngmirwEHHCL6s6RmEt6OpxwFYGLmWz0P9G/JaGC51RO/WY0s/5 iGiRO+PE/Mp4zAVUbl/58LM6/xT94Mq63mJ//BA3ptNLvq9C649IdHZSNRA1rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641463970; a=rsa-sha256; cv=none; b=sqorVUu8GK5LbinF+qsMzK+ZWg5im8Qw8iMmIda/g04tK1SRcLgki5DJAMv/DJjBeOf0Oz l8d2IHBtdc4iootxJwCrk+Ean0m7wIdQCh6xLnv71RDKh9QUBoDezvUskL23z/yVbIwb+k WygfznYgrdmmYQTKrlptvAT61P0rL7lH5QenX0XwgA1kzLGcKn7VthjOiGDHtLhIb7Pkjw 5gJ5fG+Zsgdt5vgM/GAHj2uAvZVqEeZdWdIy1cEg/2DcrEjJKgTv8O5yK6ickf3QKvU09I FATPoBlFM13cagGgmhFPIlNW1pgjumVYBf9Z0L81XRI9QUxM5ZhM3nzS4RblQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=6000a417d32a417911ed3d96d3bb3f59fce5a9ae commit 6000a417d32a417911ed3d96d3bb3f59fce5a9ae Author: Vincenzo Maffione AuthorDate: 2021-12-28 10:47:13 +0000 Commit: Vincenzo Maffione CommitDate: 2022-01-06 09:53:08 +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 85da3e77f037..c852e31c0aac 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4423,6 +4423,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);