summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/acl.am10
-rw-r--r--src/plugins/acl/dataplane_node.c142
-rw-r--r--src/plugins/avf.am10
-rw-r--r--src/plugins/avf/input.c20
-rw-r--r--src/plugins/avf/output.c2
-rw-r--r--src/plugins/dpdk.am10
-rw-r--r--src/plugins/dpdk/buffer.c4
-rw-r--r--src/plugins/dpdk/device/device.c6
-rw-r--r--src/plugins/dpdk/device/node.c22
-rw-r--r--src/plugins/memif.am10
-rw-r--r--src/plugins/memif/device.c4
-rw-r--r--src/plugins/memif/node.c25
12 files changed, 63 insertions, 202 deletions
diff --git a/src/plugins/acl.am b/src/plugins/acl.am
index 7d723402615..8508a1dc025 100644
--- a/src/plugins/acl.am
+++ b/src/plugins/acl.am
@@ -34,7 +34,7 @@ acl_plugin_la_SOURCES = \
API_FILES += acl/acl.api
if CPU_X86_64
-acl_multiversioning_files = \
+acl_multiversioning_sources = \
acl/dataplane_node.c
@@ -42,10 +42,10 @@ if CC_SUPPORTS_AVX2
###############################################################
# AVX2
###############################################################
-libacl_plugin_avx2_la_SOURCES = $(acl_multiversioning_files)
+libacl_plugin_avx2_la_SOURCES = $(acl_multiversioning_sources)
libacl_plugin_avx2_la_CFLAGS = \
$(AM_CFLAGS) @CPU_AVX2_FLAGS@ \
- -DCLIB_MULTIARCH_VARIANT=avx2
+ -DCLIB_MARCH_VARIANT=avx2
noinst_LTLIBRARIES += libacl_plugin_avx2.la
acl_plugin_la_LIBADD += libacl_plugin_avx2.la
endif
@@ -54,10 +54,10 @@ if CC_SUPPORTS_AVX512
###############################################################
# AVX512
###############################################################
-libacl_plugin_avx512_la_SOURCES = $(acl_multiversioning_files)
+libacl_plugin_avx512_la_SOURCES = $(acl_multiversioning_sources)
libacl_plugin_avx512_la_CFLAGS = \
$(AM_CFLAGS) @CPU_AVX512_FLAGS@ \
- -DCLIB_MULTIARCH_VARIANT=avx512
+ -DCLIB_MARCH_VARIANT=avx512
noinst_LTLIBRARIES += libacl_plugin_avx512.la
acl_plugin_la_LIBADD += libacl_plugin_avx512.la
endif
diff --git a/src/plugins/acl/dataplane_node.c b/src/plugins/acl/dataplane_node.c
index 5393091f26f..351cbbd8fb2 100644
--- a/src/plugins/acl/dataplane_node.c
+++ b/src/plugins/acl/dataplane_node.c
@@ -327,36 +327,10 @@ acl_fa_node_fn (vlib_main_t * vm,
return frame->n_vectors;
}
-vlib_node_function_t __clib_weak acl_in_ip4_l2_node_fn_avx512;
-vlib_node_function_t __clib_weak acl_in_ip4_l2_node_fn_avx2;
-
-vlib_node_function_t __clib_weak acl_out_ip4_l2_node_fn_avx512;
-vlib_node_function_t __clib_weak acl_out_ip4_l2_node_fn_avx2;
-
-vlib_node_function_t __clib_weak acl_in_ip6_l2_node_fn_avx512;
-vlib_node_function_t __clib_weak acl_in_ip6_l2_node_fn_avx2;
-
-vlib_node_function_t __clib_weak acl_out_ip6_l2_node_fn_avx512;
-vlib_node_function_t __clib_weak acl_out_ip6_l2_node_fn_avx2;
-
-vlib_node_function_t __clib_weak acl_in_ip4_fa_node_fn_avx512;
-vlib_node_function_t __clib_weak acl_in_ip4_fa_node_fn_avx2;
-
-vlib_node_function_t __clib_weak acl_out_ip4_fa_node_fn_avx512;
-vlib_node_function_t __clib_weak acl_out_ip4_fa_node_fn_avx2;
-
-vlib_node_function_t __clib_weak acl_in_ip6_fa_node_fn_avx512;
-vlib_node_function_t __clib_weak acl_in_ip6_fa_node_fn_avx2;
-
-vlib_node_function_t __clib_weak acl_out_ip6_fa_node_fn_avx512;
-vlib_node_function_t __clib_weak acl_out_ip6_fa_node_fn_avx2;
-
-
vlib_node_registration_t acl_in_l2_ip6_node;
-uword CLIB_CPU_OPTIMIZED
-CLIB_MULTIARCH_FN (acl_in_ip6_l2_node_fn) (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * frame)
+VLIB_NODE_FN (acl_in_l2_ip6_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
acl_main_t *am = &acl_main;
return acl_fa_node_fn (vm, node, frame, 1, 1, 1,
@@ -365,10 +339,9 @@ CLIB_MULTIARCH_FN (acl_in_ip6_l2_node_fn) (vlib_main_t * vm,
}
vlib_node_registration_t acl_in_l2_ip4_node;
-uword CLIB_CPU_OPTIMIZED
-CLIB_MULTIARCH_FN (acl_in_ip4_l2_node_fn) (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * frame)
+VLIB_NODE_FN (acl_in_l2_ip4_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
acl_main_t *am = &acl_main;
return acl_fa_node_fn (vm, node, frame, 0, 1, 1,
@@ -377,10 +350,9 @@ CLIB_MULTIARCH_FN (acl_in_ip4_l2_node_fn) (vlib_main_t * vm,
}
vlib_node_registration_t acl_out_l2_ip6_node;
-uword CLIB_CPU_OPTIMIZED
-CLIB_MULTIARCH_FN (acl_out_ip6_l2_node_fn) (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * frame)
+VLIB_NODE_FN (acl_out_l2_ip6_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
acl_main_t *am = &acl_main;
return acl_fa_node_fn (vm, node, frame, 1, 0, 1,
@@ -389,10 +361,9 @@ CLIB_MULTIARCH_FN (acl_out_ip6_l2_node_fn) (vlib_main_t * vm,
}
vlib_node_registration_t acl_out_l2_ip4_node;
-uword CLIB_CPU_OPTIMIZED
-CLIB_MULTIARCH_FN (acl_out_ip4_l2_node_fn) (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * frame)
+VLIB_NODE_FN (acl_out_l2_ip4_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
acl_main_t *am = &acl_main;
return acl_fa_node_fn (vm, node, frame, 0, 0, 1,
@@ -403,93 +374,38 @@ CLIB_MULTIARCH_FN (acl_out_ip4_l2_node_fn) (vlib_main_t * vm,
/**** L3 processing path nodes ****/
vlib_node_registration_t acl_in_fa_ip6_node;
-uword CLIB_CPU_OPTIMIZED
-CLIB_MULTIARCH_FN (acl_in_ip6_fa_node_fn) (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * frame)
+VLIB_NODE_FN (acl_in_fa_ip6_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
return acl_fa_node_fn (vm, node, frame, 1, 1, 0, 0, &acl_in_fa_ip6_node);
}
vlib_node_registration_t acl_in_fa_ip4_node;
-uword CLIB_CPU_OPTIMIZED
-CLIB_MULTIARCH_FN (acl_in_ip4_fa_node_fn) (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * frame)
+VLIB_NODE_FN (acl_in_fa_ip4_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
return acl_fa_node_fn (vm, node, frame, 0, 1, 0, 0, &acl_in_fa_ip4_node);
}
vlib_node_registration_t acl_out_fa_ip6_node;
-uword CLIB_CPU_OPTIMIZED
-CLIB_MULTIARCH_FN (acl_out_ip6_fa_node_fn) (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * frame)
+VLIB_NODE_FN (acl_out_fa_ip6_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
return acl_fa_node_fn (vm, node, frame, 1, 0, 0, 0, &acl_out_fa_ip6_node);
}
vlib_node_registration_t acl_out_fa_ip4_node;
-uword CLIB_CPU_OPTIMIZED
-CLIB_MULTIARCH_FN (acl_out_ip4_fa_node_fn) (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * frame)
+VLIB_NODE_FN (acl_out_fa_ip4_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
return acl_fa_node_fn (vm, node, frame, 0, 0, 0, 0, &acl_out_fa_ip4_node);
}
-
-
-#if __x86_64__
-static void __clib_constructor
-acl_plugin_multiarch_select (void)
-{
- if (acl_in_ip4_l2_node_fn_avx512 && clib_cpu_supports_avx512f ())
- acl_in_l2_ip4_node.function = acl_in_ip4_l2_node_fn_avx512;
- else if (acl_in_ip4_l2_node_fn_avx2 && clib_cpu_supports_avx2 ())
- acl_in_l2_ip4_node.function = acl_in_ip4_l2_node_fn_avx2;
-
- if (acl_out_ip4_l2_node_fn_avx512 && clib_cpu_supports_avx512f ())
- acl_out_l2_ip4_node.function = acl_out_ip4_l2_node_fn_avx512;
- else if (acl_out_ip4_l2_node_fn_avx2 && clib_cpu_supports_avx2 ())
- acl_out_l2_ip4_node.function = acl_out_ip4_l2_node_fn_avx2;
-
- if (acl_in_ip6_l2_node_fn_avx512 && clib_cpu_supports_avx512f ())
- acl_in_l2_ip6_node.function = acl_in_ip6_l2_node_fn_avx512;
- else if (acl_in_ip6_l2_node_fn_avx2 && clib_cpu_supports_avx2 ())
- acl_in_l2_ip6_node.function = acl_in_ip6_l2_node_fn_avx2;
-
- if (acl_out_ip6_l2_node_fn_avx512 && clib_cpu_supports_avx512f ())
- acl_out_l2_ip6_node.function = acl_out_ip6_l2_node_fn_avx512;
- else if (acl_out_ip6_l2_node_fn_avx2 && clib_cpu_supports_avx2 ())
- acl_out_l2_ip6_node.function = acl_out_ip6_l2_node_fn_avx2;
-
- if (acl_in_ip4_fa_node_fn_avx512 && clib_cpu_supports_avx512f ())
- acl_in_fa_ip4_node.function = acl_in_ip4_fa_node_fn_avx512;
- else if (acl_in_ip4_fa_node_fn_avx2 && clib_cpu_supports_avx2 ())
- acl_in_fa_ip4_node.function = acl_in_ip4_fa_node_fn_avx2;
-
- if (acl_out_ip4_fa_node_fn_avx512 && clib_cpu_supports_avx512f ())
- acl_out_fa_ip4_node.function = acl_out_ip4_fa_node_fn_avx512;
- else if (acl_out_ip4_fa_node_fn_avx2 && clib_cpu_supports_avx2 ())
- acl_out_fa_ip4_node.function = acl_out_ip4_fa_node_fn_avx2;
-
- if (acl_in_ip6_fa_node_fn_avx512 && clib_cpu_supports_avx512f ())
- acl_in_fa_ip6_node.function = acl_in_ip6_fa_node_fn_avx512;
- else if (acl_in_ip6_fa_node_fn_avx2 && clib_cpu_supports_avx2 ())
- acl_in_fa_ip6_node.function = acl_in_ip6_fa_node_fn_avx2;
-
- if (acl_out_ip6_fa_node_fn_avx512 && clib_cpu_supports_avx512f ())
- acl_out_fa_ip6_node.function = acl_out_ip6_fa_node_fn_avx512;
- else if (acl_out_ip6_fa_node_fn_avx2 && clib_cpu_supports_avx2 ())
- acl_out_fa_ip6_node.function = acl_out_ip6_fa_node_fn_avx2;
-
-}
-#endif
-
-
-
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
static u8 *
format_fa_5tuple (u8 * s, va_list * args)
{
@@ -549,7 +465,6 @@ static char *acl_fa_error_strings[] = {
VLIB_REGISTER_NODE (acl_in_l2_ip6_node) =
{
- .function = acl_in_ip6_l2_node_fn,
.name = "acl-plugin-in-ip6-l2",
.vector_size = sizeof (u32),
.format_trace = format_acl_plugin_trace,
@@ -565,7 +480,6 @@ VLIB_REGISTER_NODE (acl_in_l2_ip6_node) =
VLIB_REGISTER_NODE (acl_in_l2_ip4_node) =
{
- .function = acl_in_ip4_l2_node_fn,
.name = "acl-plugin-in-ip4-l2",
.vector_size = sizeof (u32),
.format_trace = format_acl_plugin_trace,
@@ -581,7 +495,6 @@ VLIB_REGISTER_NODE (acl_in_l2_ip4_node) =
VLIB_REGISTER_NODE (acl_out_l2_ip6_node) =
{
- .function = acl_out_ip6_l2_node_fn,
.name = "acl-plugin-out-ip6-l2",
.vector_size = sizeof (u32),
.format_trace = format_acl_plugin_trace,
@@ -597,7 +510,6 @@ VLIB_REGISTER_NODE (acl_out_l2_ip6_node) =
VLIB_REGISTER_NODE (acl_out_l2_ip4_node) =
{
- .function = acl_out_ip4_l2_node_fn,
.name = "acl-plugin-out-ip4-l2",
.vector_size = sizeof (u32),
.format_trace = format_acl_plugin_trace,
@@ -614,7 +526,6 @@ VLIB_REGISTER_NODE (acl_out_l2_ip4_node) =
VLIB_REGISTER_NODE (acl_in_fa_ip6_node) =
{
- .function = acl_in_ip6_fa_node_fn,
.name = "acl-plugin-in-ip6-fa",
.vector_size = sizeof (u32),
.format_trace = format_acl_plugin_trace,
@@ -637,7 +548,6 @@ VNET_FEATURE_INIT (acl_in_ip6_fa_feature, static) =
VLIB_REGISTER_NODE (acl_in_fa_ip4_node) =
{
- .function = acl_in_ip4_fa_node_fn,
.name = "acl-plugin-in-ip4-fa",
.vector_size = sizeof (u32),
.format_trace = format_acl_plugin_trace,
@@ -661,7 +571,6 @@ VNET_FEATURE_INIT (acl_in_ip4_fa_feature, static) =
VLIB_REGISTER_NODE (acl_out_fa_ip6_node) =
{
- .function = acl_out_ip6_fa_node_fn,
.name = "acl-plugin-out-ip6-fa",
.vector_size = sizeof (u32),
.format_trace = format_acl_plugin_trace,
@@ -684,7 +593,6 @@ VNET_FEATURE_INIT (acl_out_ip6_fa_feature, static) =
VLIB_REGISTER_NODE (acl_out_fa_ip4_node) =
{
- .function = acl_out_ip4_fa_node_fn,
.name = "acl-plugin-out-ip4-fa",
.vector_size = sizeof (u32),
.format_trace = format_acl_plugin_trace,
diff --git a/src/plugins/avf.am b/src/plugins/avf.am
index 76231a16bcb..1c7885fdc44 100644
--- a/src/plugins/avf.am
+++ b/src/plugins/avf.am
@@ -25,7 +25,7 @@ avf_plugin_la_SOURCES = \
noinst_HEADERS += avf/avf.h
if CPU_X86_64
-avf_multiversioning_files = \
+avf_multiversioning_sources = \
avf/input.c \
avf/output.c
@@ -33,10 +33,10 @@ if CC_SUPPORTS_AVX2
###############################################################
# AVX2
###############################################################
-libavf_plugin_avx2_la_SOURCES = $(avf_multiversioning_files)
+libavf_plugin_avx2_la_SOURCES = $(avf_multiversioning_sources)
libavf_plugin_avx2_la_CFLAGS = \
$(AM_CFLAGS) @CPU_AVX2_FLAGS@ \
- -DCLIB_MULTIARCH_VARIANT=avx2
+ -DCLIB_MARCH_VARIANT=avx2
noinst_LTLIBRARIES += libavf_plugin_avx2.la
avf_plugin_la_LIBADD += libavf_plugin_avx2.la
endif
@@ -45,10 +45,10 @@ if CC_SUPPORTS_AVX512
###############################################################
# AVX512
###############################################################
-libavf_plugin_avx512_la_SOURCES = $(avf_multiversioning_files)
+libavf_plugin_avx512_la_SOURCES = $(avf_multiversioning_sources)
libavf_plugin_avx512_la_CFLAGS = \
$(AM_CFLAGS) @CPU_AVX512_FLAGS@ \
- -DCLIB_MULTIARCH_VARIANT=avx512
+ -DCLIB_MARCH_VARIANT=avx512
noinst_LTLIBRARIES += libavf_plugin_avx512.la
avf_plugin_la_LIBADD += libavf_plugin_avx512.la
endif
diff --git a/src/plugins/avf/input.c b/src/plugins/avf/input.c
index 931bfa39de9..5b7f48a3ed7 100644
--- a/src/plugins/avf/input.c
+++ b/src/plugins/avf/input.c
@@ -375,8 +375,7 @@ avf_device_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
return n_rx_packets;
}
-uword
-CLIB_MULTIARCH_FN (avf_input) (vlib_main_t * vm, vlib_node_runtime_t * node,
+VLIB_NODE_FN (avf_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * frame)
{
u32 n_rx = 0;
@@ -399,10 +398,9 @@ CLIB_MULTIARCH_FN (avf_input) (vlib_main_t * vm, vlib_node_runtime_t * node,
return n_rx;
}
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (avf_input_node) = {
- .function = avf_input,
.name = "avf-input",
.sibling_of = "device-input",
.format_trace = format_avf_input_trace,
@@ -411,20 +409,6 @@ VLIB_REGISTER_NODE (avf_input_node) = {
.n_errors = AVF_INPUT_N_ERROR,
.error_strings = avf_input_error_strings,
};
-
-#if __x86_64__
-vlib_node_function_t __clib_weak avf_input_avx512;
-vlib_node_function_t __clib_weak avf_input_avx2;
-static void __clib_constructor
-avf_input_multiarch_select (void)
-{
- if (avf_input_avx512 && clib_cpu_supports_avx512f ())
- avf_input_node.function = avf_input_avx512;
- else if (avf_input_avx2 && clib_cpu_supports_avx2 ())
- avf_input_node.function = avf_input_avx2;
-}
-
-#endif
#endif
/* *INDENT-ON* */
diff --git a/src/plugins/avf/output.c b/src/plugins/avf/output.c
index 8e5fa6a43f8..ec4d7f6c0a2 100644
--- a/src/plugins/avf/output.c
+++ b/src/plugins/avf/output.c
@@ -159,7 +159,7 @@ CLIB_MULTIARCH_FN (avf_interface_tx) (vlib_main_t * vm,
return frame->n_vectors - n_left;
}
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
#if __x86_64__
vlib_node_function_t __clib_weak avf_interface_tx_avx512;
vlib_node_function_t __clib_weak avf_interface_tx_avx2;
diff --git a/src/plugins/dpdk.am b/src/plugins/dpdk.am
index af7d96d7c17..6c15d0abd8e 100644
--- a/src/plugins/dpdk.am
+++ b/src/plugins/dpdk.am
@@ -57,7 +57,7 @@ dpdk_plugin_la_SOURCES = \
API_FILES += dpdk/api/dpdk.api
if CPU_X86_64
-dpdk_multiversioning_files = \
+dpdk_multiversioning_sources = \
dpdk/buffer.c \
dpdk/device/node.c \
dpdk/device/device.c
@@ -66,10 +66,10 @@ if CC_SUPPORTS_AVX2
###############################################################
# AVX2
###############################################################
-libdpdk_plugin_avx2_la_SOURCES = $(dpdk_multiversioning_files)
+libdpdk_plugin_avx2_la_SOURCES = $(dpdk_multiversioning_sources)
libdpdk_plugin_avx2_la_CFLAGS = \
$(AM_CFLAGS) @CPU_AVX2_FLAGS@ \
- -DCLIB_MULTIARCH_VARIANT=avx2
+ -DCLIB_MARCH_VARIANT=avx2
noinst_LTLIBRARIES += libdpdk_plugin_avx2.la
dpdk_plugin_la_LIBADD += libdpdk_plugin_avx2.la
endif
@@ -78,10 +78,10 @@ if CC_SUPPORTS_AVX512
###############################################################
# AVX512
###############################################################
-libdpdk_plugin_avx512_la_SOURCES = $(dpdk_multiversioning_files)
+libdpdk_plugin_avx512_la_SOURCES = $(dpdk_multiversioning_sources)
libdpdk_plugin_avx512_la_CFLAGS = \
$(AM_CFLAGS) @CPU_AVX512_FLAGS@ \
- -DCLIB_MULTIARCH_VARIANT=avx512
+ -DCLIB_MARCH_VARIANT=avx512
noinst_LTLIBRARIES += libdpdk_plugin_avx512.la
dpdk_plugin_la_LIBADD += libdpdk_plugin_avx512.la
endif
diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c
index 452c47931ca..3324c049511 100644
--- a/src/plugins/dpdk/buffer.c
+++ b/src/plugins/dpdk/buffer.c
@@ -146,7 +146,7 @@ next:
}
}
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
static void
del_free_list (vlib_main_t * vm, vlib_buffer_free_list_t * f)
{
@@ -436,7 +436,7 @@ CLIB_MULTIARCH_FN (dpdk_buffer_free_no_next) (vlib_main_t * vm, u32 * buffers,
0);
}
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
static void
dpdk_packet_template_init (vlib_main_t * vm,
void *vt,
diff --git a/src/plugins/dpdk/device/device.c b/src/plugins/dpdk/device/device.c
index 5409fe4f50e..fe659fbeaf1 100644
--- a/src/plugins/dpdk/device/device.c
+++ b/src/plugins/dpdk/device/device.c
@@ -37,7 +37,7 @@ typedef enum
DPDK_TX_FUNC_N_ERROR,
} dpdk_tx_func_error_t;
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
static char *dpdk_tx_func_error_strings[] = {
#define _(n,s) s,
foreach_dpdk_tx_func_error
@@ -517,7 +517,7 @@ CLIB_MULTIARCH_FN (dpdk_interface_tx) (vlib_main_t * vm,
return tx_pkts;
}
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
static void
dpdk_clear_hw_interface_counters (u32 instance)
{
@@ -695,7 +695,7 @@ dpdk_interface_tx_multiarch_select (void)
#define UP_DOWN_FLAG_EVENT 1
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
uword
admin_up_down_process (vlib_main_t * vm,
vlib_node_runtime_t * rt, vlib_frame_t * f)
diff --git a/src/plugins/dpdk/device/node.c b/src/plugins/dpdk/device/node.c
index daccf733372..7f4b2cb8145 100644
--- a/src/plugins/dpdk/device/node.c
+++ b/src/plugins/dpdk/device/node.c
@@ -28,7 +28,7 @@
#include <dpdk/device/dpdk_priv.h>
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
static char *dpdk_error_strings[] = {
#define _(n,s) s,
foreach_dpdk_error
@@ -636,8 +636,7 @@ dpdk_device_input (vlib_main_t * vm, dpdk_main_t * dm, dpdk_device_t * xd,
return n_rx_packets;
}
-uword CLIB_CPU_OPTIMIZED
-CLIB_MULTIARCH_FN (dpdk_input) (vlib_main_t * vm, vlib_node_runtime_t * node,
+VLIB_NODE_FN (dpdk_input_node) (vlib_main_t * vm, vlib_node_runtime_t * node,
vlib_frame_t * f)
{
dpdk_main_t *dm = &dpdk_main;
@@ -666,10 +665,9 @@ CLIB_MULTIARCH_FN (dpdk_input) (vlib_main_t * vm, vlib_node_runtime_t * node,
return n_rx_packets;
}
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (dpdk_input_node) = {
- .function = dpdk_input,
.type = VLIB_NODE_TYPE_INPUT,
.name = "dpdk-input",
.sibling_of = "device-input",
@@ -684,20 +682,6 @@ VLIB_REGISTER_NODE (dpdk_input_node) = {
.error_strings = dpdk_error_strings,
};
/* *INDENT-ON* */
-
-vlib_node_function_t __clib_weak dpdk_input_avx512;
-vlib_node_function_t __clib_weak dpdk_input_avx2;
-
-#if __x86_64__
-static void __clib_constructor
-dpdk_input_multiarch_select (void)
-{
- if (dpdk_input_avx512 && clib_cpu_supports_avx512f ())
- dpdk_input_node.function = dpdk_input_avx512;
- else if (dpdk_input_avx2 && clib_cpu_supports_avx2 ())
- dpdk_input_node.function = dpdk_input_avx2;
-}
-#endif
#endif
/*
diff --git a/src/plugins/memif.am b/src/plugins/memif.am
index 6e9aa779155..33a378f4a3f 100644
--- a/src/plugins/memif.am
+++ b/src/plugins/memif.am
@@ -36,7 +36,7 @@ nobase_apiinclude_HEADERS += \
API_FILES += memif/memif.api
if CPU_X86_64
-memif_multiversioning_files = \
+memif_multiversioning_sources = \
memif/node.c \
memif/device.c
@@ -44,10 +44,10 @@ if CC_SUPPORTS_AVX2
###############################################################
# AVX2
###############################################################
-libmemif_plugin_avx2_la_SOURCES = $(memif_multiversioning_files)
+libmemif_plugin_avx2_la_SOURCES = $(memif_multiversioning_sources)
libmemif_plugin_avx2_la_CFLAGS = \
$(AM_CFLAGS) @CPU_AVX2_FLAGS@ \
- -DCLIB_MULTIARCH_VARIANT=avx2
+ -DCLIB_MARCH_VARIANT=avx2
noinst_LTLIBRARIES += libmemif_plugin_avx2.la
memif_plugin_la_LIBADD += libmemif_plugin_avx2.la
endif
@@ -56,10 +56,10 @@ if CC_SUPPORTS_AVX512
###############################################################
# AVX512
###############################################################
-libmemif_plugin_avx512_la_SOURCES = $(memif_multiversioning_files)
+libmemif_plugin_avx512_la_SOURCES = $(memif_multiversioning_sources)
libmemif_plugin_avx512_la_CFLAGS = \
$(AM_CFLAGS) @CPU_AVX512_FLAGS@ \
- -DCLIB_MULTIARCH_VARIANT=avx512
+ -DCLIB_MARCH_VARIANT=avx512
noinst_LTLIBRARIES += libmemif_plugin_avx512.la
memif_plugin_la_LIBADD += libmemif_plugin_avx512.la
endif
diff --git a/src/plugins/memif/device.c b/src/plugins/memif/device.c
index c70a4ea3549..14b9d547234 100644
--- a/src/plugins/memif/device.c
+++ b/src/plugins/memif/device.c
@@ -46,7 +46,7 @@ static __clib_unused char *memif_tx_func_error_strings[] = {
#undef _
};
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
u8 *
format_memif_device_name (u8 * s, va_list * args)
{
@@ -500,7 +500,7 @@ memif_subif_add_del_function (vnet_main_t * vnm,
return 0;
}
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VNET_DEVICE_CLASS (memif_device_class) = {
.name = "memif",
diff --git a/src/plugins/memif/node.c b/src/plugins/memif/node.c
index 029e25d814a..6e2807a2054 100644
--- a/src/plugins/memif/node.c
+++ b/src/plugins/memif/node.c
@@ -854,10 +854,10 @@ done:
return n_rx_packets;
}
-uword
-CLIB_MULTIARCH_FN (memif_input_fn) (vlib_main_t * vm,
- vlib_node_runtime_t * node,
- vlib_frame_t * frame)
+
+VLIB_NODE_FN (memif_input_node) (vlib_main_t * vm,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
{
u32 n_rx = 0;
memif_main_t *mm = &memif_main;
@@ -910,10 +910,9 @@ CLIB_MULTIARCH_FN (memif_input_fn) (vlib_main_t * vm,
return n_rx;
}
-#ifndef CLIB_MULTIARCH_VARIANT
+#ifndef CLIB_MARCH_VARIANT
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (memif_input_node) = {
- .function = memif_input_fn,
.name = "memif-input",
.sibling_of = "device-input",
.format_trace = format_memif_input_trace,
@@ -922,20 +921,6 @@ VLIB_REGISTER_NODE (memif_input_node) = {
.n_errors = MEMIF_INPUT_N_ERROR,
.error_strings = memif_input_error_strings,
};
-
-vlib_node_function_t __clib_weak memif_input_fn_avx512;
-vlib_node_function_t __clib_weak memif_input_fn_avx2;
-
-#if __x86_64__
-static void __clib_constructor
-memif_input_multiarch_select (void)
-{
- if (memif_input_fn_avx512 && clib_cpu_supports_avx512f ())
- memif_input_node.function = memif_input_fn_avx512;
- else if (memif_input_fn_avx2 && clib_cpu_supports_avx2 ())
- memif_input_node.function = memif_input_fn_avx2;
-}
-#endif
#endif
/* *INDENT-ON* */