fm10k: ignore invalid multicast address entries
This change fixes an issue with adding an invalid multicast address using the iproute2 tool (ip maddr add <MADDR> dev <dev>). The iproute2 tool and the kernel do not validate or filter the multicast addresses when adding them to the multicast list. Thus, when synchronizing this list with an invalid entry, the action will be aborted with an error since the fm10k driver currently validates the list. Consequently, multicast entries beyond the invalid one will not be processed and communicated with the switch via the mailbox. This change makes it so that invalid addresses will simply be skipped and allows synchronizing the full list to proceed. Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
1a8782e59f
commit
745136a8b7
@ -923,18 +923,12 @@ static int __fm10k_mc_sync(struct net_device *dev,
|
||||
struct fm10k_intfc *interface = netdev_priv(dev);
|
||||
struct fm10k_hw *hw = &interface->hw;
|
||||
u16 vid, glort = interface->glort;
|
||||
s32 err;
|
||||
|
||||
if (!is_multicast_ether_addr(addr))
|
||||
return -EADDRNOTAVAIL;
|
||||
|
||||
/* update table with current entries */
|
||||
for (vid = hw->mac.default_vid ? fm10k_find_next_vlan(interface, 0) : 0;
|
||||
vid < VLAN_N_VID;
|
||||
vid = fm10k_find_next_vlan(interface, vid)) {
|
||||
err = hw->mac.ops.update_mc_addr(hw, glort, addr, vid, sync);
|
||||
if (err)
|
||||
return err;
|
||||
hw->mac.ops.update_mc_addr(hw, glort, addr, vid, sync);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user