ethernet: add sanity checks to p2p_ethernet_add/del
[vpp.git] / src / vlib / node.h
index 40d0165..b9961f5 100644 (file)
@@ -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
 
@@ -217,6 +218,8 @@ CLIB_MARCH_SFX (node##_multiarch_register) (void)                   \
 }                                                                      \
 uword CLIB_CPU_OPTIMIZED CLIB_MARCH_SFX (node##_fn)
 
+unformat_function_t unformat_vlib_node_variant;
+
 always_inline vlib_node_registration_t *
 vlib_node_next_registered (vlib_node_registration_t * c)
 {
@@ -302,6 +305,7 @@ typedef struct vlib_node_t
 
 #define VLIB_NODE_FLAG_SWITCH_FROM_INTERRUPT_TO_POLLING_MODE (1 << 6)
 #define VLIB_NODE_FLAG_SWITCH_FROM_POLLING_TO_INTERRUPT_MODE (1 << 7)
+#define VLIB_NODE_FLAG_TRACE_SUPPORTED (1 << 8)
 
   /* State for input nodes. */
   u8 state;