Commit 9b9311af authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'dsa-cpu-flood'



Vladimir Oltean says:

====================
Always flood multicast to the DSA CPU port

Discussing with Qingfang, it became obvious that DSA is not prepared to
disable multicast flooding towards the CPU port under any circumstance
right now, and this in fact breaks traffic quite blatantly.

This series is a revert done in reverse chronological order. These
should be propagated to stable trees up to commit a8b659e7 ("net:
dsa: act as passthrough for bridge port flags") which is in v5.12.
For older kernels, that commit blocks further backporting, so I need to
send a modified version of patch 3 separately to Greg after these go
into "net".

v1->v2: delete unused b53_set_mrouter function prototype
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 3bacbe04 c73c5708
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -2016,15 +2016,6 @@ int b53_br_flags(struct dsa_switch *ds, int port,
}
EXPORT_SYMBOL(b53_br_flags);

int b53_set_mrouter(struct dsa_switch *ds, int port, bool mrouter,
		    struct netlink_ext_ack *extack)
{
	b53_port_set_mcast_flood(ds->priv, port, mrouter);

	return 0;
}
EXPORT_SYMBOL(b53_set_mrouter);

static bool b53_possible_cpu_port(struct dsa_switch *ds, int port)
{
	/* Broadcom switches will accept enabling Broadcom tags on the
@@ -2268,7 +2259,6 @@ static const struct dsa_switch_ops b53_switch_ops = {
	.port_bridge_leave	= b53_br_leave,
	.port_pre_bridge_flags	= b53_br_flags_pre,
	.port_bridge_flags	= b53_br_flags,
	.port_set_mrouter	= b53_set_mrouter,
	.port_stp_state_set	= b53_br_set_stp_state,
	.port_fast_age		= b53_br_fast_age,
	.port_vlan_filtering	= b53_vlan_filtering,
+0 −2
Original line number Diff line number Diff line
@@ -328,8 +328,6 @@ int b53_br_flags_pre(struct dsa_switch *ds, int port,
int b53_br_flags(struct dsa_switch *ds, int port,
		 struct switchdev_brport_flags flags,
		 struct netlink_ext_ack *extack);
int b53_set_mrouter(struct dsa_switch *ds, int port, bool mrouter,
		    struct netlink_ext_ack *extack);
int b53_setup_devlink_resources(struct dsa_switch *ds);
void b53_port_event(struct dsa_switch *ds, int port);
void b53_phylink_validate(struct dsa_switch *ds, int port,
+0 −1
Original line number Diff line number Diff line
@@ -1199,7 +1199,6 @@ static const struct dsa_switch_ops bcm_sf2_ops = {
	.port_pre_bridge_flags	= b53_br_flags_pre,
	.port_bridge_flags	= b53_br_flags,
	.port_stp_state_set	= b53_br_set_stp_state,
	.port_set_mrouter	= b53_set_mrouter,
	.port_fast_age		= b53_br_fast_age,
	.port_vlan_filtering	= b53_vlan_filtering,
	.port_vlan_add		= b53_vlan_add,
+0 −13
Original line number Diff line number Diff line
@@ -1189,18 +1189,6 @@ mt7530_port_bridge_flags(struct dsa_switch *ds, int port,
	return 0;
}

static int
mt7530_port_set_mrouter(struct dsa_switch *ds, int port, bool mrouter,
			struct netlink_ext_ack *extack)
{
	struct mt7530_priv *priv = ds->priv;

	mt7530_rmw(priv, MT7530_MFC, UNM_FFP(BIT(port)),
		   mrouter ? UNM_FFP(BIT(port)) : 0);

	return 0;
}

static int
mt7530_port_bridge_join(struct dsa_switch *ds, int port,
			struct net_device *bridge)
@@ -3086,7 +3074,6 @@ static const struct dsa_switch_ops mt7530_switch_ops = {
	.port_stp_state_set	= mt7530_stp_state_set,
	.port_pre_bridge_flags	= mt7530_port_pre_bridge_flags,
	.port_bridge_flags	= mt7530_port_bridge_flags,
	.port_set_mrouter	= mt7530_port_set_mrouter,
	.port_bridge_join	= mt7530_port_bridge_join,
	.port_bridge_leave	= mt7530_port_bridge_leave,
	.port_fdb_add		= mt7530_port_fdb_add,
+0 −18
Original line number Diff line number Diff line
@@ -5849,23 +5849,6 @@ static int mv88e6xxx_port_bridge_flags(struct dsa_switch *ds, int port,
	return err;
}

static int mv88e6xxx_port_set_mrouter(struct dsa_switch *ds, int port,
				      bool mrouter,
				      struct netlink_ext_ack *extack)
{
	struct mv88e6xxx_chip *chip = ds->priv;
	int err;

	if (!chip->info->ops->port_set_mcast_flood)
		return -EOPNOTSUPP;

	mv88e6xxx_reg_lock(chip);
	err = chip->info->ops->port_set_mcast_flood(chip, port, mrouter);
	mv88e6xxx_reg_unlock(chip);

	return err;
}

static bool mv88e6xxx_lag_can_offload(struct dsa_switch *ds,
				      struct net_device *lag,
				      struct netdev_lag_upper_info *info)
@@ -6167,7 +6150,6 @@ static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
	.port_bridge_leave	= mv88e6xxx_port_bridge_leave,
	.port_pre_bridge_flags	= mv88e6xxx_port_pre_bridge_flags,
	.port_bridge_flags	= mv88e6xxx_port_bridge_flags,
	.port_set_mrouter	= mv88e6xxx_port_set_mrouter,
	.port_stp_state_set	= mv88e6xxx_port_stp_state_set,
	.port_fast_age		= mv88e6xxx_port_fast_age,
	.port_vlan_filtering	= mv88e6xxx_port_vlan_filtering,
Loading