summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vlib/node.h1
-rw-r--r--src/vnet/interface_output.c2
-rw-r--r--src/vnet/ip/ip4_reassembly.c2
-rw-r--r--src/vnet/ip/ip6_reassembly.c2
-rw-r--r--src/vnet/ipsec/ipsec_input.c8
-rw-r--r--src/vnet/l2/l2_fwd.c4
-rw-r--r--src/vnet/l2/l2_learn.c4
-rw-r--r--src/vnet/l2/l2_patch.c4
-rw-r--r--src/vnet/tcp/tcp_syn_filter4.c4
9 files changed, 16 insertions, 15 deletions
diff --git a/src/vlib/node.h b/src/vlib/node.h
index 40d0165f402..2db31c68d7f 100644
--- a/src/vlib/node.h
+++ b/src/vlib/node.h
@@ -187,6 +187,7 @@ static void __vlib_rm_node_registration_##x (void) \
__VA_ARGS__ vlib_node_registration_t x
#else
#define VLIB_REGISTER_NODE(x,...) \
+STATIC_ASSERT (sizeof(# __VA_ARGS__) != 7,"node " #x " must not be declared as static"); \
static __clib_unused vlib_node_registration_t __clib_unused_##x
#endif
diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c
index 6de31dedb9c..8e257014789 100644
--- a/src/vnet/interface_output.c
+++ b/src/vnet/interface_output.c
@@ -1398,7 +1398,7 @@ interface_tx_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (interface_tx, static) = {
+VLIB_REGISTER_NODE (interface_tx) = {
.function = interface_tx_node_fn,
.name = "interface-tx",
.vector_size = sizeof (u32),
diff --git a/src/vnet/ip/ip4_reassembly.c b/src/vnet/ip/ip4_reassembly.c
index 59170354412..682cad965af 100644
--- a/src/vnet/ip/ip4_reassembly.c
+++ b/src/vnet/ip/ip4_reassembly.c
@@ -1526,7 +1526,7 @@ ip4_reass_walk_expired (vlib_main_t * vm,
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (ip4_reass_expire_node, static) = {
+VLIB_REGISTER_NODE (ip4_reass_expire_node) = {
.function = ip4_reass_walk_expired,
.type = VLIB_NODE_TYPE_PROCESS,
.name = "ip4-reassembly-expire-walk",
diff --git a/src/vnet/ip/ip6_reassembly.c b/src/vnet/ip/ip6_reassembly.c
index a5e106a9445..4f27304ca94 100644
--- a/src/vnet/ip/ip6_reassembly.c
+++ b/src/vnet/ip/ip6_reassembly.c
@@ -1530,7 +1530,7 @@ ip6_reass_walk_expired (vlib_main_t * vm,
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (ip6_reass_expire_node, static) = {
+VLIB_REGISTER_NODE (ip6_reass_expire_node) = {
.function = ip6_reass_walk_expired,
.format_trace = format_ip6_reass_trace,
.type = VLIB_NODE_TYPE_PROCESS,
diff --git a/src/vnet/ipsec/ipsec_input.c b/src/vnet/ipsec/ipsec_input.c
index 47220dbb095..9fdbff5787f 100644
--- a/src/vnet/ipsec/ipsec_input.c
+++ b/src/vnet/ipsec/ipsec_input.c
@@ -162,7 +162,7 @@ ipsec6_input_protect_policy_match (ipsec_spd_t * spd,
return 0;
}
-static vlib_node_registration_t ipsec4_input_node;
+extern vlib_node_registration_t ipsec4_input_node;
VLIB_NODE_FN (ipsec4_input_node) (vlib_main_t * vm,
vlib_node_runtime_t * node,
@@ -351,7 +351,7 @@ VLIB_NODE_FN (ipsec4_input_node) (vlib_main_t * vm,
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (ipsec4_input_node,static) = {
+VLIB_REGISTER_NODE (ipsec4_input_node) = {
.name = "ipsec4-input-feature",
.vector_size = sizeof (u32),
.format_trace = format_ipsec_input_trace,
@@ -367,7 +367,7 @@ VLIB_REGISTER_NODE (ipsec4_input_node,static) = {
};
/* *INDENT-ON* */
-static vlib_node_registration_t ipsec6_input_node;
+extern vlib_node_registration_t ipsec6_input_node;
VLIB_NODE_FN (ipsec6_input_node) (vlib_main_t * vm,
@@ -523,7 +523,7 @@ VLIB_NODE_FN (ipsec6_input_node) (vlib_main_t * vm,
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (ipsec6_input_node,static) = {
+VLIB_REGISTER_NODE (ipsec6_input_node) = {
.name = "ipsec6-input-feature",
.vector_size = sizeof (u32),
.format_trace = format_ipsec_input_trace,
diff --git a/src/vnet/l2/l2_fwd.c b/src/vnet/l2/l2_fwd.c
index dfc1a74a38c..93e69db31e9 100644
--- a/src/vnet/l2/l2_fwd.c
+++ b/src/vnet/l2/l2_fwd.c
@@ -92,7 +92,7 @@ l2fwd_main_t l2fwd_main;
extern l2fwd_main_t l2fwd_main;
#endif
-static vlib_node_registration_t l2fwd_node;
+extern vlib_node_registration_t l2fwd_node;
#define foreach_l2fwd_error \
_(L2FWD, "L2 forward packets") \
@@ -412,7 +412,7 @@ VLIB_NODE_FN (l2fwd_node) (vlib_main_t * vm,
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (l2fwd_node,static) = {
+VLIB_REGISTER_NODE (l2fwd_node) = {
.name = "l2-fwd",
.vector_size = sizeof (u32),
.format_trace = format_l2fwd_trace,
diff --git a/src/vnet/l2/l2_learn.c b/src/vnet/l2/l2_learn.c
index e47365751c7..db76f806046 100644
--- a/src/vnet/l2/l2_learn.c
+++ b/src/vnet/l2/l2_learn.c
@@ -74,7 +74,7 @@ format_l2learn_trace (u8 * s, va_list * args)
return s;
}
-static vlib_node_registration_t l2learn_node;
+extern vlib_node_registration_t l2learn_node;
#define foreach_l2learn_error \
_(L2LEARN, "L2 learn packets") \
@@ -427,7 +427,7 @@ VLIB_NODE_FN (l2learn_node) (vlib_main_t * vm,
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (l2learn_node,static) = {
+VLIB_REGISTER_NODE (l2learn_node) = {
.name = "l2-learn",
.vector_size = sizeof (u32),
.format_trace = format_l2learn_trace,
diff --git a/src/vnet/l2/l2_patch.c b/src/vnet/l2/l2_patch.c
index 54286c23d72..6109228b0b5 100644
--- a/src/vnet/l2/l2_patch.c
+++ b/src/vnet/l2/l2_patch.c
@@ -51,7 +51,7 @@ format_l2_patch_trace (u8 * s, va_list * args)
static l2_patch_main_t l2_patch_main;
-static vlib_node_registration_t l2_patch_node;
+extern vlib_node_registration_t l2_patch_node;
#define foreach_l2_patch_error \
_(PATCHED, "L2 patch packets") \
@@ -204,7 +204,7 @@ VLIB_NODE_FN (l2_patch_node) (vlib_main_t * vm,
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (l2_patch_node, static) = {
+VLIB_REGISTER_NODE (l2_patch_node) = {
.name = "l2-patch",
.vector_size = sizeof (u32),
.format_trace = format_l2_patch_trace,
diff --git a/src/vnet/tcp/tcp_syn_filter4.c b/src/vnet/tcp/tcp_syn_filter4.c
index ffcd596b39b..d151eb77c3c 100644
--- a/src/vnet/tcp/tcp_syn_filter4.c
+++ b/src/vnet/tcp/tcp_syn_filter4.c
@@ -52,7 +52,7 @@ format_syn_filter4_trace (u8 * s, va_list * args)
return s;
}
-static vlib_node_registration_t syn_filter4_node;
+extern vlib_node_registration_t syn_filter4_node;
#define foreach_syn_filter_error \
_(THROTTLED, "TCP SYN packet throttle drops") \
@@ -400,7 +400,7 @@ VLIB_NODE_FN (syn_filter4_node) (vlib_main_t * vm,
}
/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (syn_filter4_node, static) =
+VLIB_REGISTER_NODE (syn_filter4_node) =
{
.name = "syn-filter-4",
.vector_size = sizeof (u32),