static __clib_unused vnet_device_class_t __clib_unused_##x
#endif
-#define VNET_DEVICE_CLASS_TX_FN(devclass) \
-uword CLIB_MARCH_SFX (devclass##_tx_fn)(); \
-static vlib_node_fn_registration_t \
- CLIB_MARCH_SFX(devclass##_tx_fn_registration) = \
- { .function = &CLIB_MARCH_SFX (devclass##_tx_fn), }; \
- \
-static void __clib_constructor \
-CLIB_MARCH_SFX (devclass##_tx_fn_multiarch_register) (void) \
-{ \
- extern vnet_device_class_t devclass; \
- vlib_node_fn_registration_t *r; \
- r = &CLIB_MARCH_SFX (devclass##_tx_fn_registration); \
- r->priority = CLIB_MARCH_FN_PRIORITY(); \
- r->name = CLIB_MARCH_VARIANT_STR; \
- r->next_registration = devclass.tx_fn_registrations; \
- devclass.tx_fn_registrations = r; \
-} \
-uword CLIB_CPU_OPTIMIZED CLIB_MARCH_SFX (devclass##_tx_fn)
+#define VNET_DEVICE_CLASS_TX_FN(devclass) \
+ uword CLIB_MARCH_SFX (devclass##_tx_fn) (); \
+ static vlib_node_fn_registration_t CLIB_MARCH_SFX ( \
+ devclass##_tx_fn_registration) = { \
+ .function = &CLIB_MARCH_SFX (devclass##_tx_fn), \
+ }; \
+ \
+ static void __clib_constructor CLIB_MARCH_SFX ( \
+ devclass##_tx_fn_multiarch_register) (void) \
+ { \
+ extern vnet_device_class_t devclass; \
+ vlib_node_fn_registration_t *r; \
+ r = &CLIB_MARCH_SFX (devclass##_tx_fn_registration); \
+ r->march_variant = CLIB_MARCH_SFX (CLIB_MARCH_VARIANT_TYPE); \
+ r->next_registration = devclass.tx_fn_registrations; \
+ devclass.tx_fn_registrations = r; \
+ } \
+ uword CLIB_CPU_OPTIMIZED CLIB_MARCH_SFX (devclass##_tx_fn)
/**
* Link Type: A description of the protocol of packets on the link.
_link <= VNET_LINK_NSH; \
_link++)
+#define FOR_EACH_VNET_IP_LINK(_link) \
+ for (_link = VNET_LINK_IP4; \
+ _link <= VNET_LINK_IP6; \
+ _link++)
+
/**
- * @brief Number of link types. Not part of the enum so it does not have to be included in
- * switch statements
+ * @brief Number of link types. Not part of the enum so it does not have to be
+ * included in switch statements
*/
#define VNET_LINK_NUM (VNET_LINK_NSH+1)
+#define VNET_N_LINKS VNET_LINK_NUM
/**
* @brief Convert a link to to an Ethertype
int vnet_interface_name_renumber (u32 sw_if_index, u32 new_show_dev_instance);
-vlib_node_function_t *vnet_interface_output_node_get (vlib_main_t * vm);
-
void vnet_register_format_buffer_opaque_helper
(vnet_buffer_opquae_formatter_t fn);
int vnet_pcap_dispatch_trace_configure (vnet_pcap_dispatch_trace_args_t *);
+extern vlib_node_registration_t vnet_interface_output_node;
+
#endif /* included_vnet_interface_h */
/*