summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-03-09 16:28:15 +0100
committerDamjan Marion <damarion@cisco.com>2021-03-10 10:45:00 +0100
commitf91098e49cd9ea65cfecabf3832cbb88316c4429 (patch)
treea2f46aa082774e247486f5d8e950a58fb45f01fe /src/vnet/interface.h
parent4e4864112af5af148e929c2934ecf3d6b8a00946 (diff)
interface: fix interface-output and interface-tx multiarch selection
Type: fix Change-Id: I77723dcbf753c2a7f1ec00f034d8ab604f12214b Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/interface.h')
-rw-r--r--src/vnet/interface.h40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/vnet/interface.h b/src/vnet/interface.h
index 6b22bc327df..83abea4593e 100644
--- a/src/vnet/interface.h
+++ b/src/vnet/interface.h
@@ -313,23 +313,25 @@ __VA_ARGS__ vnet_device_class_t x
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->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->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)
/**
* Link Type: A description of the protocol of packets on the link.
@@ -961,8 +963,6 @@ void vnet_pcap_drop_trace_filter_add_del (u32 error_index, int is_add);
int vnet_interface_name_renumber (u32 sw_if_index, u32 new_show_dev_instance);
-vlib_node_function_t *vnet_interface_output_node_get (void);
-
void vnet_register_format_buffer_opaque_helper
(vnet_buffer_opquae_formatter_t fn);
@@ -987,6 +987,8 @@ typedef struct
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 */
/*