From nobody Sat Sep 23 09:24:21 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 4Rt3cP6F6Hz4vL1M; Sat, 23 Sep 2023 09:24:21 +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 4Rt3cP54lCz4WtX; Sat, 23 Sep 2023 09:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695461061; 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=SAbkKhPatnu1iKrZl6Ej4yMgvE6jvMqJskApkBINWPk=; b=s+heItJ32Qk1SysrzWLgiErQujP0d/x5IGaT/isjIfHqbJIOlWEmzfngkmkL3p8yUQ1NCs zw5TL0j3bSYjzmihhxWGWLvhcdIVJVlqmbdN9wJHZHOwlPxM5Rx62Qxk2P10wEasBrmTBV CuqLVloGWes9iElHlTcMbnmE5sWTaUL4CIPFxGjUdIi2zo1g+snBoOxKHwqkTJ2tkdFyaQ TcLLb1KXdoR4k1tMl++ld8eD3p1bJoAoLFn39y9o/6UBAgvaOFWMO471WAXvbyRvj7eh+A jhe/ve9SfzTxPZQcq7jdPEWVcKQA/jKyvaUG8bpyzGWM2hHKOxR5eQFebl2UaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695461061; a=rsa-sha256; cv=none; b=UvtLzEHCQ/TJtC1l05UlEzygL8svX2ms0yekYFBv3W1dRSl7fkBSY4vgJx5HNSU8TLi5ZW 7WojE0fhhcGkJ6s9P3NjT5uolDQ/XJnCiHerXkeWFXCyyfZPck6IKRA5zdiIZQ/AfpLpPe sF6ROHYQ71jT0Rxd46Us2WlbiPcqvm6droO05Q2JhafxfLd+z9X4ypssVPcR1NQPC/zHqQ IkFxsjRzBwZXFH8WJqxIfI5g/sjPmPDbLUVCFm8DteYoG5h9ztu5pd5n926xJQDfQRULEm IhZqfUGDnp2rPGb9cc948308+D6AZP7TZxNr+oL2VmHUf2bg40sKt52sb0uxmQ== 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=1695461061; 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=SAbkKhPatnu1iKrZl6Ej4yMgvE6jvMqJskApkBINWPk=; b=Jq3XoJm5RQpbeTZdINLxbxzDOPrT/58yh17+DctU5Y+WPuz9EQD2WsnNhaRw3CU5mQSx31 kInJ6ruAv3qxDOYFbhIsEdxgGr8dMTWKbIp93vdYnC1g7YDyySvnlD3d3ed7Th61QyTvk5 dL4oZdX9CqglHOE/Poedq8pBY9jyrAwo0gERICWkzuxuVDg7eGpYGb5WmQoNkqzrCn1X6v VBJfwoDclXqjxYwD/Ij7N8gCBZHNjuVf++fO++UGHQHrJrdI9j0ZNvz3C9gtsLWRMNEwxD SM4+0SnhydE9EspUDA9aYwUXtldKPxsSPdBe6qxZqrO9zX9OqpZJy7rsEdyUHw== 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 4Rt3cP45tbzykf; Sat, 23 Sep 2023 09:24:21 +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 38N9OLZr005586; Sat, 23 Sep 2023 09:24:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38N9OLGA005583; Sat, 23 Sep 2023 09:24:21 GMT (envelope-from git) Date: Sat, 23 Sep 2023 09:24:21 GMT Message-Id: <202309230924.38N9OLGA005583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marko Zec Subject: git: 03ef737c544d - main - ng_eiface: switch VNETs when injecting mbufs into netgraph 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: zec X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03ef737c544d3dd90a0000c18382db99ccf2ee9a Auto-Submitted: auto-generated The branch main has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=03ef737c544d3dd90a0000c18382db99ccf2ee9a commit 03ef737c544d3dd90a0000c18382db99ccf2ee9a Author: Marko Zec AuthorDate: 2023-09-23 08:56:56 +0000 Commit: Marko Zec CommitDate: 2023-09-23 08:56:56 +0000 ng_eiface: switch VNETs when injecting mbufs into netgraph A ng_eiface instance may be on lease to a different vnet while remaining tied to its parent vnet. In such circumstances, before injecting mbufs into netgraph, curvnet must be set to that of the ng_eiface's netgraph node. Mark the vnet transition as QUIET, since otherwise it would be recorded as a curvnet recursion when ng_eiface's ifnet resides in the same (parent) vnet as its netgraph node. PR: 274028 Reported by: Dancho Penev MFC after: 1 week --- sys/netgraph/ng_eiface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c index 40b1a1128de8..a35650f15edd 100644 --- a/sys/netgraph/ng_eiface.c +++ b/sys/netgraph/ng_eiface.c @@ -257,7 +257,9 @@ ng_eiface_start2(node_p node, hook_p hook, void *arg1, int arg2) * freed. */ NG_OUTBOUND_THREAD_REF(); + CURVNET_SET_QUIET(priv->node->nd_vnet); NG_SEND_DATA_ONLY(error, priv->ether, m); + CURVNET_RESTORE(); NG_OUTBOUND_THREAD_UNREF(); /* Update stats */