All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] mlxsw: spectrum_switchdev: Do not remove mrouter port from MDB's ports list
@ 2018-04-26  8:46 Ido Schimmel
  2018-04-27 17:45 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ido Schimmel @ 2018-04-26  8:46 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, nogahf, colin.king, mlxsw, Ido Schimmel

When IGMP snooping is enabled on a bridge, traffic forwarded by an MDB
entry should be sent to both ports member in the MDB's ports list and
mrouter ports.

In case a port needs to be removed from an MDB's ports list, but this
port is also configured as an mrouter port, then do not update the
device so that it will continue to forward traffic through that port.

Fix a copy-paste error that checked that IGMP snooping is enabled twice
instead of checking the port's mrouter state.

Fixes: ded711c87a04 ("mlxsw: spectrum_switchdev: Consider mrouter status for mdb changes")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Colin King <colin.king@canonical.com>
Reviewed-by: Nogah Frankel <nogahf@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index c11c9a635866..4ed01182a82c 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -1718,13 +1718,11 @@ __mlxsw_sp_port_mdb_del(struct mlxsw_sp_port *mlxsw_sp_port,
 	struct net_device *dev = mlxsw_sp_port->dev;
 	int err;
 
-	if (bridge_port->bridge_device->multicast_enabled) {
-		if (bridge_port->bridge_device->multicast_enabled) {
-			err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid,
-						     false);
-			if (err)
-				netdev_err(dev, "Unable to remove port from SMID\n");
-		}
+	if (bridge_port->bridge_device->multicast_enabled &&
+	    !bridge_port->mrouter) {
+		err = mlxsw_sp_port_smid_set(mlxsw_sp_port, mid->mid, false);
+		if (err)
+			netdev_err(dev, "Unable to remove port from SMID\n");
 	}
 
 	err = mlxsw_sp_port_remove_from_mid(mlxsw_sp_port, mid);
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] mlxsw: spectrum_switchdev: Do not remove mrouter port from MDB's ports list
  2018-04-26  8:46 [PATCH net] mlxsw: spectrum_switchdev: Do not remove mrouter port from MDB's ports list Ido Schimmel
@ 2018-04-27 17:45 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-04-27 17:45 UTC (permalink / raw)
  To: idosch; +Cc: netdev, jiri, nogahf, colin.king, mlxsw

From: Ido Schimmel <idosch@mellanox.com>
Date: Thu, 26 Apr 2018 11:46:29 +0300

> When IGMP snooping is enabled on a bridge, traffic forwarded by an MDB
> entry should be sent to both ports member in the MDB's ports list and
> mrouter ports.
> 
> In case a port needs to be removed from an MDB's ports list, but this
> port is also configured as an mrouter port, then do not update the
> device so that it will continue to forward traffic through that port.
> 
> Fix a copy-paste error that checked that IGMP snooping is enabled twice
> instead of checking the port's mrouter state.
> 
> Fixes: ded711c87a04 ("mlxsw: spectrum_switchdev: Consider mrouter status for mdb changes")
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Reported-by: Colin King <colin.king@canonical.com>
> Reviewed-by: Nogah Frankel <nogahf@mellanox.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-27 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26  8:46 [PATCH net] mlxsw: spectrum_switchdev: Do not remove mrouter port from MDB's ports list Ido Schimmel
2018-04-27 17:45 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.