diff mbox series

[v3,net-next,5/5] net: dsa: switch: Don't add CPU port to an mdb by default

Message ID 1510010818-23223-6-git-send-email-andrew@lunn.ch
State Changes Requested, archived
Delegated to: David Miller
Headers show
Series IGMP snooping for local traffic | expand

Commit Message

Andrew Lunn Nov. 6, 2017, 11:26 p.m. UTC
Now that the host indicates when a multicast group should be forwarded
from the switch to the host, don't do it by default.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 net/dsa/switch.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Sergei Shtylyov Nov. 7, 2017, 10:12 a.m. UTC | #1
Hello!

On 11/7/2017 2:26 AM, Andrew Lunn wrote:

> Now that the host indicates when a multicast group should be forwarded
> from the switch to the host, don't do it by default.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>   net/dsa/switch.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/dsa/switch.c b/net/dsa/switch.c
> index e6c06aa349a6..e95722036a45 100644
> --- a/net/dsa/switch.c
> +++ b/net/dsa/switch.c
> @@ -121,7 +121,7 @@ static int dsa_switch_mdb_add(struct dsa_switch *ds,
>   	if (ds->index == info->sw_index)
>   		set_bit(info->port, group);
>   	for (port = 0; port < ds->num_ports; port++)
> -		if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
> +		if (dsa_is_dsa_port(ds, port))
>   			set_bit(port, group);
>   
>   	if (switchdev_trans_ph_prepare(trans)) {
> @@ -141,6 +141,7 @@ static int dsa_switch_mdb_add(struct dsa_switch *ds,
>   	return 0;
>   }
>   
> +
>   static int dsa_switch_mdb_del(struct dsa_switch *ds,
>   			      struct dsa_notifier_mdb_info *info)
>   {

    Unrelated whitespace change?

MBR, Sergei
diff mbox series

Patch

diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index e6c06aa349a6..e95722036a45 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -121,7 +121,7 @@  static int dsa_switch_mdb_add(struct dsa_switch *ds,
 	if (ds->index == info->sw_index)
 		set_bit(info->port, group);
 	for (port = 0; port < ds->num_ports; port++)
-		if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
+		if (dsa_is_dsa_port(ds, port))
 			set_bit(port, group);
 
 	if (switchdev_trans_ph_prepare(trans)) {
@@ -141,6 +141,7 @@  static int dsa_switch_mdb_add(struct dsa_switch *ds,
 	return 0;
 }
 
+
 static int dsa_switch_mdb_del(struct dsa_switch *ds,
 			      struct dsa_notifier_mdb_info *info)
 {