patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/i40e: fix FDIR Rxq receives broadcast packets
@ 2023-07-21  5:29 beilei.xing
  2023-07-21  5:35 ` [PATCH v2] " beilei.xing
  0 siblings, 1 reply; 4+ messages in thread
From: beilei.xing @ 2023-07-21  5:29 UTC (permalink / raw)
  To: jingjing.wu, yuying.zhang; +Cc: dev, Beilei Xing, stable

From: Beilei Xing <beilei.xing@intel.com>

FDIR Rxq is excepted to only reveive FDIR programming status, won't
receive broadcast packets.

Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index cb0070f94b..0ff334745d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -6006,14 +6006,16 @@ i40e_vsi_setup(struct i40e_pf *pf,
 		}
 	}
 
-	/* MAC/VLAN configuration */
-	rte_memcpy(&filter.mac_addr, &broadcast, RTE_ETHER_ADDR_LEN);
-	filter.filter_type = I40E_MACVLAN_PERFECT_MATCH;
+	if (vsi->type != I40E_VSI_FDIR) {
+		/* MAC/VLAN configuration for non-FDIR VSI*/
+		rte_memcpy(&filter.mac_addr, &broadcast, RTE_ETHER_ADDR_LEN);
+		filter.filter_type = I40E_MACVLAN_PERFECT_MATCH;
 
-	ret = i40e_vsi_add_mac(vsi, &filter);
-	if (ret != I40E_SUCCESS) {
-		PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter");
-		goto fail_msix_alloc;
+		ret = i40e_vsi_add_mac(vsi, &filter);
+		if (ret != I40E_SUCCESS) {
+			PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter");
+			goto fail_msix_alloc;
+		}
 	}
 
 	/* Get VSI BW information */
-- 
2.26.2


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

* [PATCH v2] net/i40e: fix FDIR Rxq receives broadcast packets
  2023-07-21  5:29 [PATCH] net/i40e: fix FDIR Rxq receives broadcast packets beilei.xing
@ 2023-07-21  5:35 ` beilei.xing
  2023-07-21  6:45   ` Wu, Jingjing
  0 siblings, 1 reply; 4+ messages in thread
From: beilei.xing @ 2023-07-21  5:35 UTC (permalink / raw)
  To: jingjing.wu, yuying.zhang; +Cc: dev, Beilei Xing, stable

From: Beilei Xing <beilei.xing@intel.com>

FDIR Rxq is excepted to only receive FDIR programming status, won't
receive broadcast packets.

Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
V2 change:
 - Fix typo in commit log.

 drivers/net/i40e/i40e_ethdev.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 8271bbb394..7b4f33a5cf 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -6025,14 +6025,16 @@ i40e_vsi_setup(struct i40e_pf *pf,
 		}
 	}
 
-	/* MAC/VLAN configuration */
-	rte_memcpy(&filter.mac_addr, &broadcast, RTE_ETHER_ADDR_LEN);
-	filter.filter_type = I40E_MACVLAN_PERFECT_MATCH;
+	if (vsi->type != I40E_VSI_FDIR) {
+		/* MAC/VLAN configuration for non-FDIR VSI*/
+		rte_memcpy(&filter.mac_addr, &broadcast, RTE_ETHER_ADDR_LEN);
+		filter.filter_type = I40E_MACVLAN_PERFECT_MATCH;
 
-	ret = i40e_vsi_add_mac(vsi, &filter);
-	if (ret != I40E_SUCCESS) {
-		PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter");
-		goto fail_msix_alloc;
+		ret = i40e_vsi_add_mac(vsi, &filter);
+		if (ret != I40E_SUCCESS) {
+			PMD_DRV_LOG(ERR, "Failed to add MACVLAN filter");
+			goto fail_msix_alloc;
+		}
 	}
 
 	/* Get VSI BW information */
-- 
2.26.2


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

* RE: [PATCH v2] net/i40e: fix FDIR Rxq receives broadcast packets
  2023-07-21  5:35 ` [PATCH v2] " beilei.xing
@ 2023-07-21  6:45   ` Wu, Jingjing
  2023-08-14  1:03     ` Zhang, Qi Z
  0 siblings, 1 reply; 4+ messages in thread
From: Wu, Jingjing @ 2023-07-21  6:45 UTC (permalink / raw)
  To: Xing, Beilei, Zhang, Yuying; +Cc: dev, stable



> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Friday, July 21, 2023 1:35 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Zhang, Yuying <yuying.zhang@intel.com>
> Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; stable@dpdk.org
> Subject: [PATCH v2] net/i40e: fix FDIR Rxq receives broadcast packets
> 
> From: Beilei Xing <beilei.xing@intel.com>
> 
> FDIR Rxq is excepted to only receive FDIR programming status, won't
> receive broadcast packets.
> 
> Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>

Acked-by: Jingjing Wu <jingjing.wu@intel.com>

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

* RE: [PATCH v2] net/i40e: fix FDIR Rxq receives broadcast packets
  2023-07-21  6:45   ` Wu, Jingjing
@ 2023-08-14  1:03     ` Zhang, Qi Z
  0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2023-08-14  1:03 UTC (permalink / raw)
  To: Wu, Jingjing, Xing, Beilei, Zhang, Yuying; +Cc: dev, stable



> -----Original Message-----
> From: Wu, Jingjing <jingjing.wu@intel.com>
> Sent: Friday, July 21, 2023 2:46 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Yuying
> <yuying.zhang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH v2] net/i40e: fix FDIR Rxq receives broadcast packets
> 
> 
> 
> > -----Original Message-----
> > From: Xing, Beilei <beilei.xing@intel.com>
> > Sent: Friday, July 21, 2023 1:35 PM
> > To: Wu, Jingjing <jingjing.wu@intel.com>; Zhang, Yuying
> > <yuying.zhang@intel.com>
> > Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>;
> > stable@dpdk.org
> > Subject: [PATCH v2] net/i40e: fix FDIR Rxq receives broadcast packets
> >
> > From: Beilei Xing <beilei.xing@intel.com>
> >
> > FDIR Rxq is excepted to only receive FDIR programming status, won't
> > receive broadcast packets.
> >
> > Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> 
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

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

end of thread, other threads:[~2023-08-14  1:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-21  5:29 [PATCH] net/i40e: fix FDIR Rxq receives broadcast packets beilei.xing
2023-07-21  5:35 ` [PATCH v2] " beilei.xing
2023-07-21  6:45   ` Wu, Jingjing
2023-08-14  1:03     ` 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).