* [PATCH 0/3] Fixes for iavf Tx path selection
@ 2025-09-04 10:44 Ciara Loftus
2025-09-04 10:44 ` [PATCH 1/3] net/iavf: fix Tx vector path selection logic again Ciara Loftus
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Ciara Loftus @ 2025-09-04 10:44 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
This is a series of fixes for the iavf driver concerning Tx path
selection. The first patch fixes the logic for selecting the Tx
vector path, which was recently fixed but broken again by another
commit. The second patch updates a log and the third ensures the
fastest path is selected for VLAN offload regardless of VLAN tag
location (L2TAG1 or L2TAG2).
Ciara Loftus (3):
net/iavf: fix Tx vector path selection logic again
net/iavf: fix a log during Tx path selection
net/iavf: fix Tx path selection for VLAN offload
drivers/net/intel/iavf/iavf_rxtx.c | 4 ++--
drivers/net/intel/iavf/iavf_rxtx.h | 1 -
drivers/net/intel/iavf/iavf_rxtx_vec_common.h | 23 +++++++++++--------
3 files changed, 15 insertions(+), 13 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] net/iavf: fix Tx vector path selection logic again
2025-09-04 10:44 [PATCH 0/3] Fixes for iavf Tx path selection Ciara Loftus
@ 2025-09-04 10:44 ` Ciara Loftus
2025-09-04 16:59 ` Bruce Richardson
2025-09-04 10:44 ` [PATCH 2/3] net/iavf: fix a log during Tx path selection Ciara Loftus
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Ciara Loftus @ 2025-09-04 10:44 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
Commit b39aeea703b8 ("net/iavf: fix Tx vector path selection logic")
fixed an issue which caused the scalar path to be chosen even when the
AVX-512 path could have been a viable candidate. The commit
be1a887b83cd ("net/iavf: use the new common vector capability function")
accidentally undid this fix, so this commit fixes this again, this time
in a new way due to the changed code landscape since the last fix.
Fixes: be1a887b83cd ("net/iavf: use the new common vector capability function")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/iavf/iavf_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index ab44558a85..ce0a12c348 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -4090,7 +4090,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
dev->data->port_id);
tx_func_type = IAVF_TX_SSE;
}
- if (use_avx2) {
+ if (!use_avx512 && use_avx2) {
if (check_ret == IAVF_VECTOR_PATH) {
tx_func_type = IAVF_TX_AVX2;
PMD_DRV_LOG(DEBUG, "Using AVX2 Vector Tx (port %d).",
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] net/iavf: fix a log during Tx path selection
2025-09-04 10:44 [PATCH 0/3] Fixes for iavf Tx path selection Ciara Loftus
2025-09-04 10:44 ` [PATCH 1/3] net/iavf: fix Tx vector path selection logic again Ciara Loftus
@ 2025-09-04 10:44 ` Ciara Loftus
2025-09-04 17:00 ` Bruce Richardson
2025-09-04 10:44 ` [PATCH 3/3] net/iavf: fix Tx path selection for VLAN offload Ciara Loftus
2025-09-04 17:18 ` [PATCH 0/3] Fixes for iavf Tx path selection Bruce Richardson
3 siblings, 1 reply; 8+ messages in thread
From: Ciara Loftus @ 2025-09-04 10:44 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
The vector offload context path is now selected for outerchecksum and
qinq insert offloads. Update logging to reflect this.
Fixes: abca31f780e1 ("net/iavf: support VLAN insertion for the AVX-512 path")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/iavf/iavf_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index ce0a12c348..5b46fa724c 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -4097,7 +4097,7 @@ iavf_set_tx_function(struct rte_eth_dev *dev)
dev->data->port_id);
} else if (check_ret == IAVF_VECTOR_CTX_OFFLOAD_PATH) {
PMD_DRV_LOG(DEBUG,
- "AVX2 does not support outer checksum offload.");
+ "AVX2 does not support requested Tx offloads.");
goto normal;
} else {
tx_func_type = IAVF_TX_AVX2_OFFLOAD;
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] net/iavf: fix Tx path selection for VLAN offload
2025-09-04 10:44 [PATCH 0/3] Fixes for iavf Tx path selection Ciara Loftus
2025-09-04 10:44 ` [PATCH 1/3] net/iavf: fix Tx vector path selection logic again Ciara Loftus
2025-09-04 10:44 ` [PATCH 2/3] net/iavf: fix a log during Tx path selection Ciara Loftus
@ 2025-09-04 10:44 ` Ciara Loftus
2025-09-04 17:10 ` Bruce Richardson
2025-09-04 17:18 ` [PATCH 0/3] Fixes for iavf Tx path selection Bruce Richardson
3 siblings, 1 reply; 8+ messages in thread
From: Ciara Loftus @ 2025-09-04 10:44 UTC (permalink / raw)
To: dev; +Cc: Ciara Loftus
For the vlan insert offload a different tx vector offload path is
required depending on where the tag must be placed in the descriptor
which can vary from one VF to another. Some VFs use the L2TAG2 field
which requires the use of a context descriptor. Adjust the logic for
selecting the tx path so that the correct path is used for each vlan tag
location. Before this fix, if the tag was to be put in the L2TAG1 field,
the scalar path was always used which was incorrect, because the AVX-512
vector path also supports this offload.
Fixes: abca31f780e1 ("net/iavf: support VLAN insertion for the AVX-512 path")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
drivers/net/intel/iavf/iavf_rxtx.h | 1 -
drivers/net/intel/iavf/iavf_rxtx_vec_common.h | 23 +++++++++++--------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/net/intel/iavf/iavf_rxtx.h b/drivers/net/intel/iavf/iavf_rxtx.h
index 723c30d05b..a499141049 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.h
+++ b/drivers/net/intel/iavf/iavf_rxtx.h
@@ -53,7 +53,6 @@
#define IAVF_TX_VECTOR_OFFLOAD_CTX ( \
RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM | \
- RTE_ETH_TX_OFFLOAD_VLAN_INSERT | \
RTE_ETH_TX_OFFLOAD_QINQ_INSERT)
#define IAVF_RX_NO_OFFLOADS 0
diff --git a/drivers/net/intel/iavf/iavf_rxtx_vec_common.h b/drivers/net/intel/iavf/iavf_rxtx_vec_common.h
index a3688baf4b..f513777663 100644
--- a/drivers/net/intel/iavf/iavf_rxtx_vec_common.h
+++ b/drivers/net/intel/iavf/iavf_rxtx_vec_common.h
@@ -73,6 +73,8 @@ iavf_rx_vec_queue_default(struct ci_rx_queue *rxq)
static inline int
iavf_tx_vec_queue_default(struct ci_tx_queue *txq)
{
+ bool vlan_offload = false, vlan_needs_ctx = false;
+
if (!txq)
return -1;
@@ -88,20 +90,21 @@ iavf_tx_vec_queue_default(struct ci_tx_queue *txq)
return IAVF_VECTOR_CTX_PATH;
}
+ /* Vlan tci needs to be inserted via ctx desc, if the vlan_flag is L2TAG2. */
+ if (txq->offloads & RTE_ETH_TX_OFFLOAD_VLAN_INSERT) {
+ vlan_offload = true;
+ if (txq->vlan_flag == IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)
+ vlan_needs_ctx = true;
+ }
+
/**
- * Vlan tci needs to be inserted via ctx desc, if the vlan_flag is L2TAG2.
* Tunneling parameters and other fields need be configured in ctx desc
* if the outer checksum offload is enabled.
*/
- if (txq->offloads & (IAVF_TX_VECTOR_OFFLOAD | IAVF_TX_VECTOR_OFFLOAD_CTX)) {
- if (txq->offloads & IAVF_TX_VECTOR_OFFLOAD_CTX) {
- if (txq->vlan_flag == IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2 ||
- txq->offloads & RTE_ETH_TX_OFFLOAD_QINQ_INSERT) {
- txq->use_ctx = 1;
- return IAVF_VECTOR_CTX_OFFLOAD_PATH;
- } else {
- return -1;
- }
+ if (txq->offloads & (IAVF_TX_VECTOR_OFFLOAD | IAVF_TX_VECTOR_OFFLOAD_CTX) || vlan_offload) {
+ if (txq->offloads & IAVF_TX_VECTOR_OFFLOAD_CTX || vlan_needs_ctx) {
+ txq->use_ctx = 1;
+ return IAVF_VECTOR_CTX_OFFLOAD_PATH;
} else {
return IAVF_VECTOR_OFFLOAD_PATH;
}
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] net/iavf: fix Tx vector path selection logic again
2025-09-04 10:44 ` [PATCH 1/3] net/iavf: fix Tx vector path selection logic again Ciara Loftus
@ 2025-09-04 16:59 ` Bruce Richardson
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2025-09-04 16:59 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Thu, Sep 04, 2025 at 10:44:38AM +0000, Ciara Loftus wrote:
> Commit b39aeea703b8 ("net/iavf: fix Tx vector path selection logic")
> fixed an issue which caused the scalar path to be chosen even when the
> AVX-512 path could have been a viable candidate. The commit
> be1a887b83cd ("net/iavf: use the new common vector capability function")
> accidentally undid this fix, so this commit fixes this again, this time
> in a new way due to the changed code landscape since the last fix.
>
> Fixes: be1a887b83cd ("net/iavf: use the new common vector capability function")
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Will squash into existing commit on next-net-intel.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] net/iavf: fix a log during Tx path selection
2025-09-04 10:44 ` [PATCH 2/3] net/iavf: fix a log during Tx path selection Ciara Loftus
@ 2025-09-04 17:00 ` Bruce Richardson
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2025-09-04 17:00 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Thu, Sep 04, 2025 at 10:44:39AM +0000, Ciara Loftus wrote:
> The vector offload context path is now selected for outerchecksum and
> qinq insert offloads. Update logging to reflect this.
>
> Fixes: abca31f780e1 ("net/iavf: support VLAN insertion for the AVX-512 path")
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
> drivers/net/intel/iavf/iavf_rxtx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Will squash into commit on next-net-intel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] net/iavf: fix Tx path selection for VLAN offload
2025-09-04 10:44 ` [PATCH 3/3] net/iavf: fix Tx path selection for VLAN offload Ciara Loftus
@ 2025-09-04 17:10 ` Bruce Richardson
0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2025-09-04 17:10 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Thu, Sep 04, 2025 at 10:44:40AM +0000, Ciara Loftus wrote:
> For the vlan insert offload a different tx vector offload path is
> required depending on where the tag must be placed in the descriptor
> which can vary from one VF to another. Some VFs use the L2TAG2 field
> which requires the use of a context descriptor. Adjust the logic for
> selecting the tx path so that the correct path is used for each vlan tag
> location. Before this fix, if the tag was to be put in the L2TAG1 field,
> the scalar path was always used which was incorrect, because the AVX-512
> vector path also supports this offload.
>
> Fixes: abca31f780e1 ("net/iavf: support VLAN insertion for the AVX-512 path")
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
> drivers/net/intel/iavf/iavf_rxtx.h | 1 -
> drivers/net/intel/iavf/iavf_rxtx_vec_common.h | 23 +++++++++++--------
> 2 files changed, 13 insertions(+), 11 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Will squash into commit on next-net-intel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] Fixes for iavf Tx path selection
2025-09-04 10:44 [PATCH 0/3] Fixes for iavf Tx path selection Ciara Loftus
` (2 preceding siblings ...)
2025-09-04 10:44 ` [PATCH 3/3] net/iavf: fix Tx path selection for VLAN offload Ciara Loftus
@ 2025-09-04 17:18 ` Bruce Richardson
3 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2025-09-04 17:18 UTC (permalink / raw)
To: Ciara Loftus; +Cc: dev
On Thu, Sep 04, 2025 at 10:44:37AM +0000, Ciara Loftus wrote:
> This is a series of fixes for the iavf driver concerning Tx path
> selection. The first patch fixes the logic for selecting the Tx
> vector path, which was recently fixed but broken again by another
> commit. The second patch updates a log and the third ensures the
> fastest path is selected for VLAN offload regardless of VLAN tag
> location (L2TAG1 or L2TAG2).
>
> Ciara Loftus (3):
> net/iavf: fix Tx vector path selection logic again
> net/iavf: fix a log during Tx path selection
> net/iavf: fix Tx path selection for VLAN offload
>
> drivers/net/intel/iavf/iavf_rxtx.c | 4 ++--
> drivers/net/intel/iavf/iavf_rxtx.h | 1 -
> drivers/net/intel/iavf/iavf_rxtx_vec_common.h | 23 +++++++++++--------
> 3 files changed, 15 insertions(+), 13 deletions(-)
>
> --
Series applied and squashed into next-net-intel
/Bruce
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-09-04 17:18 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-04 10:44 [PATCH 0/3] Fixes for iavf Tx path selection Ciara Loftus
2025-09-04 10:44 ` [PATCH 1/3] net/iavf: fix Tx vector path selection logic again Ciara Loftus
2025-09-04 16:59 ` Bruce Richardson
2025-09-04 10:44 ` [PATCH 2/3] net/iavf: fix a log during Tx path selection Ciara Loftus
2025-09-04 17:00 ` Bruce Richardson
2025-09-04 10:44 ` [PATCH 3/3] net/iavf: fix Tx path selection for VLAN offload Ciara Loftus
2025-09-04 17:10 ` Bruce Richardson
2025-09-04 17:18 ` [PATCH 0/3] Fixes for iavf Tx path selection 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).