* [PATCH] net/i40e: fix supported offloads for Rx vector path
@ 2025-09-01 9:59 Ciara Loftus
2025-09-02 8:08 ` David Marchand
2025-09-02 10:48 ` [PATCH v2 0/4] Fixes for net/intel Rx Path Selection Ciara Loftus
0 siblings, 2 replies; 8+ messages in thread
From: Ciara Loftus @ 2025-09-01 9:59 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The set of supported Rx offloads in the vector path had been defined as
those supported by the scalar path. This was incorrect so define a new
list of supported offloads for the vector path. The list is the same
as the scalar path except it excludes vlan extend and qinq strip.
Fixes: 052ae311091c ("net/i40e: use the common Rx path selection infrastructure")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/i40e/i40e_rxtx.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/intel/i40e/i40e_rxtx.h b/drivers/net/intel/i40e/i40e_rxtx.h
index 5d5d4e08b0..1f210dfdff 100644
--- a/drivers/net/intel/i40e/i40e_rxtx.h
+++ b/drivers/net/intel/i40e/i40e_rxtx.h
@@ -80,7 +80,16 @@ enum i40e_header_split_mode {
RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
RTE_ETH_RX_OFFLOAD_RSS_HASH)
-#define I40E_RX_VECTOR_OFFLOADS I40E_RX_SCALAR_OFFLOADS
+#define I40E_RX_VECTOR_OFFLOADS ( \
+ RTE_ETH_RX_OFFLOAD_VLAN_STRIP | \
+ RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \
+ RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \
+ RTE_ETH_RX_OFFLOAD_TCP_CKSUM | \
+ RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
+ RTE_ETH_RX_OFFLOAD_KEEP_CRC | \
+ RTE_ETH_RX_OFFLOAD_SCATTER | \
+ RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
+ RTE_ETH_RX_OFFLOAD_RSS_HASH)
/** Offload features */
union i40e_tx_offload {
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net/i40e: fix supported offloads for Rx vector path
2025-09-01 9:59 [PATCH] net/i40e: fix supported offloads for Rx vector path Ciara Loftus
@ 2025-09-02 8:08 ` David Marchand
2025-09-02 10:24 ` Loftus, Ciara
2025-09-02 10:48 ` [PATCH v2 0/4] Fixes for net/intel Rx Path Selection Ciara Loftus
1 sibling, 1 reply; 8+ messages in thread
From: David Marchand @ 2025-09-02 8:08 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev, Bruce Richardson
Hello,
On Mon, 1 Sept 2025 at 12:00, Ciara Loftus <ciara.loftus@intel.com> wrote:
>
> The set of supported Rx offloads in the vector path had been defined as
> those supported by the scalar path. This was incorrect so define a new
> list of supported offloads for the vector path. The list is the same
> as the scalar path except it excludes vlan extend and qinq strip.
>
> Fixes: 052ae311091c ("net/i40e: use the common Rx path selection infrastructure")
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
> drivers/net/intel/i40e/i40e_rxtx.h | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/intel/i40e/i40e_rxtx.h b/drivers/net/intel/i40e/i40e_rxtx.h
> index 5d5d4e08b0..1f210dfdff 100644
> --- a/drivers/net/intel/i40e/i40e_rxtx.h
> +++ b/drivers/net/intel/i40e/i40e_rxtx.h
> @@ -80,7 +80,16 @@ enum i40e_header_split_mode {
> RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
> RTE_ETH_RX_OFFLOAD_RSS_HASH)
>
> -#define I40E_RX_VECTOR_OFFLOADS I40E_RX_SCALAR_OFFLOADS
> +#define I40E_RX_VECTOR_OFFLOADS ( \
> + RTE_ETH_RX_OFFLOAD_VLAN_STRIP | \
> + RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \
> + RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \
> + RTE_ETH_RX_OFFLOAD_TCP_CKSUM | \
> + RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
> + RTE_ETH_RX_OFFLOAD_KEEP_CRC | \
> + RTE_ETH_RX_OFFLOAD_SCATTER | \
> + RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
> + RTE_ETH_RX_OFFLOAD_RSS_HASH)
I was curious about this fix so I have been trying to understand the
list of supported offloads, and I have a few interrogations.
How does this new code articulate with function
i40e_rx_vec_dev_conf_condition_check_default() (that seems to have a
build check on RTE_LIBRTE_IEEE1588).
This seems like redundant logic to me.
Should the dev_info->rx_offload_capa field be filled with the common
set of flags of the scalar handler?
--
David Marchand
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] net/i40e: fix supported offloads for Rx vector path
2025-09-02 8:08 ` David Marchand
@ 2025-09-02 10:24 ` Loftus, Ciara
0 siblings, 0 replies; 8+ messages in thread
From: Loftus, Ciara @ 2025-09-02 10:24 UTC (permalink / raw)
To: Marchand, David; +Cc: dev, Richardson, Bruce
> Subject: Re: [PATCH] net/i40e: fix supported offloads for Rx vector path
>
> Hello,
>
> On Mon, 1 Sept 2025 at 12:00, Ciara Loftus <ciara.loftus@intel.com> wrote:
> >
> > The set of supported Rx offloads in the vector path had been defined as
> > those supported by the scalar path. This was incorrect so define a new
> > list of supported offloads for the vector path. The list is the same
> > as the scalar path except it excludes vlan extend and qinq strip.
> >
> > Fixes: 052ae311091c ("net/i40e: use the common Rx path selection
> infrastructure")
> >
> > Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> > ---
> > drivers/net/intel/i40e/i40e_rxtx.h | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/intel/i40e/i40e_rxtx.h
> b/drivers/net/intel/i40e/i40e_rxtx.h
> > index 5d5d4e08b0..1f210dfdff 100644
> > --- a/drivers/net/intel/i40e/i40e_rxtx.h
> > +++ b/drivers/net/intel/i40e/i40e_rxtx.h
> > @@ -80,7 +80,16 @@ enum i40e_header_split_mode {
> > RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
> > RTE_ETH_RX_OFFLOAD_RSS_HASH)
> >
> > -#define I40E_RX_VECTOR_OFFLOADS I40E_RX_SCALAR_OFFLOADS
> > +#define I40E_RX_VECTOR_OFFLOADS ( \
> > + RTE_ETH_RX_OFFLOAD_VLAN_STRIP | \
> > + RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \
> > + RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \
> > + RTE_ETH_RX_OFFLOAD_TCP_CKSUM | \
> > + RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
> > + RTE_ETH_RX_OFFLOAD_KEEP_CRC | \
> > + RTE_ETH_RX_OFFLOAD_SCATTER | \
> > + RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
> > + RTE_ETH_RX_OFFLOAD_RSS_HASH)
>
> I was curious about this fix so I have been trying to understand the
> list of supported offloads, and I have a few interrogations.
>
> How does this new code articulate with function
> i40e_rx_vec_dev_conf_condition_check_default() (that seems to have a
> build check on RTE_LIBRTE_IEEE1588).
> This seems like redundant logic to me.
Hi David,
You're right. There is some redundant logic in
i40e_rx_vec_dev_conf_condition_check_default that can be removed.
I'll include its removal in the next revision.
>
> Should the dev_info->rx_offload_capa field be filled with the common
> set of flags of the scalar handler?
I think this can be done, and maybe it can be done in the other drivers
that use the new common path selection logic too. I'll take a look.
Thanks,
Ciara
>
>
> --
> David Marchand
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 0/4] Fixes for net/intel Rx Path Selection
2025-09-01 9:59 [PATCH] net/i40e: fix supported offloads for Rx vector path Ciara Loftus
2025-09-02 8:08 ` David Marchand
@ 2025-09-02 10:48 ` Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 1/4] net/i40e: fix supported offloads for Rx vector path Ciara Loftus
` (3 more replies)
1 sibling, 4 replies; 8+ messages in thread
From: Ciara Loftus @ 2025-09-02 10:48 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
This series contains fixes for the code surrounding Rx path selection
in the i40e and iavf drivers. It is mostly the removal of redundant
and duplicate code. The target is the next-net-intel tree.
Ciara Loftus (4):
net/i40e: fix supported offloads for Rx vector path
net/i40e: fix vector Rx queue set up logic
net/i40e: remove redundant vector Rx queue setup code
net/iavf: remove duplicate in scalar offload list
drivers/net/intel/i40e/i40e_rxtx.c | 40 ++-----------------
drivers/net/intel/i40e/i40e_rxtx.h | 11 ++++-
drivers/net/intel/i40e/i40e_rxtx_vec_common.h | 6 ---
drivers/net/intel/iavf/iavf_rxtx.h | 1 -
4 files changed, 14 insertions(+), 44 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/4] net/i40e: fix supported offloads for Rx vector path
2025-09-02 10:48 ` [PATCH v2 0/4] Fixes for net/intel Rx Path Selection Ciara Loftus
@ 2025-09-02 10:48 ` Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 2/4] net/i40e: fix vector Rx queue set up logic Ciara Loftus
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Ciara Loftus @ 2025-09-02 10:48 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The set of supported Rx offloads in the vector path had been defined as
those supported by the scalar path. This was incorrect so define a new
list of supported offloads for the vector path. The list is the same
as the scalar path except it excludes vlan extend and qinq strip.
Also, remove a redundant check for the VLAN Extend offload in the
driver code. This check is now performed in the common rx path
selection code.
Fixes: 052ae311091c ("net/i40e: use the common Rx path selection infrastructure")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/i40e/i40e_rxtx.h | 11 ++++++++++-
drivers/net/intel/i40e/i40e_rxtx_vec_common.h | 6 ------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/net/intel/i40e/i40e_rxtx.h b/drivers/net/intel/i40e/i40e_rxtx.h
index 5d5d4e08b0..1f210dfdff 100644
--- a/drivers/net/intel/i40e/i40e_rxtx.h
+++ b/drivers/net/intel/i40e/i40e_rxtx.h
@@ -80,7 +80,16 @@ enum i40e_header_split_mode {
RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
RTE_ETH_RX_OFFLOAD_RSS_HASH)
-#define I40E_RX_VECTOR_OFFLOADS I40E_RX_SCALAR_OFFLOADS
+#define I40E_RX_VECTOR_OFFLOADS ( \
+ RTE_ETH_RX_OFFLOAD_VLAN_STRIP | \
+ RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \
+ RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \
+ RTE_ETH_RX_OFFLOAD_TCP_CKSUM | \
+ RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
+ RTE_ETH_RX_OFFLOAD_KEEP_CRC | \
+ RTE_ETH_RX_OFFLOAD_SCATTER | \
+ RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
+ RTE_ETH_RX_OFFLOAD_RSS_HASH)
/** Offload features */
union i40e_tx_offload {
diff --git a/drivers/net/intel/i40e/i40e_rxtx_vec_common.h b/drivers/net/intel/i40e/i40e_rxtx_vec_common.h
index e118df9ce0..39c9d2ee10 100644
--- a/drivers/net/intel/i40e/i40e_rxtx_vec_common.h
+++ b/drivers/net/intel/i40e/i40e_rxtx_vec_common.h
@@ -54,12 +54,6 @@ static inline int
i40e_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev)
{
#ifndef RTE_LIBRTE_IEEE1588
- struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
-
- /* no QinQ support */
- if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_VLAN_EXTEND)
- return -1;
-
/**
* Vector mode is allowed only when number of Rx queue
* descriptor is power of 2.
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 2/4] net/i40e: fix vector Rx queue set up logic
2025-09-02 10:48 ` [PATCH v2 0/4] Fixes for net/intel Rx Path Selection Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 1/4] net/i40e: fix supported offloads for Rx vector path Ciara Loftus
@ 2025-09-02 10:48 ` Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 3/4] net/i40e: remove redundant vector Rx queue setup code Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 4/4] net/iavf: remove duplicate in scalar offload list Ciara Loftus
3 siblings, 0 replies; 8+ messages in thread
From: Ciara Loftus @ 2025-09-02 10:48 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The logic to set up a vector Rx queue was present in two places, before
and after the Rx path was selected. In some cases, the rx queue would
have been set up for vector Rx twice. Another scenario could occur where
first the queue was set up for vector rx, then the scalar path selected
but the vector rx setup would still persist. This of course would be
incorrect behaviour, so it has been fixed by removing the setup logic
that was before the path select code.
Fixes: 052ae311091c ("net/i40e: use the common Rx path selection infrastructure")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/i40e/i40e_rxtx.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/net/intel/i40e/i40e_rxtx.c b/drivers/net/intel/i40e/i40e_rxtx.c
index 4c0d12c179..434959e1c0 100644
--- a/drivers/net/intel/i40e/i40e_rxtx.c
+++ b/drivers/net/intel/i40e/i40e_rxtx.c
@@ -3356,17 +3356,6 @@ i40e_set_rx_function(struct rte_eth_dev *dev)
rx_simd_width = RTE_VECT_SIMD_DISABLED;
}
- if (rx_simd_width != RTE_VECT_SIMD_DISABLED) {
- for (i = 0; i < dev->data->nb_rx_queues; i++) {
- struct ci_rx_queue *rxq =
- dev->data->rx_queues[i];
-
- if (rxq && i40e_rxq_vec_setup(rxq)) {
- rx_simd_width = RTE_VECT_SIMD_DISABLED;
- break;
- }
- }
- }
req_features.simd_width = rx_simd_width;
if (dev->data->scattered_rx)
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 3/4] net/i40e: remove redundant vector Rx queue setup code
2025-09-02 10:48 ` [PATCH v2 0/4] Fixes for net/intel Rx Path Selection Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 1/4] net/i40e: fix supported offloads for Rx vector path Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 2/4] net/i40e: fix vector Rx queue set up logic Ciara Loftus
@ 2025-09-02 10:48 ` Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 4/4] net/iavf: remove duplicate in scalar offload list Ciara Loftus
3 siblings, 0 replies; 8+ messages in thread
From: Ciara Loftus @ 2025-09-02 10:48 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
Some assignments were being done twice:
1. Marking each rxq as a vector queue
2. Marking the device as vector allowed
This commit makes sure that these are only performed once.
Fixes: 052ae311091c ("net/i40e: use the common Rx path selection infrastructure")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/i40e/i40e_rxtx.c | 29 ++++-------------------------
1 file changed, 4 insertions(+), 25 deletions(-)
diff --git a/drivers/net/intel/i40e/i40e_rxtx.c b/drivers/net/intel/i40e/i40e_rxtx.c
index 434959e1c0..e22233daae 100644
--- a/drivers/net/intel/i40e/i40e_rxtx.c
+++ b/drivers/net/intel/i40e/i40e_rxtx.c
@@ -3338,7 +3338,7 @@ i40e_set_rx_function(struct rte_eth_dev *dev)
.rx_offloads = dev->data->dev_conf.rxmode.offloads,
.simd_width = RTE_VECT_SIMD_DISABLED,
};
- uint16_t vector_rx, i;
+ uint16_t i;
enum rte_vect_max_simd rx_simd_width = i40e_get_max_simd_bitwidth();
/* The primary process selects the rx path for all processes. */
@@ -3367,11 +3367,13 @@ i40e_set_rx_function(struct rte_eth_dev *dev)
&i40e_rx_path_infos[0],
RTE_DIM(i40e_rx_path_infos),
I40E_RX_DEFAULT);
- if (i40e_rx_path_infos[ad->rx_func_type].features.simd_width >= RTE_VECT_SIMD_128)
+ if (i40e_rx_path_infos[ad->rx_func_type].features.simd_width >= RTE_VECT_SIMD_128) {
/* Vector function selected. Prepare the rxq accordingly. */
for (i = 0; i < dev->data->nb_rx_queues; i++)
if (dev->data->rx_queues[i])
i40e_rxq_vec_setup(dev->data->rx_queues[i]);
+ ad->rx_vec_allowed = true;
+ }
if (i40e_rx_path_infos[ad->rx_func_type].features.simd_width >= RTE_VECT_SIMD_128 &&
i40e_rx_path_infos[ad->rx_func_type].features.simd_width <
@@ -3382,29 +3384,6 @@ i40e_set_rx_function(struct rte_eth_dev *dev)
dev->rx_pkt_burst = i40e_rx_path_infos[ad->rx_func_type].pkt_burst;
PMD_DRV_LOG(NOTICE, "Using %s (port %d).",
i40e_rx_path_infos[ad->rx_func_type].info, dev->data->port_id);
-
- /* Propagate information about RX function choice through all queues. */
- if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
- vector_rx =
- (dev->rx_pkt_burst == i40e_recv_scattered_pkts_vec ||
- dev->rx_pkt_burst == i40e_recv_pkts_vec ||
-#ifdef CC_AVX512_SUPPORT
- dev->rx_pkt_burst == i40e_recv_scattered_pkts_vec_avx512 ||
- dev->rx_pkt_burst == i40e_recv_pkts_vec_avx512 ||
-#endif
- dev->rx_pkt_burst == i40e_recv_scattered_pkts_vec_avx2 ||
- dev->rx_pkt_burst == i40e_recv_pkts_vec_avx2);
-
- for (i = 0; i < dev->data->nb_rx_queues; i++) {
- struct ci_rx_queue *rxq = dev->data->rx_queues[i];
-
- if (rxq)
- rxq->vector_rx = vector_rx;
- }
- }
-
- ad->rx_vec_allowed = i40e_rx_path_infos[ad->rx_func_type].features.simd_width >=
- RTE_VECT_SIMD_128;
}
int
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 4/4] net/iavf: remove duplicate in scalar offload list
2025-09-02 10:48 ` [PATCH v2 0/4] Fixes for net/intel Rx Path Selection Ciara Loftus
` (2 preceding siblings ...)
2025-09-02 10:48 ` [PATCH v2 3/4] net/i40e: remove redundant vector Rx queue setup code Ciara Loftus
@ 2025-09-02 10:48 ` Ciara Loftus
3 siblings, 0 replies; 8+ messages in thread
From: Ciara Loftus @ 2025-09-02 10:48 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The scatter offload was listed twice as a supported offload for the Rx
scalar path. Remove it.
Fixes: cd9889d90b84 ("net/iavf: use the common Rx path selection infrastructure")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/iavf/iavf_rxtx.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/intel/iavf/iavf_rxtx.h b/drivers/net/intel/iavf/iavf_rxtx.h
index 723c30d05b..10812533c2 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.h
+++ b/drivers/net/intel/iavf/iavf_rxtx.h
@@ -68,7 +68,6 @@
RTE_ETH_RX_OFFLOAD_SCATTER | \
RTE_ETH_RX_OFFLOAD_VLAN_FILTER | \
RTE_ETH_RX_OFFLOAD_VLAN_EXTEND | \
- RTE_ETH_RX_OFFLOAD_SCATTER | \
RTE_ETH_RX_OFFLOAD_RSS_HASH | \
RTE_ETH_RX_OFFLOAD_OUTER_UDP_CKSUM | \
RTE_ETH_RX_OFFLOAD_KEEP_CRC)
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-09-02 10:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-01 9:59 [PATCH] net/i40e: fix supported offloads for Rx vector path Ciara Loftus
2025-09-02 8:08 ` David Marchand
2025-09-02 10:24 ` Loftus, Ciara
2025-09-02 10:48 ` [PATCH v2 0/4] Fixes for net/intel Rx Path Selection Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 1/4] net/i40e: fix supported offloads for Rx vector path Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 2/4] net/i40e: fix vector Rx queue set up logic Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 3/4] net/i40e: remove redundant vector Rx queue setup code Ciara Loftus
2025-09-02 10:48 ` [PATCH v2 4/4] net/iavf: remove duplicate in scalar offload list Ciara Loftus
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).