* [PATCHv2 net] team: team should sync the port's uc/mc addrs when add a port
@ 2016-03-30 2:58 Xin Long
2016-03-30 21:07 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Xin Long @ 2016-03-30 2:58 UTC (permalink / raw)
To: network dev; +Cc: davem, Jiri Pirko, Marcelo Ricardo Leitner, Cong Wang
There is an issue when we use mavtap over team:
When we replug nic links from team0, the real nics's mc list will not
include the maddr for macvtap any more. then we can't receive pkts to
macvtap device, as they are filterred by mc list of nic.
In Bonding Driver, it syncs the uc/mc addrs in bond_enslave().
We will fix this issue on team by adding the port's uc/mc addrs sync in
team_port_add.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
drivers/net/team/team.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 26c64d2..a0f64cb 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1198,6 +1198,9 @@ static int team_port_add(struct team *team, struct net_device *port_dev)
goto err_dev_open;
}
+ dev_uc_sync_multiple(port_dev, dev);
+ dev_mc_sync_multiple(port_dev, dev);
+
err = vlan_vids_add_by_dev(port_dev, dev);
if (err) {
netdev_err(dev, "Failed to add vlan ids to device %s\n",
@@ -1261,6 +1264,8 @@ err_enable_netpoll:
vlan_vids_del_by_dev(port_dev, dev);
err_vids_add:
+ dev_uc_unsync(port_dev, dev);
+ dev_mc_unsync(port_dev, dev);
dev_close(port_dev);
err_dev_open:
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCHv2 net] team: team should sync the port's uc/mc addrs when add a port
2016-03-30 2:58 [PATCHv2 net] team: team should sync the port's uc/mc addrs when add a port Xin Long
@ 2016-03-30 21:07 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-03-30 21:07 UTC (permalink / raw)
To: lucien.xin; +Cc: netdev, jiri, marcelo.leitner, xiyou.wangcong
From: Xin Long <lucien.xin@gmail.com>
Date: Wed, 30 Mar 2016 10:58:39 +0800
> There is an issue when we use mavtap over team:
> When we replug nic links from team0, the real nics's mc list will not
> include the maddr for macvtap any more. then we can't receive pkts to
> macvtap device, as they are filterred by mc list of nic.
>
> In Bonding Driver, it syncs the uc/mc addrs in bond_enslave().
>
> We will fix this issue on team by adding the port's uc/mc addrs sync in
> team_port_add.
>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-30 21:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-30 2:58 [PATCHv2 net] team: team should sync the port's uc/mc addrs when add a port Xin Long
2016-03-30 21:07 ` David Miller
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).