From f91098e49cd9ea65cfecabf3832cbb88316c4429 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Tue, 9 Mar 2021 16:28:15 +0100 Subject: interface: fix interface-output and interface-tx multiarch selection Type: fix Change-Id: I77723dcbf753c2a7f1ec00f034d8ab604f12214b Signed-off-by: Damjan Marion --- src/vnet/interface.h | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'src/vnet/interface.h') 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 */ /* -- cgit 1.2.3-korg