From nobody Tue Apr 16 15:58:50 2024 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 4VJpcV2qgsz5H5G4; Tue, 16 Apr 2024 15:58: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 4VJpcV1dBbz4SFS; Tue, 16 Apr 2024 15:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713283130; 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=GXFKNl2XMj4y4mJzbUaN9M+StyCeMvXVWHVzON8lpZQ=; b=i9g3HrdIWAsD6GNw/XxvMHKG5H/0osY90QB9w6/fQotckcubakjrRGI0kbfDt64+7iFiyZ cH4vAPEXg2vQii8F3l9KPDb46yEBKNvkUNqO7yt6zYNuV86axBuMJ2POtwy+JobA5641qq f/A+n/9jVUi0dbIKQjOf+w/T+kqPay3lkyuIdceh+tdUay89Xkxidu6xOWsCH+O7CIRXTD XB45Hx0ncmVocxQ6gahFv+CqSOieFIAOrDRU2g0r24fR2qq5NgZbFd/kbD8V9TwV6+BI0h EHhAY6n1eVUv4zpUCmRznSs/2/3aUBW6fhFYJgkbojdJyxxYl4ptPVns/rqiIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713283130; a=rsa-sha256; cv=none; b=n8bZ6/o2bIIfVEd2WwtOIoX/4avNqkQWEXlGT6f+N6LNIq9tMyW1qSwVKZVeCDV2LlMn09 6zbWsBaN8DYyFsD42Q+g8rIIfas/rWPbgNIKHJzh4uMSuL8wEqLumHjHHLsXyw/ZPgEFVe R5S0YYviOpPaYm+KLrTcUXoLlQ7I/nt+YXXLd3K7MKRw2/MwBAdzmTYca8ELTynKdMYxmt OIIESF0HMTdL1GjjDugOMNDulvHf/9Lx2iGG9/H6urzBqg8Kwk6sxF34mVpRmiEkF8ud6U vBgcp39+Gbh+iu1UP0WEwu6ZFnu3FNL3NP8c3IJCx2UgHdrgg2UX72DOMsCouA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713283130; 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=GXFKNl2XMj4y4mJzbUaN9M+StyCeMvXVWHVzON8lpZQ=; b=GUl8N7NM7lWxabGauNiuZ8/U2BGvEXMt4ibd/16gbeOX+Q5i5scOh0ZAA0U6PCfyUE1N9J 4KUN9M3zXnKszPGYKg5uG34nhUQfu+NvWIdatrkUlxpAnCpu61jnbGCdTbH70qHHuEhpwz AcxgvG8NGMEoDgUodAoNDl+dS/nt9M+WbaqDPRKr0WBbECG7NtiSWfa5TzLTB4qvZZAqGW VN7azU910dA+tGRfQ1t7QXFBzfOAmvDZMyWCx9w1sdF4m2f3l84Hv78QO1jmt2rHjlHFI4 jWLDIKyVsv3r7fkKX3mmN63QajJ6ntiDci6nl0CAGz3+LslvDwBfHevkz9SpaA== 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 4VJpcV1DPFzpC2; Tue, 16 Apr 2024 15:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43GFwob4095210; Tue, 16 Apr 2024 15:58:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43GFwoEt095208; Tue, 16 Apr 2024 15:58:50 GMT (envelope-from git) Date: Tue, 16 Apr 2024 15:58:50 GMT Message-Id: <202404161558.43GFwoEt095208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 8062f37d1c99 - stable/14 - vtnet: set VNET context in RX handler 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8062f37d1c99ded250b36ad90fb32bb5f77ee600 Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=8062f37d1c99ded250b36ad90fb32bb5f77ee600 commit 8062f37d1c99ded250b36ad90fb32bb5f77ee600 Author: Gleb Smirnoff AuthorDate: 2024-03-28 21:12:39 +0000 Commit: Gleb Smirnoff CommitDate: 2024-04-16 15:56:32 +0000 vtnet: set VNET context in RX handler The context is required for NIC-level pfil(9) filtering. (cherry picked from commit 3f2b9607756d0f92ca29c844db0718b313a06634) --- sys/dev/virtio/network/if_vtnet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 7d6411876b3d..245a6b6d7359 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -2095,6 +2095,7 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) VTNET_RXQ_LOCK_ASSERT(rxq); + CURVNET_SET_QUIET(if_getvnet(ifp)); while (count-- > 0) { struct mbuf *m; uint32_t len, nbufs, adjsz; @@ -2188,6 +2189,7 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) #endif virtqueue_notify(vq); } + CURVNET_RESTORE(); return (count > 0 ? 0 : EAGAIN); }