patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 1/6] net/intel: fix Rx vector capability detection
       [not found] <20251014084517.1407407-1-ciara.loftus@intel.com>
@ 2025-10-14  8:45 ` Ciara Loftus
  2025-10-14 14:16   ` Bruce Richardson
  2025-10-14  8:45 ` [PATCH 2/6] net/iavf: fix Rx paths feature definitions Ciara Loftus
  2025-10-14  8:45 ` [PATCH 3/6] net/iavf: fix Rx path selection for scalar flex bulk alloc Ciara Loftus
  2 siblings, 1 reply; 7+ messages in thread
From: Ciara Loftus @ 2025-10-14  8:45 UTC (permalink / raw)
  To: dev; +Cc: Ciara Loftus, stable

The common function for detecting whether an rxq could use a vector
rx path would automatically disqualify rx queues that had the
timestamp offload enabled. This was incorrect behaviour because the
iavf driver which uses this common function supports timestamp offload
on its vector paths. Fix this by removing the conditional check for
timestamp offload.

Fixes: 9eb60580d155 ("net/intel: extract common Rx vector criteria")
Cc: stable@dpdk.org

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

diff --git a/drivers/net/intel/common/rx.h b/drivers/net/intel/common/rx.h
index 741808f573..d3e4492ff1 100644
--- a/drivers/net/intel/common/rx.h
+++ b/drivers/net/intel/common/rx.h
@@ -235,9 +235,8 @@ ci_rxq_vec_capable(uint16_t nb_desc, uint16_t rx_free_thresh, uint64_t offloads)
 			(nb_desc % rx_free_thresh) != 0)
 		return false;
 
-	/* no driver supports timestamping or buffer split on vector path */
-	if ((offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) ||
-			(offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT))
+	/* no driver supports buffer split on vector path */
+	if (offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT)
 		return false;
 
 	return true;
-- 
2.34.1


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

* [PATCH 2/6] net/iavf: fix Rx paths feature definitions
       [not found] <20251014084517.1407407-1-ciara.loftus@intel.com>
  2025-10-14  8:45 ` [PATCH 1/6] net/intel: fix Rx vector capability detection Ciara Loftus
@ 2025-10-14  8:45 ` Ciara Loftus
  2025-10-14 14:26   ` Bruce Richardson
  2025-10-14  8:45 ` [PATCH 3/6] net/iavf: fix Rx path selection for scalar flex bulk alloc Ciara Loftus
  2 siblings, 1 reply; 7+ messages in thread
From: Ciara Loftus @ 2025-10-14  8:45 UTC (permalink / raw)
  To: dev; +Cc: Ciara Loftus, stable

Two rx paths had incorrect feature and offload definitions
which led to incorrect path selections. Fix these.

Remove timestamp offload from the list of offloads
supported by paths that use the flexible rx descriptor. It
is only available in the "offload" versions of those paths.

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_rxtx.c | 5 +++--
 drivers/net/intel/iavf/iavf_rxtx.h | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index 775fb4a66f..67c73f9ad6 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -3768,13 +3768,14 @@ static const struct ci_rx_path_info iavf_rx_path_infos[] = {
 			{.scattered = true, .flex_desc = true, .bulk_alloc = true}}},
 	[IAVF_RX_AVX2_FLEX_RXD_OFFLOAD] = {
 		iavf_recv_pkts_vec_avx2_flex_rxd_offload, "Vector AVX2 Flex Offload",
-			{IAVF_RX_VECTOR_OFFLOADS, RTE_VECT_SIMD_256,
+			{IAVF_RX_VECTOR_OFFLOAD_FLEX_OFFLOADS, RTE_VECT_SIMD_256,
 				{.flex_desc = true, .bulk_alloc = true}}},
 	[IAVF_RX_AVX2_SCATTERED_FLEX_RXD_OFFLOAD] = {
 		iavf_recv_scattered_pkts_vec_avx2_flex_rxd_offload,
 		"Vector Scattered AVX2 Flex Offload",
 		{IAVF_RX_VECTOR_OFFLOAD_FLEX_OFFLOADS | RTE_ETH_RX_OFFLOAD_SCATTER,
-			RTE_VECT_SIMD_256, {.flex_desc = true, .bulk_alloc = true}}},
+			RTE_VECT_SIMD_256,
+			{.scattered = true, .flex_desc = true, .bulk_alloc = true}}},
 #ifdef CC_AVX512_SUPPORT
 	[IAVF_RX_AVX512] = {iavf_recv_pkts_vec_avx512, "Vector AVX512",
 		{IAVF_RX_VECTOR_OFFLOADS, RTE_VECT_SIMD_512, {.bulk_alloc = true}}},
diff --git a/drivers/net/intel/iavf/iavf_rxtx.h b/drivers/net/intel/iavf/iavf_rxtx.h
index 3f461efb28..44be29caf6 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.h
+++ b/drivers/net/intel/iavf/iavf_rxtx.h
@@ -83,7 +83,6 @@
 /* vector paths that use the flex rx desc */
 #define IAVF_RX_VECTOR_FLEX_OFFLOADS (			\
 		IAVF_RX_VECTOR_OFFLOADS |		\
-		RTE_ETH_RX_OFFLOAD_TIMESTAMP |		\
 		RTE_ETH_RX_OFFLOAD_SECURITY)
 /* vector offload paths */
 #define IAVF_RX_VECTOR_OFFLOAD_OFFLOADS (		\
-- 
2.34.1


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

* [PATCH 3/6] net/iavf: fix Rx path selection for scalar flex bulk alloc
       [not found] <20251014084517.1407407-1-ciara.loftus@intel.com>
  2025-10-14  8:45 ` [PATCH 1/6] net/intel: fix Rx vector capability detection Ciara Loftus
  2025-10-14  8:45 ` [PATCH 2/6] net/iavf: fix Rx paths feature definitions Ciara Loftus
@ 2025-10-14  8:45 ` Ciara Loftus
  2025-10-14 14:33   ` Bruce Richardson
  2 siblings, 1 reply; 7+ messages in thread
From: Ciara Loftus @ 2025-10-14  8:45 UTC (permalink / raw)
  To: dev; +Cc: Ciara Loftus, stable

The scalar bulk alloc rx burst function supports both legacy and
flexible rx descriptors. The rx path selection infrastructure introduced
in commit 91e3205d72d8 ("net/iavf: use common Rx path selection
infrastructure") cannot define a path that supports both descriptor
formats. To solve this problem, have two rx path definitions which both
point to the same rx burst function but report different descriptor
formats. This allows the rx path selection function to choose the
correct path.

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      | 1 +
 drivers/net/intel/iavf/iavf_rxtx.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
index 435902fbc2..4e76162337 100644
--- a/drivers/net/intel/iavf/iavf.h
+++ b/drivers/net/intel/iavf/iavf.h
@@ -327,6 +327,7 @@ enum iavf_rx_func_type {
 	IAVF_RX_FLEX_RXD,
 	IAVF_RX_SCATTERED_FLEX_RXD,
 	IAVF_RX_BULK_ALLOC,
+	IAVF_RX_BULK_ALLOC_FLEX_RXD,
 	IAVF_RX_SSE,
 	IAVF_RX_SSE_SCATTERED,
 	IAVF_RX_SSE_FLEX_RXD,
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index 67c73f9ad6..bbf3a1737e 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -3734,6 +3734,9 @@ static const struct ci_rx_path_info iavf_rx_path_infos[] = {
 				{.scattered = true, .flex_desc = true}}},
 	[IAVF_RX_BULK_ALLOC] = {iavf_recv_pkts_bulk_alloc, "Scalar Bulk Alloc",
 		{IAVF_RX_SCALAR_OFFLOADS, RTE_VECT_SIMD_DISABLED, {.bulk_alloc = true}}},
+	[IAVF_RX_BULK_ALLOC_FLEX_RXD] = {iavf_recv_pkts_bulk_alloc, "Scalar Bulk Alloc Flex",
+			{IAVF_RX_SCALAR_FLEX_OFFLOADS, RTE_VECT_SIMD_DISABLED,
+			{.flex_desc = true, .bulk_alloc = true}}},
 #ifdef RTE_ARCH_X86
 	[IAVF_RX_SSE] = {iavf_recv_pkts_vec, "Vector SSE",
 		{IAVF_RX_VECTOR_OFFLOAD_OFFLOADS, RTE_VECT_SIMD_128, {.bulk_alloc = true}}},
-- 
2.34.1


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

* Re: [PATCH 1/6] net/intel: fix Rx vector capability detection
  2025-10-14  8:45 ` [PATCH 1/6] net/intel: fix Rx vector capability detection Ciara Loftus
@ 2025-10-14 14:16   ` Bruce Richardson
  2025-10-14 14:59     ` Loftus, Ciara
  0 siblings, 1 reply; 7+ messages in thread
From: Bruce Richardson @ 2025-10-14 14:16 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dev, stable

On Tue, Oct 14, 2025 at 08:45:12AM +0000, Ciara Loftus wrote:
> The common function for detecting whether an rxq could use a vector
> rx path would automatically disqualify rx queues that had the
> timestamp offload enabled. This was incorrect behaviour because the
> iavf driver which uses this common function supports timestamp offload
> on its vector paths. Fix this by removing the conditional check for
> timestamp offload.
> 
> Fixes: 9eb60580d155 ("net/intel: extract common Rx vector criteria")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
>  drivers/net/intel/common/rx.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/intel/common/rx.h b/drivers/net/intel/common/rx.h
> index 741808f573..d3e4492ff1 100644
> --- a/drivers/net/intel/common/rx.h
> +++ b/drivers/net/intel/common/rx.h
> @@ -235,9 +235,8 @@ ci_rxq_vec_capable(uint16_t nb_desc, uint16_t rx_free_thresh, uint64_t offloads)
>  			(nb_desc % rx_free_thresh) != 0)
>  		return false;
>  
> -	/* no driver supports timestamping or buffer split on vector path */
> -	if ((offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) ||
> -			(offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT))
> +	/* no driver supports buffer split on vector path */
> +	if (offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT)
>  		return false;
>  
>  	return true;

Given that we check all offload flags later when doing final path
selection, can we drop the flags check here completely? Just have this
funciont check on the non-feature-related conditions, such as ring size
etc.

/Bruce

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

* Re: [PATCH 2/6] net/iavf: fix Rx paths feature definitions
  2025-10-14  8:45 ` [PATCH 2/6] net/iavf: fix Rx paths feature definitions Ciara Loftus
@ 2025-10-14 14:26   ` Bruce Richardson
  0 siblings, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2025-10-14 14:26 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dev, stable

On Tue, Oct 14, 2025 at 08:45:13AM +0000, Ciara Loftus wrote:
> Two rx paths had incorrect feature and offload definitions
> which led to incorrect path selections. Fix these.
> 
> Remove timestamp offload from the list of offloads
> supported by paths that use the flexible rx descriptor. It
> is only available in the "offload" versions of those paths.
> 
> 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_rxtx.c | 5 +++--
>  drivers/net/intel/iavf/iavf_rxtx.h | 1 -
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
Acked-by: Bruce Richardson <bruce.richardson@intel.com>


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

* Re: [PATCH 3/6] net/iavf: fix Rx path selection for scalar flex bulk alloc
  2025-10-14  8:45 ` [PATCH 3/6] net/iavf: fix Rx path selection for scalar flex bulk alloc Ciara Loftus
@ 2025-10-14 14:33   ` Bruce Richardson
  0 siblings, 0 replies; 7+ messages in thread
From: Bruce Richardson @ 2025-10-14 14:33 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dev, stable

On Tue, Oct 14, 2025 at 08:45:14AM +0000, Ciara Loftus wrote:
> The scalar bulk alloc rx burst function supports both legacy and
> flexible rx descriptors. The rx path selection infrastructure introduced
> in commit 91e3205d72d8 ("net/iavf: use common Rx path selection
> infrastructure") cannot define a path that supports both descriptor
> formats. To solve this problem, have two rx path definitions which both
> point to the same rx burst function but report different descriptor
> formats. This allows the rx path selection function to choose the
> correct path.
> 
> Fixes: 91e3205d72d8 ("net/iavf: use common Rx path selection infrastructure")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>

I find it strange that both point to the one function but have different
offload capabilities. However, I realise that the code path bifurcates
again later in the function, so doing it this way is correct!

Acked-by: Bruce Richardson <bruce.richardson@intel.com>


> ---
>  drivers/net/intel/iavf/iavf.h      | 1 +
>  drivers/net/intel/iavf/iavf_rxtx.c | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
> index 435902fbc2..4e76162337 100644
> --- a/drivers/net/intel/iavf/iavf.h
> +++ b/drivers/net/intel/iavf/iavf.h
> @@ -327,6 +327,7 @@ enum iavf_rx_func_type {
>  	IAVF_RX_FLEX_RXD,
>  	IAVF_RX_SCATTERED_FLEX_RXD,
>  	IAVF_RX_BULK_ALLOC,
> +	IAVF_RX_BULK_ALLOC_FLEX_RXD,
>  	IAVF_RX_SSE,
>  	IAVF_RX_SSE_SCATTERED,
>  	IAVF_RX_SSE_FLEX_RXD,
> diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
> index 67c73f9ad6..bbf3a1737e 100644
> --- a/drivers/net/intel/iavf/iavf_rxtx.c
> +++ b/drivers/net/intel/iavf/iavf_rxtx.c
> @@ -3734,6 +3734,9 @@ static const struct ci_rx_path_info iavf_rx_path_infos[] = {
>  				{.scattered = true, .flex_desc = true}}},
>  	[IAVF_RX_BULK_ALLOC] = {iavf_recv_pkts_bulk_alloc, "Scalar Bulk Alloc",
>  		{IAVF_RX_SCALAR_OFFLOADS, RTE_VECT_SIMD_DISABLED, {.bulk_alloc = true}}},
> +	[IAVF_RX_BULK_ALLOC_FLEX_RXD] = {iavf_recv_pkts_bulk_alloc, "Scalar Bulk Alloc Flex",
> +			{IAVF_RX_SCALAR_FLEX_OFFLOADS, RTE_VECT_SIMD_DISABLED,
> +			{.flex_desc = true, .bulk_alloc = true}}},
>  #ifdef RTE_ARCH_X86
>  	[IAVF_RX_SSE] = {iavf_recv_pkts_vec, "Vector SSE",
>  		{IAVF_RX_VECTOR_OFFLOAD_OFFLOADS, RTE_VECT_SIMD_128, {.bulk_alloc = true}}},
> -- 
> 2.34.1
> 

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

* RE: [PATCH 1/6] net/intel: fix Rx vector capability detection
  2025-10-14 14:16   ` Bruce Richardson
@ 2025-10-14 14:59     ` Loftus, Ciara
  0 siblings, 0 replies; 7+ messages in thread
From: Loftus, Ciara @ 2025-10-14 14:59 UTC (permalink / raw)
  To: Richardson, Bruce; +Cc: dev, stable

> 
> On Tue, Oct 14, 2025 at 08:45:12AM +0000, Ciara Loftus wrote:
> > The common function for detecting whether an rxq could use a vector
> > rx path would automatically disqualify rx queues that had the
> > timestamp offload enabled. This was incorrect behaviour because the
> > iavf driver which uses this common function supports timestamp offload
> > on its vector paths. Fix this by removing the conditional check for
> > timestamp offload.
> >
> > Fixes: 9eb60580d155 ("net/intel: extract common Rx vector criteria")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> > ---
> >  drivers/net/intel/common/rx.h | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/intel/common/rx.h b/drivers/net/intel/common/rx.h
> > index 741808f573..d3e4492ff1 100644
> > --- a/drivers/net/intel/common/rx.h
> > +++ b/drivers/net/intel/common/rx.h
> > @@ -235,9 +235,8 @@ ci_rxq_vec_capable(uint16_t nb_desc, uint16_t
> rx_free_thresh, uint64_t offloads)
> >  			(nb_desc % rx_free_thresh) != 0)
> >  		return false;
> >
> > -	/* no driver supports timestamping or buffer split on vector path */
> > -	if ((offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) ||
> > -			(offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT))
> > +	/* no driver supports buffer split on vector path */
> > +	if (offloads & RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT)
> >  		return false;
> >
> >  	return true;
> 
> Given that we check all offload flags later when doing final path
> selection, can we drop the flags check here completely? Just have this
> funciont check on the non-feature-related conditions, such as ring size
> etc.

Sure.
This function is used by ixgbe which doesn't use the common
rx path select function yet. But I think this check is
redundant for ixgbe because it's not supported on any of its
paths so initialisation would fail earlier than here, during
dev_configure.

> 
> /Bruce

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

end of thread, other threads:[~2025-10-14 14:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20251014084517.1407407-1-ciara.loftus@intel.com>
2025-10-14  8:45 ` [PATCH 1/6] net/intel: fix Rx vector capability detection Ciara Loftus
2025-10-14 14:16   ` Bruce Richardson
2025-10-14 14:59     ` Loftus, Ciara
2025-10-14  8:45 ` [PATCH 2/6] net/iavf: fix Rx paths feature definitions Ciara Loftus
2025-10-14 14:26   ` Bruce Richardson
2025-10-14  8:45 ` [PATCH 3/6] net/iavf: fix Rx path selection for scalar flex bulk alloc Ciara Loftus
2025-10-14 14:33   ` 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).