summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2018-07-23 14:45:57 +0200
committerDamjan Marion <dmarion@me.com>2018-08-11 15:01:42 +0000
commitdd8e7d0e512425ec05de652a3c71028561e0f40a (patch)
tree849eaaabe4c2a07a0bd9cf8173e6cfbac31ffdf5 /src/plugins/dpdk/device
parent7f1f7e7865f07f98b5ab6d4ab483cd9a51e4ce4e (diff)
Multiversioning: Device (tx) function constructor
Change-Id: I39f87ca161c891fb22462a23188982fef7c3243f Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r--src/plugins/dpdk/device/device.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c
index d5ab2585c93..8776e09ed05 100644
--- a/src/plugins/dpdk/device/device.c
+++ b/src/plugins/dpdk/device/device.c
@@ -327,10 +327,9 @@ dpdk_buffer_tx_offload (dpdk_device_t * xd, vlib_buffer_t * b,
* node. It first copies packets on the frame to a per-thread arrays
* containing the rte_mbuf pointers.
*/
-uword
-CLIB_MULTIARCH_FN (dpdk_interface_tx) (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * f)
+VNET_DEVICE_CLASS_TX_FN (dpdk_device_class) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * f)
{
dpdk_main_t *dm = &dpdk_main;
vnet_interface_output_runtime_t *rd = (void *) node->runtime_data;
@@ -663,7 +662,6 @@ done:
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (dpdk_device_class) = {
.name = "dpdk",
- .tx_function = dpdk_interface_tx,
.tx_function_n_errors = DPDK_TX_FUNC_N_ERROR,
.tx_function_error_strings = dpdk_tx_func_error_strings,
.format_device_name = format_dpdk_device_name,
@@ -679,18 +677,6 @@ VNET_DEVICE_CLASS (dpdk_device_class) = {
};
/* *INDENT-ON* */
-#if __x86_64__
-vlib_node_function_t __clib_weak dpdk_interface_tx_avx512;
-vlib_node_function_t __clib_weak dpdk_interface_tx_avx2;
-static void __clib_constructor
-dpdk_interface_tx_multiarch_select (void)
-{
- if (dpdk_interface_tx_avx512 && clib_cpu_supports_avx512f ())
- dpdk_device_class.tx_function = dpdk_interface_tx_avx512;
- else if (dpdk_interface_tx_avx2 && clib_cpu_supports_avx2 ())
- dpdk_device_class.tx_function = dpdk_interface_tx_avx2;
-}
-#endif
#endif
#define UP_DOWN_FLAG_EVENT 1