Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 422efd03 authored by Vivien Didelot's avatar Vivien Didelot Committed by David S. Miller
Browse files

net: dsa: mv88e6xxx: do not flood CPU with unknown multicast



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.

Signed-off-by: default avatarVivien Didelot <vivien.didelot@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 877cd9ff
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -2058,15 +2058,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;

	/* 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);
	bool uc = dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port);
	bool mc = dsa_is_dsa_port(ds, port);

	if (!chip->info->ops->port_set_egress_floods)
		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,