netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] team: team should sync the port's uc/mc addrs when add a port
@ 2016-03-28 16:42 Xin Long
  2016-03-28 16:49 ` Marcelo Ricardo Leitner
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Xin Long @ 2016-03-28 16:42 UTC (permalink / raw)
  To: network dev; +Cc: davem, Jiri Pirko, Marcelo Ricardo Leitner

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 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 26c64d2..17ff367 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",
-- 
2.1.0

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

* Re: [PATCH net] team: team should sync the port's uc/mc addrs when add a port
  2016-03-28 16:42 [PATCH net] team: team should sync the port's uc/mc addrs when add a port Xin Long
@ 2016-03-28 16:49 ` Marcelo Ricardo Leitner
  2016-03-28 18:04 ` Jiri Pirko
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Marcelo Ricardo Leitner @ 2016-03-28 16:49 UTC (permalink / raw)
  To: Xin Long; +Cc: network dev, davem, Jiri Pirko

On Tue, Mar 29, 2016 at 12:42:31AM +0800, Xin Long wrote:
> 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>

Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

> ---
>  drivers/net/team/team.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
> index 26c64d2..17ff367 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",
> -- 
> 2.1.0
> 

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

* Re: [PATCH net] team: team should sync the port's uc/mc addrs when add a port
  2016-03-28 16:42 [PATCH net] team: team should sync the port's uc/mc addrs when add a port Xin Long
  2016-03-28 16:49 ` Marcelo Ricardo Leitner
@ 2016-03-28 18:04 ` Jiri Pirko
  2016-03-29  4:22 ` David Miller
  2016-03-29  4:56 ` Cong Wang
  3 siblings, 0 replies; 6+ messages in thread
From: Jiri Pirko @ 2016-03-28 18:04 UTC (permalink / raw)
  To: Xin Long; +Cc: network dev, davem, Marcelo Ricardo Leitner

Mon, Mar 28, 2016 at 06:42:31PM CEST, lucien.xin@gmail.com wrote:
>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>

Acked-by: Jiri Pirko <jiri@mellanox.com>

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

* Re: [PATCH net] team: team should sync the port's uc/mc addrs when add a port
  2016-03-28 16:42 [PATCH net] team: team should sync the port's uc/mc addrs when add a port Xin Long
  2016-03-28 16:49 ` Marcelo Ricardo Leitner
  2016-03-28 18:04 ` Jiri Pirko
@ 2016-03-29  4:22 ` David Miller
  2016-03-29  4:56 ` Cong Wang
  3 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2016-03-29  4:22 UTC (permalink / raw)
  To: lucien.xin; +Cc: netdev, jiri, marcelo.leitner

From: Xin Long <lucien.xin@gmail.com>
Date: Tue, 29 Mar 2016 00:42:31 +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, thank you.

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

* Re: [PATCH net] team: team should sync the port's uc/mc addrs when add a port
  2016-03-28 16:42 [PATCH net] team: team should sync the port's uc/mc addrs when add a port Xin Long
                   ` (2 preceding siblings ...)
  2016-03-29  4:22 ` David Miller
@ 2016-03-29  4:56 ` Cong Wang
  2016-03-29  8:50   ` Xin Long
  3 siblings, 1 reply; 6+ messages in thread
From: Cong Wang @ 2016-03-29  4:56 UTC (permalink / raw)
  To: Xin Long; +Cc: network dev, David Miller, Jiri Pirko, Marcelo Ricardo Leitner

On Mon, Mar 28, 2016 at 9:42 AM, Xin Long <lucien.xin@gmail.com> wrote:
> 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 | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
> index 26c64d2..17ff367 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);

You need to call dev_{uc,mc}_unsync() on error path, don't you?

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

* Re: [PATCH net] team: team should sync the port's uc/mc addrs when add a port
  2016-03-29  4:56 ` Cong Wang
@ 2016-03-29  8:50   ` Xin Long
  0 siblings, 0 replies; 6+ messages in thread
From: Xin Long @ 2016-03-29  8:50 UTC (permalink / raw)
  To: Cong Wang; +Cc: network dev, David Miller, Jiri Pirko, Marcelo Ricardo Leitner

On Tue, Mar 29, 2016 at 12:56 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> On Mon, Mar 28, 2016 at 9:42 AM, Xin Long <lucien.xin@gmail.com> wrote:
>> 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 | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
>> index 26c64d2..17ff367 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);
>
> You need to call dev_{uc,mc}_unsync() on error path, don't you?

I think so, I'm gonna post another patch as a fix for this one.
Thanks, Cong.

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

end of thread, other threads:[~2016-03-29  8:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-28 16:42 [PATCH net] team: team should sync the port's uc/mc addrs when add a port Xin Long
2016-03-28 16:49 ` Marcelo Ricardo Leitner
2016-03-28 18:04 ` Jiri Pirko
2016-03-29  4:22 ` David Miller
2016-03-29  4:56 ` Cong Wang
2016-03-29  8:50   ` Xin Long

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