[RFC,v2,04/10] net/enic: remove weak symbols
Commit Message
Rather than use weak symbols, expose stubs symbols when needed.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/enic/enic_main.c | 8 +++-----
drivers/net/enic/meson.build | 1 +
2 files changed, 4 insertions(+), 5 deletions(-)
@@ -509,15 +509,13 @@ static void enic_prep_wq_for_simple_tx(struct enic *enic, uint16_t queue_idx)
}
}
-/*
- * The 'strong' version is in enic_rxtx_vec_avx2.c. This weak version is used
- * used when that file is not compiled.
- */
-__rte_weak bool
+#ifndef ENIC_RXTX_VEC
+bool
enic_use_vector_rx_handler(__rte_unused struct rte_eth_dev *eth_dev)
{
return false;
}
+#endif /* ENIC_RXTX_VEC */
void enic_pick_rx_handler(struct rte_eth_dev *eth_dev)
{
@@ -33,6 +33,7 @@ includes += include_directories('base')
# may not. This is to support users who build for the min supported machine
# and need to run the binary on newer CPUs too.
if dpdk_conf.has('RTE_ARCH_X86_64')
+ cflags += '-DENIC_RXTX_VEC'
enic_avx2_lib = static_library('enic_avx2_lib',
'enic_rxtx_vec_avx2.c',
dependencies: [static_rte_ethdev, static_rte_bus_pci],