lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190612232552.pzsp5rdadlaiht2n@shell.armlinux.org.uk>
Date:   Thu, 13 Jun 2019 00:25:52 +0100
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Vivien Didelot <vivien.didelot@...il.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        andrew@...n.ch, f.fainelli@...il.com
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: do not flood CPU with
 unknown multicast

On Wed, Jun 12, 2019 at 06:33:44PM -0400, Vivien Didelot wrote:
> The DSA ports must flood unknown unicast and multicast, but the switch
> must not flood the CPU ports with unknown multicast, as this results
> in a lot of undesirable traffic that the network stack needs to filter
> in software.

What if you have configured IPv6 on the bridge device, and are expecting
the multicasted IPv6 frames for neighbour discovery to work?

> 
> Signed-off-by: Vivien Didelot <vivien.didelot@...il.com>
> ---
>  drivers/net/dsa/mv88e6xxx/chip.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index d8d1781810e2..e412ccabd104 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -2111,15 +2111,13 @@ static int mv88e6xxx_setup_message_port(struct mv88e6xxx_chip *chip, int port)
>  static int mv88e6xxx_setup_egress_floods(struct mv88e6xxx_chip *chip, int port)
>  {
>  	struct dsa_switch *ds = chip->ds;
> -	bool flood;
> +	bool uc = dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port);
> +	bool mc = dsa_is_dsa_port(ds, port);
>  
> -	/* Upstream ports flood frames with unknown unicast or multicast DA */
> -	flood = dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port);
> -	if (chip->info->ops->port_set_egress_floods)
> -		return chip->info->ops->port_set_egress_floods(chip, port,
> -							       flood, flood);
> +	if (!chip->info->ops->port_set_egress_floods)
> +		return 0;
>  
> -	return 0;
> +	return chip->info->ops->port_set_egress_floods(chip, port, uc, mc);
>  }
>  
>  static int mv88e6xxx_serdes_power(struct mv88e6xxx_chip *chip, int port,
> -- 
> 2.21.0
> 
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ