aboutsummaryrefslogtreecommitdiff
path: root/sys/net/vnet.h
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2020-02-17 11:08:50 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2020-02-17 11:08:50 +0000
commit10108cb6737ba39ad0289e84255f039a8258a6cc (patch)
tree10324cbc56938d99baedfd96b057d14a4e5ff195 /sys/net/vnet.h
parentbacb11c9ed37886069dbfe4303f414b731d5957e (diff)
downloadsrc-10108cb6737ba39ad0289e84255f039a8258a6cc.tar.gz
src-10108cb6737ba39ad0289e84255f039a8258a6cc.zip
Partially revert VNET change and expand VNET structure.
Revert parts of r353274 replacing vnet_state with a shutdown flag. Not having the state flag for the current SI_SUB_* makes it harder to debug kernel or module panics related to VNET bringup or teardown. Not having the state also does not allow us to check for other dependency levels between components, e.g. for moving interfaces. Expand the VNET structure with the new boolean flag indicating that we are doing a shutdown of a given vnet and update the vnet magic cookie for the change. Update libkvm to compile with a bool in the kernel struct. Bump __FreeBSD_version for (external) module builds to more easily detect the change. Reviewed by: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23097
Notes
Notes: svn path=/head/; revision=358020
Diffstat (limited to 'sys/net/vnet.h')
-rw-r--r--sys/net/vnet.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/vnet.h b/sys/net/vnet.h
index e02a04f97055..3886da1ccace 100644
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -72,11 +72,12 @@ struct vnet {
u_int vnet_magic_n;
u_int vnet_ifcnt;
u_int vnet_sockcnt;
- u_int vnet_shutdown; /* Shutdown in progress. */
+ u_int vnet_state; /* SI_SUB_* */
void *vnet_data_mem;
uintptr_t vnet_data_base;
-};
-#define VNET_MAGIC_N 0x3e0d8f29
+ bool vnet_shutdown; /* Shutdown in progress. */
+} __aligned(CACHE_LINE_SIZE);
+#define VNET_MAGIC_N 0x5e4a6f28
/*
* These two virtual network stack allocator definitions are also required