Skip to content

Commit

Permalink
net/i40e: fix FDIR queue receives broadcast packets
Browse files Browse the repository at this point in the history
[ upstream commit c07aa47b6272cc14842af06e437cda870e867fbd ]

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

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

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
  • Loading branch information
beileix authored and kevintraynor committed Oct 31, 2023
1 parent cbc624f commit 1d231c0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions drivers/net/i40e/i40e_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5986,14 +5986,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 */
Expand Down

0 comments on commit 1d231c0

Please sign in to comment.