summaryrefslogtreecommitdiff
path: root/sys/net/vnet.h
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2018-07-30 15:05:07 +0000
committerAndrew Turner <andrew@FreeBSD.org>2018-07-30 15:05:07 +0000
commitb6ea4c5a2ac8cb014d87ef56e9f8f74450545bb5 (patch)
tree223fa0e27e6eeb7cc6e827d734664582db5a63af /sys/net/vnet.h
parent0d84986542c3289325f1fb6017b76dfcdaa92f3d (diff)
downloadsrc-test2-b6ea4c5a2ac8cb014d87ef56e9f8f74450545bb5.tar.gz
src-test2-b6ea4c5a2ac8cb014d87ef56e9f8f74450545bb5.zip
Notes
Diffstat (limited to 'sys/net/vnet.h')
-rw-r--r--sys/net/vnet.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/net/vnet.h b/sys/net/vnet.h
index 66d5cd85bc52..514519a327b1 100644
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -273,8 +273,17 @@ extern struct sx vnet_sxlock;
/* struct _hack is to stop this from being used with static data */
#define VNET_DEFINE(t, n) \
struct _hack; t VNET_NAME(n) __section(VNET_SETNAME) __used
+#if defined(KLD_MODULE) && defined(__aarch64__)
+/*
+ * As with DPCPU_DEFINE_STATIC we are unable to mark this data as static
+ * in modules on some architectures.
+ */
+#define VNET_DEFINE_STATIC(t, n) \
+ t VNET_NAME(n) __section(VNET_SETNAME) __used
+#else
#define VNET_DEFINE_STATIC(t, n) \
static t VNET_NAME(n) __section(VNET_SETNAME) __used
+#endif
#define _VNET_PTR(b, n) (__typeof(VNET_NAME(n))*) \
((b) + (uintptr_t)&VNET_NAME(n))