summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_output.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-11-09 15:23:52 +0100
committerDamjan Marion <dmarion@me.com>2020-11-13 11:46:41 +0000
commit7d2094c12b01ac1f902755157361bd0eb547abac (patch)
treedd4273728be71effa6c6857a6203e25682a3a05b /src/vnet/interface_output.c
parent6807b77f24cf95e432ccdffef07d81d4a989beb9 (diff)
interface: add multiarch support for per-interface tx node
Type: improvement Change-Id: Ia4ce47c0f727cf7b02294f05b94f14e788f52f30 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/interface_output.c')
-rw-r--r--src/vnet/interface_output.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c
index 65bc4a4b7ec..3363f76b722 100644
--- a/src/vnet/interface_output.c
+++ b/src/vnet/interface_output.c
@@ -91,6 +91,7 @@ format_vnet_interface_output_trace (u8 * s, va_list * va)
}
return s;
}
+#endif /* CLIB_MARCH_VARIANT */
static void
vnet_interface_output_trace (vlib_main_t * vm,
@@ -427,7 +428,6 @@ vnet_interface_output_node_inline (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,
@@ -486,11 +486,12 @@ static_always_inline void vnet_interface_pcap_tx_trace
}
}
-#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;
@@ -507,6 +508,15 @@ vnet_interface_output_node (vlib_main_t * vm, vlib_node_runtime_t * node,
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. */