patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix VLAN insertion
@ 2022-08-12  2:52 Yiding Zhou
  2022-08-12  2:57 ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Yiding Zhou @ 2022-08-12  2:52 UTC (permalink / raw)
  To: dev; +Cc: jingjing.wu, beilei.xing, stable, yidingx.zhou

When the PF driver tells the VF to insert VLAN tag using the L2TAG2 field,
vector Tx path does not use Tx context descriptor and would cause VLAN tag
inserted into the wrong location.

This commit is to fix the issue by using normal Tx path to handle L2TAG2 case.

Fixes: 3aa957338503 ("net/iavf: fix VLAN insert")
Cc: stable@dpdk.org

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_common.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h
index a59cb2ceee..4ab22c6b2b 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_common.h
+++ b/drivers/net/iavf/iavf_rxtx_vec_common.h
@@ -253,6 +253,9 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)
 	if (txq->offloads & IAVF_TX_NO_VECTOR_FLAGS)
 		return -1;
 
+	if (txq->vlan_flag == IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)
+		return -1;
+
 	if (txq->offloads & IAVF_TX_VECTOR_OFFLOAD)
 		return IAVF_VECTOR_OFFLOAD_PATH;
 
-- 
2.34.1


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

* RE: [PATCH] net/iavf: fix VLAN insertion
  2022-08-12  2:52 [PATCH] net/iavf: fix VLAN insertion Yiding Zhou
@ 2022-08-12  2:57 ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2022-08-12  2:57 UTC (permalink / raw)
  To: Zhou, YidingX, dev; +Cc: Wu, Jingjing, Xing, Beilei, stable, Zhou, YidingX



> -----Original Message-----
> From: Yiding Zhou <yidingx.zhou@intel.com>
> Sent: Friday, August 12, 2022 10:53 AM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>; stable@dpdk.org; Zhou, YidingX
> <yidingx.zhou@intel.com>
> Subject: [PATCH] net/iavf: fix VLAN insertion
> 
> When the PF driver tells the VF to insert VLAN tag using the L2TAG2 field,
> vector Tx path does not use Tx context descriptor and would cause VLAN tag
> inserted into the wrong location.
> 
> This commit is to fix the issue by using normal Tx path to handle L2TAG2 case.
> 
> Fixes: 3aa957338503 ("net/iavf: fix VLAN insert")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>

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

Applied to dpdk-next-net-intel.

Thanks
Qi


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

* [PATCH] net/iavf: fix VLAN insertion
@ 2022-08-12  2:08 Yiding Zhou
  0 siblings, 0 replies; 3+ messages in thread
From: Yiding Zhou @ 2022-08-12  2:08 UTC (permalink / raw)
  To: dev; +Cc: jingjing.wu, beilei.xing, stable, yidingx.zhou

When the driver tells the VF to insert VLAN tag using the L2TAG2 field,
vector Tx path does not use Tx context descriptor and would cause VLAN tag
inserted into the wrong location.

This commit is to fix issue by using normal Tx path to handle L2TAG2 case.

Fixes: 3aa957338503 ("net/iavf: fix VLAN insert")
Cc: stable@dpdk.org

Signed-off-by: Yiding Zhou <yidingx.zhou@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_common.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h
index a59cb2ceee..4ab22c6b2b 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_common.h
+++ b/drivers/net/iavf/iavf_rxtx_vec_common.h
@@ -253,6 +253,9 @@ iavf_tx_vec_queue_default(struct iavf_tx_queue *txq)
 	if (txq->offloads & IAVF_TX_NO_VECTOR_FLAGS)
 		return -1;
 
+	if (txq->vlan_flag == IAVF_TX_FLAGS_VLAN_TAG_LOC_L2TAG2)
+		return -1;
+
 	if (txq->offloads & IAVF_TX_VECTOR_OFFLOAD)
 		return IAVF_VECTOR_OFFLOAD_PATH;
 
-- 
2.34.1


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

end of thread, other threads:[~2022-08-12  2:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-12  2:52 [PATCH] net/iavf: fix VLAN insertion Yiding Zhou
2022-08-12  2:57 ` Zhang, Qi Z
  -- strict thread matches above, loose matches on Subject: below --
2022-08-12  2:08 Yiding Zhou

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