vnet_config_main_t *cm;
u32 hw_index, i;
char *tx_node_name = NULL, *output_node_name = NULL;
+ vlib_node_function_t *output_node = vnet_interface_output_node_get ();
pool_get (im->hw_interfaces, hw);
clib_memset (hw, 0, sizeof (*hw));
/* The new class may differ from the old one.
* Functions have to be updated. */
node = vlib_get_node (vm, hw->output_node_index);
- node->function = vnet_interface_output_node;
+ node->function = output_node;
node->format_trace = format_vnet_interface_output_trace;
/* *INDENT-OFF* */
foreach_vlib_main ({
r.flags = 0;
r.name = output_node_name;
- r.function = vnet_interface_output_node;
+ r.function = output_node;
r.format_trace = format_vnet_interface_output_trace;
{
int vnet_interface_name_renumber (u32 sw_if_index, u32 new_show_dev_instance);
-uword vnet_interface_output_node (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * frame);
+vlib_node_function_t *vnet_interface_output_node_get (void);
void vnet_register_format_buffer_opaque_helper
(vnet_buffer_opquae_formatter_t fn);
}
return s;
}
+#endif /* CLIB_MARCH_VARIANT */
static void
vnet_interface_output_trace (vlib_main_t * vm,
rt->sw_if_index, n_packets, n_bytes);
return n_buffers;
}
-#endif /* CLIB_MARCH_VARIANT */
static_always_inline void vnet_interface_pcap_tx_trace
(vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame,
}
}
-#ifndef CLIB_MARCH_VARIANT
+static vlib_node_function_t CLIB_MULTIARCH_FN (vnet_interface_output_node);
-uword
-vnet_interface_output_node (vlib_main_t * vm, vlib_node_runtime_t * node,
- vlib_frame_t * frame)
+static uword
+CLIB_MULTIARCH_FN (vnet_interface_output_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
vnet_main_t *vnm = vnet_get_main ();
vnet_hw_interface_t *hi;
return vnet_interface_output_node_inline (vm, node, frame, vnm, hi,
/* do_tx_offloads */ 1);
}
+
+CLIB_MARCH_FN_REGISTRATION (vnet_interface_output_node);
+
+#ifndef CLIB_MARCH_VARIANT
+vlib_node_function_t *
+vnet_interface_output_node_get (void)
+{
+ return CLIB_MARCH_FN_POINTER (vnet_interface_output_node);
+}
#endif /* CLIB_MARCH_VARIANT */
/* Use buffer's sw_if_index[VNET_TX] to choose output interface. */