Depending on the underlying architecture and CPU flags available, a
different set of Tx paths are defined. The Tx path selection function
iterates sequentially from zero to num_paths where num_paths is the size
of the array as determined by the RTE_DIM macro. However, depending on
the platform, some of these entries may be empty, and valid entries at
the end of the array may never be considered in the selection function.
Fix this by editing the idpf_tx_func_type enum and only defining a value
for the Tx path if it is implemented in the idpf_tx_path_infos array.
Fixes: 04bb7e425614 ("net/idpf: use common Tx path selection infrastructure")
Signed-off-by: Ciara Loftus <[email protected]>
---
drivers/net/intel/idpf/idpf_common_device.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/intel/idpf/idpf_common_device.h
b/drivers/net/intel/idpf/idpf_common_device.h
index 31915a03d4..9d3f35176d 100644
--- a/drivers/net/intel/idpf/idpf_common_device.h
+++ b/drivers/net/intel/idpf/idpf_common_device.h
@@ -78,9 +78,13 @@ enum idpf_rx_func_type {
enum idpf_tx_func_type {
IDPF_TX_DEFAULT,
IDPF_TX_SINGLEQ,
+#ifdef RTE_ARCH_X86
IDPF_TX_SINGLEQ_AVX2,
+#ifdef CC_AVX512_SUPPORT
IDPF_TX_AVX512,
IDPF_TX_SINGLEQ_AVX512,
+#endif
+#endif
/* Need a max value defined as array values in are defined
* in a C file in idpf driver, but cpfl driver needs to reuse
* that array and know the size
--
2.43.0