From nobody Thu Mar 28 21:13:59 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 4V5GVv2dy7z5G3P7; Thu, 28 Mar 2024 21:13:59 +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 4V5GVv26Znz4fgT; Thu, 28 Mar 2024 21:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711660439; 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=q+/45JxNU5yA1CTqjpUvnt4Ma7LMLXw9vBUbH24RVGI=; b=UxKRUUQI/Kn3cqxUEAEi+tTipcnLcJGjjp6DwcWdrxnEzwO/Ef0g/dEYRInEkLowldNMdk zY6zVJSF3QfxU/oDveeWg3ljKnCN74iwb9tpXSU/uF6TpesyBckhsgS2CcSfu37GPEeKqI yPv9a37KohbMCaEI2VLN6KGqUaUtsuYMi2FyOVtWrqEWVkrqbKqPTZ3CvLN9F1HTM0MbR1 wmg5uszNP1zpnqwyrraV+/xG7L7I2OsqW+6meUIFcyQusaoZEzwRvPw9mq/21tJcEB7uvj BciAJrwxOsIr9svHuuM91xxx/7CnEh2ARgXnRZC6t3fgYJcxJPOg0levVNx5bA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711660439; a=rsa-sha256; cv=none; b=RXwSzLAff+r7PDvmiP1UiuGk93S3pnFNsgwKNxKFvuQg04qYBdzZ0Y5a5x0lDJujBbby35 VSIwOjrPbJIoUNcbT6vH2p/I0bHoG/v6GkcZt7tFAGoh7N/DlBdKN4i3HVllKwtCIbqVtZ wSFpTzxF7UId0aSvR4ulvkOfEQjqRPtWrG0s924AyHepI36DxXOrBYmnmXgTjaRS2mA9sr H0Js8lFtxB6Xq4a5EIeAApkazZYnddcCfNyN/wGnoeqa5GwOXHzQS8DUICMUR0f4o8l/Wu aQ6CYj8wtBfy0x+VNKPbG3ThRMpim2hnUq8dBkYztd8fvnIm3scDFCytk0r+IQ== 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=1711660439; 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=q+/45JxNU5yA1CTqjpUvnt4Ma7LMLXw9vBUbH24RVGI=; b=LsWfc3Vwhk+dsQ9vWA6KXysgkK5b2iWVVW8Z6uAy77X4/0E9J9L/mtsaPlOKhV55AJPQHD 5CXLUZ4+RcM/vddL74s/b6I6e36TsLRdcx2TyO+lNTwsAlyqrdaIraV/e8u4is/8W7/iAf pArvUNgcW2sar/xblkzTpCPvKCYmb4FkJm9LENh7r3Of6VI66/hj+IH8MZB8cBUHPCj4uY AJ2TKzTpyOdsvgGo2zHhYxx9EKB+SSa1NfP2IhHL4iiNac2BIqqkYl2djagUv407WcArBk N9/aFlMiiUur+jibNHvDmFK5sQ5jOQ97cFD9hon7OdsEU82Bq4SBOp1Mpjy0lg== 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 4V5GVv1kDgzjl7; Thu, 28 Mar 2024 21:13:59 +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 42SLDxKU043128; Thu, 28 Mar 2024 21:13:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42SLDxIx043125; Thu, 28 Mar 2024 21:13:59 GMT (envelope-from git) Date: Thu, 28 Mar 2024 21:13:59 GMT Message-Id: <202403282113.42SLDxIx043125@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 3f2b9607756d - main - 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: 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f2b9607756d0f92ca29c844db0718b313a06634 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3f2b9607756d0f92ca29c844db0718b313a06634 commit 3f2b9607756d0f92ca29c844db0718b313a06634 Author: Gleb Smirnoff AuthorDate: 2024-03-28 21:12:39 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-28 21:12:39 +0000 vtnet: set VNET context in RX handler The context is required for NIC-level pfil(9) filtering. --- 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 1c731b496f12..5b854ad6cbb7 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -2086,6 +2086,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; @@ -2179,6 +2180,7 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) #endif virtqueue_notify(vq); } + CURVNET_RESTORE(); return (count > 0 ? 0 : EAGAIN); }