Skip to contentSkip to conversation

net/i40e: fix FDIR Rxq receives broadcast packets

PATCH Superseded [email protected] 3 participants 4 messages Jul 21, 2023 – Aug 14, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/i40e: fix FDIR Rxq receives broadcast packets

From: Beilei Xing <[email protected]>

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

Fixes a778a1fa2e4e ("i40e: set up and initialize flow director")
---
 drivers/net/i40e/i40e_ethdev.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
drivers/net/i40e/i40e_ethdev.c +9 -7
index cb0070f94b..0ff334745d 100644
@@ -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 */
Signature · 1 line
2.26.2
#1 lore raw

PATCH v2 1/1 net/i40e: fix FDIR Rxq receives broadcast packets

From: Beilei Xing <[email protected]>

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

Fixes a778a1fa2e4e ("i40e: set up and initialize flow director")

---
V2 change:
- Fix typo in commit log.

 drivers/net/i40e/i40e_ethdev.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
drivers/net/i40e/i40e_ethdev.c +9 -7
index 8271bbb394..7b4f33a5cf 100644
@@ -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 */
Signature · 1 line
2.26.2
Acked-by on v2 1/1
#2 lore raw
Quoted 11 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Friday, July 21, 2023 1:35 PM
To: Wu, Jingjing <[email protected]>; Zhang, Yuying <[email protected]>
Cc: [email protected]; Xing, Beilei <[email protected]>; [email protected]
Subject: [PATCH v2] net/i40e: fix FDIR Rxq receives broadcast packets

From: Beilei Xing <[email protected]>

Quoted 7 lines

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

Fixes a778a1fa2e4e ("i40e: set up and initialize flow director")
Applied
#3 lore raw
Quoted 26 lines

-----Original Message-----
From: Wu, Jingjing <[email protected]>
Sent: Friday, July 21, 2023 2:46 PM
To: Xing, Beilei <[email protected]>; Zhang, Yuying <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH v2] net/i40e: fix FDIR Rxq receives broadcast packets

Quoted 14 lines

-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Friday, July 21, 2023 1:35 PM
To: Wu, Jingjing <[email protected]>; Zhang, Yuying <[email protected]>
Cc: [email protected]; Xing, Beilei <[email protected]>; [email protected]
Subject: [PATCH v2] net/i40e: fix FDIR Rxq receives broadcast packets

From: Beilei Xing <[email protected]>

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

Quoted 6 lines
Quoted 4 lines
Fixes a778a1fa2e4e ("i40e: set up and initialize flow director")

Applied to dpdk-next-net-intel.

Thanks
Qi