From nobody Mon Mar 11 21:05:29 2024 X-Original-To: dev-commits-src-branches@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 4Ttq6y2Ymqz5Djnj; Mon, 11 Mar 2024 21:05:30 +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 4Ttq6y0YVyz3x6V; Mon, 11 Mar 2024 21:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710191130; 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=XKrcqXn0Bj1AOEke5jrYJp+LwGL1Vql5Tt9NKDcIGb0=; b=s9LeJEWoUZnKAyiw0tJ4gDZY8wcgeXmtxAEADTfI9FSfF3hBHBkFiX67ERYMHUnKVSH2B/ HXrf7LLO235YMZ8ay7ACjNaSUYA/PVI9jN2o4WnguON9ugSFaJsH5TEZ5Fz2KJAz/sFWC1 twkxnFgExOGGQRPnNe1qIZXfRDPVSjzTeFHKX+61o+aXAReifyUPxFZ1ihbvcEwWuJa9do bk+kc8ufQRYQQNPUHQLednnY0s2C4axSGMx076DsiBxZRg7yf29pOor5q1GrcHLk068qXH eBtB3L61TTWvf5ZA+26YIt0dvTL1GFz6U3NGwmkNdsLFruot0hdxKLeGlEVb4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710191130; a=rsa-sha256; cv=none; b=L+1tjqnM1DGMqkUR4eGQO2XdKXYRVZRA5LB6rSo15TLnCxRRJls2AwicxwWvpuvGXHvNwF hxMMrH3K8VNfvqIIB0Cq2wVzFOxFoWRMFL8u73RcFyKCoJPy2G8Hms1RqkdUl8BxaO0h19 8sNtXjqPSomjgK0wCP1HJQFqj7p+tia3zVyVu2TBa1INnlm3qNkN6eRfbJKO4g8khGlN1R YKWaouVALvWy1YHj0HzQ6bVclHfC7vp2D7qj55woQxbFq5GqTJJztyxekgRmedkchFTfJY Glh7xPW8XhawGrEISyJkOY0xAr/Hp7rSkc0FwTpOtx1ZHBAStvfcTdpkb1NmNg== 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=1710191130; 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=XKrcqXn0Bj1AOEke5jrYJp+LwGL1Vql5Tt9NKDcIGb0=; b=CIWkJEqsTy6IpKlkJTDkVjnFwXST9UG9cxTlbqV96dIjk6ttGK8ZFKIASXjYpb5Q1LfKae tFWgc6pxbPgGpS3/kCQn6EG3QZN5vGhdOJcOdZE2aLl6Pq2aS9b+M98qFGCS8gC8d6x8Cp BMouYQn2vbBW1QKJbuOwztNlDDPDVgs6gKDz4Hempx2A+KfTEX5UrR37zpzYQ6zA2hi2y4 mw7oraiNK9Yr/sl9NwN65DhPZRYSW5XT7uPBHnCwdLUFE4M6nbO7fyWxYxAJMPdACFpbgz dFh9NDUIns/n36ZpxfFsH7S1Xo6DcFIuoQVA7bPTjmhmdDonvWIxaYP+dFywkA== 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 4Ttq6y06hrzlgr; Mon, 11 Mar 2024 21:05:30 +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 42BL5TM7091965; Mon, 11 Mar 2024 21:05:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BL5TrU091962; Mon, 11 Mar 2024 21:05:29 GMT (envelope-from git) Date: Mon, 11 Mar 2024 21:05:29 GMT Message-Id: <202403112105.42BL5TrU091962@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: 6766a47c0211 - stable/13 - vnet: add CURVNET_ASSERT_SET List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 6766a47c02117a4935c097dc8996c9faf7b42d4f Auto-Submitted: auto-generated The branch stable/13 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=6766a47c02117a4935c097dc8996c9faf7b42d4f commit 6766a47c02117a4935c097dc8996c9faf7b42d4f Author: Mateusz Guzik AuthorDate: 2022-02-17 16:48:45 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-11 20:58:00 +0000 vnet: add CURVNET_ASSERT_SET Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34312 (cherry picked from commit 75cde1f872a4dc2187e6d172e5a5e69a2b3a59cf) --- sys/net/vnet.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/net/vnet.h b/sys/net/vnet.h index 12bf0d83c119..fb26077e694c 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -236,6 +236,10 @@ void vnet_log_recursion(struct vnet *, const char *, int); curvnet = saved_vnet; #endif /* VNET_DEBUG */ +#define CURVNET_ASSERT_SET() \ + VNET_ASSERT(curvnet != NULL, ("vnet is not set at %s:%d %s()", \ + __FILE__, __LINE__, __func__)) + extern struct vnet *vnet0; #define IS_DEFAULT_VNET(arg) ((arg) == vnet0)