netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] ionic: don't remove netdev->dev_addr when syncing uc list
@ 2021-10-08 19:38 Shannon Nelson
  2021-10-09 11:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Shannon Nelson @ 2021-10-08 19:38 UTC (permalink / raw)
  To: davem, netdev, kuba; +Cc: drivers, jtoppins, Shannon Nelson

Bridging, and possibly other upper stack gizmos, adds the
lower device's netdev->dev_addr to its own uc list, and
then requests it be deleted when the upper bridge device is
removed.  This delete request also happens with the bridging
vlan_filtering is enabled and then disabled.

Bonding has a similar behavior with the uc list, but since it
also uses set_mac to manage netdev->dev_addr, it doesn't have
the same the failure case.

Because we store our netdev->dev_addr in our uc list, we need
to ignore the delete request from dev_uc_sync so as to not
lose the address and all hope of communicating.  Note that
ndo_set_mac_address is expressly changing netdev->dev_addr,
so no limitation is set there.

Fixes: 2a654540be10 ("ionic: Add Rx filter and rx_mode ndo support")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index ccf3ffcd3939..7f3322ce044c 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -1379,6 +1379,10 @@ static int ionic_addr_add(struct net_device *netdev, const u8 *addr)
 
 static int ionic_addr_del(struct net_device *netdev, const u8 *addr)
 {
+	/* Don't delete our own address from the uc list */
+	if (ether_addr_equal(addr, netdev->dev_addr))
+		return 0;
+
 	return ionic_lif_list_addr(netdev_priv(netdev), addr, DEL_ADDR);
 }
 
-- 
2.17.1


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

* Re: [PATCH net] ionic: don't remove netdev->dev_addr when syncing uc list
  2021-10-08 19:38 [PATCH net] ionic: don't remove netdev->dev_addr when syncing uc list Shannon Nelson
@ 2021-10-09 11:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-09 11:00 UTC (permalink / raw)
  To: Shannon Nelson; +Cc: davem, netdev, kuba, drivers, jtoppins

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Fri,  8 Oct 2021 12:38:01 -0700 you wrote:
> Bridging, and possibly other upper stack gizmos, adds the
> lower device's netdev->dev_addr to its own uc list, and
> then requests it be deleted when the upper bridge device is
> removed.  This delete request also happens with the bridging
> vlan_filtering is enabled and then disabled.
> 
> Bonding has a similar behavior with the uc list, but since it
> also uses set_mac to manage netdev->dev_addr, it doesn't have
> the same the failure case.
> 
> [...]

Here is the summary with links:
  - [net] ionic: don't remove netdev->dev_addr when syncing uc list
    https://git.kernel.org/netdev/net/c/5c976a56570f

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-10-09 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 19:38 [PATCH net] ionic: don't remove netdev->dev_addr when syncing uc list Shannon Nelson
2021-10-09 11:00 ` patchwork-bot+netdevbpf

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