[PATCH 6/8] net/iavf: ensure all Rx paths are selectable

Ciara Loftus ciara.loftus at intel.com
Mon Dec 15 15:05:51 CET 2025


Depending on the underlying architecture and CPU flags available, a
different set of Rx paths are defined. The Rx 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 iavf_rx_func_type enum and only defining a value
for the Rx path if it is implemented in the iavf_rx_path_infos array.

Fixes: 91e3205d72d8 ("net/iavf: use common Rx path selection infrastructure")
Cc: stable at dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
---
 drivers/net/intel/iavf/iavf.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index 35d3bd5671..53c036c0e8 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -328,7 +328,10 @@ enum iavf_rx_func_type {
 	IAVF_RX_SCATTERED_FLEX_RXD,
 	IAVF_RX_BULK_ALLOC,
 	IAVF_RX_BULK_ALLOC_FLEX_RXD,
+#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM)
 	IAVF_RX_SSE,
+#endif
+#ifdef RTE_ARCH_X86
 	IAVF_RX_SSE_SCATTERED,
 	IAVF_RX_SSE_FLEX_RXD,
 	IAVF_RX_SSE_SCATTERED_FLEX_RXD,
@@ -340,6 +343,7 @@ enum iavf_rx_func_type {
 	IAVF_RX_AVX2_SCATTERED_FLEX_RXD,
 	IAVF_RX_AVX2_FLEX_RXD_OFFLOAD,
 	IAVF_RX_AVX2_SCATTERED_FLEX_RXD_OFFLOAD,
+#ifdef CC_AVX512_SUPPORT
 	IAVF_RX_AVX512,
 	IAVF_RX_AVX512_SCATTERED,
 	IAVF_RX_AVX512_OFFLOAD,
@@ -348,6 +352,8 @@ enum iavf_rx_func_type {
 	IAVF_RX_AVX512_SCATTERED_FLEX_RXD,
 	IAVF_RX_AVX512_FLEX_RXD_OFFLOAD,
 	IAVF_RX_AVX512_SCATTERED_FLEX_RXD_OFFLOAD,
+#endif /* CC_AVX512_SUPPORT */
+#endif /* RTE_ARCH_X86 */
 };
 
 enum iavf_tx_func_type {
-- 
2.43.0



More information about the stable mailing list