Date: Sat, 19 Feb 2022 13:11:15 GMT From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 75cde1f872a4 - main - vnet: add CURVNET_ASSERT_SET Message-ID: <202202191311.21JDBFMV075295@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=75cde1f872a4dc2187e6d172e5a5e69a2b3a59cf commit 75cde1f872a4dc2187e6d172e5a5e69a2b3a59cf Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2022-02-17 16:48:45 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2022-02-19 13:10:01 +0000 vnet: add CURVNET_ASSERT_SET Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34312 --- sys/net/vnet.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/net/vnet.h b/sys/net/vnet.h index dcfcb5f99064..86ddd444fc09 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -238,6 +238,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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202191311.21JDBFMV075295>