netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Vivien Didelot <vivien.didelot@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	andrew@lunn.ch, f.fainelli@gmail.com
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: do not flood CPU with unknown multicast
Date: Thu, 13 Jun 2019 00:25:52 +0100	[thread overview]
Message-ID: <20190612232552.pzsp5rdadlaiht2n@shell.armlinux.org.uk> (raw)
In-Reply-To: <20190612223344.28781-1-vivien.didelot@gmail.com>

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@gmail.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

  reply	other threads:[~2019-06-13 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 22:33 [PATCH net-next] net: dsa: mv88e6xxx: do not flood CPU with unknown multicast Vivien Didelot
2019-06-12 23:25 ` Russell King - ARM Linux admin [this message]
2019-06-13  1:56   ` Vivien Didelot
2019-06-15 20:25 ` David Miller
2019-06-15 20:28   ` Russell King - ARM Linux admin
2019-06-15 20:35     ` David Miller
2019-06-15 22:26       ` Vivien Didelot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190612232552.pzsp5rdadlaiht2n@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).