patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 5/8] net/i40e: ensure all Rx paths are selectable
       [not found] <20251215140553.2283531-1-ciara.loftus@intel.com>
@ 2025-12-15 14:05 ` Ciara Loftus
  2025-12-15 14:05 ` [PATCH 6/8] net/iavf: " Ciara Loftus
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Ciara Loftus @ 2025-12-15 14:05 UTC (permalink / raw)
  To: dev; +Cc: Ciara Loftus, stable

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 i40e_rx_func_type enum and only defining a value
for the Rx path if it is implemented in the i40e_rx_path_infos array.

Fixes: 3f24891594c1 ("net/i40e: use common Rx path selection infrastructure")
Cc: stable@dpdk.org

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

diff --git a/drivers/net/intel/i40e/i40e_ethdev.h b/drivers/net/intel/i40e/i40e_ethdev.h
index c3240be960..6d729f6ae9 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.h
+++ b/drivers/net/intel/i40e/i40e_ethdev.h
@@ -1231,16 +1231,22 @@ enum i40e_rx_func_type {
 	I40E_RX_DEFAULT,
 	I40E_RX_SCATTERED,
 	I40E_RX_BULK_ALLOC,
+#ifdef RTE_ARCH_X86
 	I40E_RX_SSE,
 	I40E_RX_SSE_SCATTERED,
 	I40E_RX_AVX2,
 	I40E_RX_AVX2_SCATTERED,
+#ifdef CC_AVX512_SUPPORT
 	I40E_RX_AVX512,
 	I40E_RX_AVX512_SCATTERED,
+#endif
+#elif defined(RTE_ARCH_ARM64)
 	I40E_RX_NEON,
 	I40E_RX_NEON_SCATTERED,
+#elif defined(RTE_ARCH_PPC_64)
 	I40E_RX_ALTIVEC,
 	I40E_RX_ALTIVEC_SCATTERED,
+#endif
 };
 
 enum i40e_tx_func_type {
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 6/8] net/iavf: ensure all Rx paths are selectable
       [not found] <20251215140553.2283531-1-ciara.loftus@intel.com>
  2025-12-15 14:05 ` [PATCH 5/8] net/i40e: ensure all Rx paths are selectable Ciara Loftus
@ 2025-12-15 14:05 ` Ciara Loftus
  2025-12-15 14:05 ` [PATCH 7/8] net/ice: " Ciara Loftus
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Ciara Loftus @ 2025-12-15 14:05 UTC (permalink / raw)
  To: dev; +Cc: Ciara Loftus, stable

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@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 7/8] net/ice: ensure all Rx paths are selectable
       [not found] <20251215140553.2283531-1-ciara.loftus@intel.com>
  2025-12-15 14:05 ` [PATCH 5/8] net/i40e: ensure all Rx paths are selectable Ciara Loftus
  2025-12-15 14:05 ` [PATCH 6/8] net/iavf: " Ciara Loftus
@ 2025-12-15 14:05 ` Ciara Loftus
  2025-12-15 14:05 ` [PATCH 8/8] net/idpf: " Ciara Loftus
       [not found] ` <20251216103504.2624535-1-ciara.loftus@intel.com>
  4 siblings, 0 replies; 6+ messages in thread
From: Ciara Loftus @ 2025-12-15 14:05 UTC (permalink / raw)
  To: dev; +Cc: Ciara Loftus, stable

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 ice_rx_func_type enum and only defining a value
for the Rx path if it is implemented in the ice_rx_path_infos array.

Fixes: 872b57178709 ("net/ice: use common Rx path selection infrastructure")
Cc: stable@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/intel/ice/ice_ethdev.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/intel/ice/ice_ethdev.h b/drivers/net/intel/ice/ice_ethdev.h
index d1d31760d5..b682df0717 100644
--- a/drivers/net/intel/ice/ice_ethdev.h
+++ b/drivers/net/intel/ice/ice_ethdev.h
@@ -196,16 +196,20 @@ enum ice_rx_func_type {
 	ICE_RX_DEFAULT,
 	ICE_RX_SCATTERED,
 	ICE_RX_BULK_ALLOC,
+#ifdef RTE_ARCH_X86
 	ICE_RX_SSE,
 	ICE_RX_SSE_SCATTERED,
 	ICE_RX_AVX2,
 	ICE_RX_AVX2_SCATTERED,
 	ICE_RX_AVX2_OFFLOAD,
 	ICE_RX_AVX2_SCATTERED_OFFLOAD,
+#ifdef CC_AVX512_SUPPORT
 	ICE_RX_AVX512,
 	ICE_RX_AVX512_SCATTERED,
 	ICE_RX_AVX512_OFFLOAD,
 	ICE_RX_AVX512_SCATTERED_OFFLOAD,
+#endif /* CC_AVX512_SUPPORT */
+#endif /* RTE_ARCH_X86 */
 };
 
 enum ice_tx_func_type {
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 8/8] net/idpf: ensure all Rx paths are selectable
       [not found] <20251215140553.2283531-1-ciara.loftus@intel.com>
                   ` (2 preceding siblings ...)
  2025-12-15 14:05 ` [PATCH 7/8] net/ice: " Ciara Loftus
@ 2025-12-15 14:05 ` Ciara Loftus
       [not found] ` <20251216103504.2624535-1-ciara.loftus@intel.com>
  4 siblings, 0 replies; 6+ messages in thread
From: Ciara Loftus @ 2025-12-15 14:05 UTC (permalink / raw)
  To: dev; +Cc: Ciara Loftus, stable

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 idpf_rx_func_type enum and only defining a value
for the Rx path if it is implemented in the idpf_rx_path_infos array.

Fixes: 12b1c2901761 ("net/idpf: use common Rx path selection infrastructure")
Cc: stable@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 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 9d3f35176d..487ca9d93c 100644
--- a/drivers/net/intel/idpf/idpf_common_device.h
+++ b/drivers/net/intel/idpf/idpf_common_device.h
@@ -69,9 +69,13 @@ enum idpf_rx_func_type {
 	IDPF_RX_DEFAULT,
 	IDPF_RX_SINGLEQ,
 	IDPF_RX_SINGLEQ_SCATTERED,
+#ifdef RTE_ARCH_X86
 	IDPF_RX_SINGLEQ_AVX2,
+#ifdef CC_AVX512_SUPPORT
 	IDPF_RX_AVX512,
 	IDPF_RX_SINGLEQ_AVX512,
+#endif
+#endif
 	IDPF_RX_MAX
 };
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 2/3] net/intel: prevent selection of a null Rx burst function
       [not found] ` <20251216103504.2624535-1-ciara.loftus@intel.com>
@ 2025-12-16 10:35   ` Ciara Loftus
  2025-12-16 12:06     ` Bruce Richardson
  0 siblings, 1 reply; 6+ messages in thread
From: Ciara Loftus @ 2025-12-16 10:35 UTC (permalink / raw)
  To: dev; +Cc: Ciara Loftus, stable

Depending on the underlying architecture and CPU flags available, a
different set of Rx paths may be defined by a driver using the common
path selection infrastructure. However the Rx path selection function
iterates through the entire array of potential Rx paths, regardless of
whether they are available for selection by that platform. This could
result in a null Rx burst function being selected. Fix this by
discarding paths with a null Rx burst function from selection.

Fixes: 9d99641d80a0 ("net/intel: introduce infrastructure for Rx path selection")
Cc: stable@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/intel/common/rx.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/intel/common/rx.h b/drivers/net/intel/common/rx.h
index ea7fb98b47..83259f2737 100644
--- a/drivers/net/intel/common/rx.h
+++ b/drivers/net/intel/common/rx.h
@@ -266,6 +266,10 @@ ci_rx_path_select(struct ci_rx_path_features req_features,
 	for (i = 0; i < num_paths; i++) {
 		const struct ci_rx_path_features *path_features = &infos[i].features;
 
+		/* Do not select a path with a NULL pkt_burst function. */
+		if (infos[i].pkt_burst == NULL)
+			continue;
+
 		/* Do not select a disabled rx path. */
 		if (path_features->extra.disabled)
 			continue;
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/3] net/intel: prevent selection of a null Rx burst function
  2025-12-16 10:35   ` [PATCH v2 2/3] net/intel: prevent selection of a null Rx burst function Ciara Loftus
@ 2025-12-16 12:06     ` Bruce Richardson
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2025-12-16 12:06 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dev, stable

On Tue, Dec 16, 2025 at 10:35:03AM +0000, Ciara Loftus wrote:
> Depending on the underlying architecture and CPU flags available, a
> different set of Rx paths may be defined by a driver using the common
> path selection infrastructure. However the Rx path selection function
> iterates through the entire array of potential Rx paths, regardless of
> whether they are available for selection by that platform. This could
> result in a null Rx burst function being selected. Fix this by
> discarding paths with a null Rx burst function from selection.
> 
> Fixes: 9d99641d80a0 ("net/intel: introduce infrastructure for Rx path selection")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-12-16 12:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20251215140553.2283531-1-ciara.loftus@intel.com>
2025-12-15 14:05 ` [PATCH 5/8] net/i40e: ensure all Rx paths are selectable Ciara Loftus
2025-12-15 14:05 ` [PATCH 6/8] net/iavf: " Ciara Loftus
2025-12-15 14:05 ` [PATCH 7/8] net/ice: " Ciara Loftus
2025-12-15 14:05 ` [PATCH 8/8] net/idpf: " Ciara Loftus
     [not found] ` <20251216103504.2624535-1-ciara.loftus@intel.com>
2025-12-16 10:35   ` [PATCH v2 2/3] net/intel: prevent selection of a null Rx burst function Ciara Loftus
2025-12-16 12:06     ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).