patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix VLAN insertion in vector path
@ 2023-06-21  1:19 Wenzhuo Lu
  2023-06-28  6:57 ` Zhang, Qi Z
  2023-07-03  2:22 ` [PATCH v2] " Wenzhuo Lu
  0 siblings, 2 replies; 7+ messages in thread
From: Wenzhuo Lu @ 2023-06-21  1:19 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu, stable

As the VLAN insertion is partially supported in vector path,
the behavior is different in scalar and vector path.
For a VLAN packet, if using scalar path, the new VLAN tag will
be inserted after the original VLAN tag. If using vector path,
the new VLAN tag is inserted before the original VLAN tag.
To avoid any misleading, disable VLAN insertion in vector path.

Fixes: 059f18ae2aec ("net/iavf: add offload path for Tx AVX512")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/iavf/iavf_rxtx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 547b68f..2459c15 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -27,13 +27,13 @@
 #define IAVF_VPMD_TX_MAX_FREE_BUF 64
 
 #define IAVF_TX_NO_VECTOR_FLAGS (				 \
+		RTE_ETH_TX_OFFLOAD_VLAN_INSERT |		 \
+		RTE_ETH_TX_OFFLOAD_QINQ_INSERT |		 \
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |		 \
 		RTE_ETH_TX_OFFLOAD_SECURITY)
 
 #define IAVF_TX_VECTOR_OFFLOAD (				 \
-		RTE_ETH_TX_OFFLOAD_VLAN_INSERT |		 \
-		RTE_ETH_TX_OFFLOAD_QINQ_INSERT |		 \
 		RTE_ETH_TX_OFFLOAD_IPV4_CKSUM |		 \
 		RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |		 \
 		RTE_ETH_TX_OFFLOAD_UDP_CKSUM |		 \
-- 
1.8.3.1


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

* RE: [PATCH] net/iavf: fix VLAN insertion in vector path
  2023-06-21  1:19 [PATCH] net/iavf: fix VLAN insertion in vector path Wenzhuo Lu
@ 2023-06-28  6:57 ` Zhang, Qi Z
  2023-06-28  7:13   ` Lu, Wenzhuo
  2023-07-03  2:22 ` [PATCH v2] " Wenzhuo Lu
  1 sibling, 1 reply; 7+ messages in thread
From: Zhang, Qi Z @ 2023-06-28  6:57 UTC (permalink / raw)
  To: Lu, Wenzhuo, dev; +Cc: Lu, Wenzhuo, stable



> -----Original Message-----
> From: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Sent: Wednesday, June 21, 2023 9:19 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/iavf: fix VLAN insertion in vector path
>
> As the VLAN insertion is partially supported in vector path, the behavior is
> different in scalar and vector path.
> For a VLAN packet, if using scalar path, the new VLAN tag will be inserted after
> the original VLAN tag. If using vector path, the new VLAN tag is inserted before
> the original VLAN tag.
> To avoid any misleading, disable VLAN insertion in vector path.
>
> Fixes: 059f18ae2aec ("net/iavf: add offload path for Tx AVX512")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> ---
>  drivers/net/iavf/iavf_rxtx.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h index
> 547b68f..2459c15 100644
> --- a/drivers/net/iavf/iavf_rxtx.h
> +++ b/drivers/net/iavf/iavf_rxtx.h
> @@ -27,13 +27,13 @@
>  #define IAVF_VPMD_TX_MAX_FREE_BUF 64
>
>  #define IAVF_TX_NO_VECTOR_FLAGS (                             \
> +             RTE_ETH_TX_OFFLOAD_VLAN_INSERT |                 \
> +             RTE_ETH_TX_OFFLOAD_QINQ_INSERT |                 \
>               RTE_ETH_TX_OFFLOAD_MULTI_SEGS |          \
>               RTE_ETH_TX_OFFLOAD_TCP_TSO |             \
>               RTE_ETH_TX_OFFLOAD_SECURITY)
>
>  #define IAVF_TX_VECTOR_OFFLOAD (                              \
> -             RTE_ETH_TX_OFFLOAD_VLAN_INSERT |                 \
> -             RTE_ETH_TX_OFFLOAD_QINQ_INSERT |                 \
>               RTE_ETH_TX_OFFLOAD_IPV4_CKSUM |          \
>               RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |          \
>               RTE_ETH_TX_OFFLOAD_UDP_CKSUM |           \
> --
> 1.8.3.1

We may need to update the iavf.ini to claim VLAN offload is partially supported to align with this implementation.

VLAN offload         = P

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

* RE: [PATCH] net/iavf: fix VLAN insertion in vector path
  2023-06-28  6:57 ` Zhang, Qi Z
@ 2023-06-28  7:13   ` Lu, Wenzhuo
  2023-06-28  8:59     ` Zhang, Qi Z
  0 siblings, 1 reply; 7+ messages in thread
From: Lu, Wenzhuo @ 2023-06-28  7:13 UTC (permalink / raw)
  To: Zhang, Qi Z, dev; +Cc: stable

Hi Qi,

> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Wednesday, June 28, 2023 2:57 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org
> Subject: RE: [PATCH] net/iavf: fix VLAN insertion in vector path
> 
> We may need to update the iavf.ini to claim VLAN offload is partially
> supported to align with this implementation.
> 
> VLAN offload         = P
I mean the vector path cannot fully support this VLAN feature. With this patch, we use scalar path instead of vector path if VLAN feature is needed. It can be taken as fully supported.

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

* RE: [PATCH] net/iavf: fix VLAN insertion in vector path
  2023-06-28  7:13   ` Lu, Wenzhuo
@ 2023-06-28  8:59     ` Zhang, Qi Z
  2023-06-29  0:16       ` Lu, Wenzhuo
  0 siblings, 1 reply; 7+ messages in thread
From: Zhang, Qi Z @ 2023-06-28  8:59 UTC (permalink / raw)
  To: Lu, Wenzhuo, dev; +Cc: stable



> -----Original Message-----
> From: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> Sent: Wednesday, June 28, 2023 3:13 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: RE: [PATCH] net/iavf: fix VLAN insertion in vector path
> 
> Hi Qi,
> 
> > -----Original Message-----
> > From: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Sent: Wednesday, June 28, 2023 2:57 PM
> > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org
> > Subject: RE: [PATCH] net/iavf: fix VLAN insertion in vector path
> >
> > We may need to update the iavf.ini to claim VLAN offload is partially
> > supported to align with this implementation.
> >
> > VLAN offload         = P
> I mean the vector path cannot fully support this VLAN feature. With this patch,
> we use scalar path instead of vector path if VLAN feature is needed. It can be
> taken as fully supported.

Ok, the "P" flag has been explained as below in iavf.ini.

A feature with "P" indicates only be supported when non-vector path is selected.

And now we just disabled VLAN insertion in vector path, right?


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

* RE: [PATCH] net/iavf: fix VLAN insertion in vector path
  2023-06-28  8:59     ` Zhang, Qi Z
@ 2023-06-29  0:16       ` Lu, Wenzhuo
  0 siblings, 0 replies; 7+ messages in thread
From: Lu, Wenzhuo @ 2023-06-29  0:16 UTC (permalink / raw)
  To: Zhang, Qi Z, dev; +Cc: stable



> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Wednesday, June 28, 2023 4:59 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: RE: [PATCH] net/iavf: fix VLAN insertion in vector path
> 
> 
> 
> > -----Original Message-----
> > From: Lu, Wenzhuo <wenzhuo.lu@intel.com>
> > Sent: Wednesday, June 28, 2023 3:13 PM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>; dev@dpdk.org
> > Cc: stable@dpdk.org
> > Subject: RE: [PATCH] net/iavf: fix VLAN insertion in vector path
> >
> > Hi Qi,
> >
> > > -----Original Message-----
> > > From: Zhang, Qi Z <qi.z.zhang@intel.com>
> > > Sent: Wednesday, June 28, 2023 2:57 PM
> > > To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; dev@dpdk.org
> > > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org
> > > Subject: RE: [PATCH] net/iavf: fix VLAN insertion in vector path
> > >
> > > We may need to update the iavf.ini to claim VLAN offload is
> > > partially supported to align with this implementation.
> > >
> > > VLAN offload         = P
> > I mean the vector path cannot fully support this VLAN feature. With
> > this patch, we use scalar path instead of vector path if VLAN feature
> > is needed. It can be taken as fully supported.
> 
> Ok, the "P" flag has been explained as below in iavf.ini.
> 
> A feature with "P" indicates only be supported when non-vector path is
> selected.
> 
> And now we just disabled VLAN insertion in vector path, right?
Yes. We just disable the vector path to make behavior not changed.


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

* [PATCH v2] net/iavf: fix VLAN insertion in vector path
  2023-06-21  1:19 [PATCH] net/iavf: fix VLAN insertion in vector path Wenzhuo Lu
  2023-06-28  6:57 ` Zhang, Qi Z
@ 2023-07-03  2:22 ` Wenzhuo Lu
  2023-07-03  6:47   ` Zhang, Qi Z
  1 sibling, 1 reply; 7+ messages in thread
From: Wenzhuo Lu @ 2023-07-03  2:22 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu, stable

As the VLAN insertion is partially supported in vector path,
the behavior is different in scalar and vector path.
For a VLAN packet, if using scalar path, the new VLAN tag will
be inserted after the original VLAN tag. If using vector path,
the new VLAN tag is inserted before the original VLAN tag.
To avoid any misleading, disable VLAN insertion in vector path.

Fixes: 059f18ae2aec ("net/iavf: add offload path for Tx AVX512")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---

v2:
 - Updated iavf.ini.

 doc/guides/nics/features/iavf.ini | 2 +-
 drivers/net/iavf/iavf_rxtx.h      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/features/iavf.ini b/doc/guides/nics/features/iavf.ini
index fbb5b7d..55a0216 100644
--- a/doc/guides/nics/features/iavf.ini
+++ b/doc/guides/nics/features/iavf.ini
@@ -24,7 +24,7 @@ RSS key update       = Y
 RSS reta update      = Y
 VLAN filter          = Y
 CRC offload          = Y
-VLAN offload         = Y
+VLAN offload         = P
 L3 checksum offload  = Y
 L4 checksum offload  = Y
 Timestamp offload    = P
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 2bf2e32..8d4a772 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -27,13 +27,13 @@
 #define IAVF_VPMD_TX_MAX_FREE_BUF 64
 
 #define IAVF_TX_NO_VECTOR_FLAGS (				 \
+		RTE_ETH_TX_OFFLOAD_VLAN_INSERT |		 \
+		RTE_ETH_TX_OFFLOAD_QINQ_INSERT |		 \
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		 \
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |		 \
 		RTE_ETH_TX_OFFLOAD_SECURITY)
 
 #define IAVF_TX_VECTOR_OFFLOAD (				 \
-		RTE_ETH_TX_OFFLOAD_VLAN_INSERT |		 \
-		RTE_ETH_TX_OFFLOAD_QINQ_INSERT |		 \
 		RTE_ETH_TX_OFFLOAD_IPV4_CKSUM |		 \
 		RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |		 \
 		RTE_ETH_TX_OFFLOAD_UDP_CKSUM |		 \
-- 
1.8.3.1


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

* RE: [PATCH v2] net/iavf: fix VLAN insertion in vector path
  2023-07-03  2:22 ` [PATCH v2] " Wenzhuo Lu
@ 2023-07-03  6:47   ` Zhang, Qi Z
  0 siblings, 0 replies; 7+ messages in thread
From: Zhang, Qi Z @ 2023-07-03  6:47 UTC (permalink / raw)
  To: Lu, Wenzhuo, dev; +Cc: Lu, Wenzhuo, stable



> -----Original Message-----
> From: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Sent: Monday, July 3, 2023 10:22 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/iavf: fix VLAN insertion in vector path
>
> As the VLAN insertion is partially supported in vector path, the behavior is
> different in scalar and vector path.
> For a VLAN packet, if using scalar path, the new VLAN tag will be inserted after
> the original VLAN tag. If using vector path, the new VLAN tag is inserted before
> the original VLAN tag.
> To avoid any misleading, disable VLAN insertion in vector path.
>
> Fixes: 059f18ae2aec ("net/iavf: add offload path for Tx AVX512")
> Cc: stable@dpdk.org
>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2023-07-03  6:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21  1:19 [PATCH] net/iavf: fix VLAN insertion in vector path Wenzhuo Lu
2023-06-28  6:57 ` Zhang, Qi Z
2023-06-28  7:13   ` Lu, Wenzhuo
2023-06-28  8:59     ` Zhang, Qi Z
2023-06-29  0:16       ` Lu, Wenzhuo
2023-07-03  2:22 ` [PATCH v2] " Wenzhuo Lu
2023-07-03  6:47   ` Zhang, Qi Z

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).