netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net 0/2] mlxsw fixes
@ 2016-02-15 12:19 Jiri Pirko
  2016-02-15 12:19 ` [patch net 1/2] mlxsw: Treat local port 64 as valid Jiri Pirko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jiri Pirko @ 2016-02-15 12:19 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, eladr, yotamg, ogerlitz

From: Jiri Pirko <jiri@mellanox.com>

Just a couple of fixes from Ido.

Ido Schimmel (2):
  mlxsw: Treat local port 64 as valid
  mlxsw: spectrum: Set STP state when leaving 802.1D bridge

 drivers/net/ethernet/mellanox/mlxsw/port.h     | 2 +-
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

-- 
1.9.3

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

* [patch net 1/2] mlxsw: Treat local port 64 as valid
  2016-02-15 12:19 [patch net 0/2] mlxsw fixes Jiri Pirko
@ 2016-02-15 12:19 ` Jiri Pirko
  2016-02-15 12:19 ` [patch net 2/2] mlxsw: spectrum: Set STP state when leaving 802.1D bridge Jiri Pirko
  2016-02-17 20:53 ` [patch net 0/2] mlxsw fixes David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2016-02-15 12:19 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, eladr, yotamg, ogerlitz

From: Ido Schimmel <idosch@mellanox.com>

MLXSW_PORT_MAX_PORTS represents the maximum number of local ports, which
is 65 for both ASICs (SwitchX-2 and Spectrum) supported by this driver.

Fixes: 93c1edb27f9e ("mlxsw: Introduce Mellanox switch driver core")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/port.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/port.h b/drivers/net/ethernet/mellanox/mlxsw/port.h
index 726f543..ae65b99 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/port.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/port.h
@@ -49,7 +49,7 @@
 #define MLXSW_PORT_MID			0xd000
 
 #define MLXSW_PORT_MAX_PHY_PORTS	0x40
-#define MLXSW_PORT_MAX_PORTS		MLXSW_PORT_MAX_PHY_PORTS
+#define MLXSW_PORT_MAX_PORTS		(MLXSW_PORT_MAX_PHY_PORTS + 1)
 
 #define MLXSW_PORT_DEVID_BITS_OFFSET	10
 #define MLXSW_PORT_PHY_BITS_OFFSET	4
-- 
1.9.3

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

* [patch net 2/2] mlxsw: spectrum: Set STP state when leaving 802.1D bridge
  2016-02-15 12:19 [patch net 0/2] mlxsw fixes Jiri Pirko
  2016-02-15 12:19 ` [patch net 1/2] mlxsw: Treat local port 64 as valid Jiri Pirko
@ 2016-02-15 12:19 ` Jiri Pirko
  2016-02-17 20:53 ` [patch net 0/2] mlxsw fixes David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2016-02-15 12:19 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, eladr, yotamg, ogerlitz

From: Ido Schimmel <idosch@mellanox.com>

When a VLAN device leaves a bridge its STP state is set to DISABLED,
which causes the hardware to discard any packets coming through the port
with this VLAN.

Fix that by setting STP state to FORWARDING when the device leaves its
bridge and allow traffic to be directed to CPU.

Fixes: 26f0e7fb15de ("mlxsw: spectrum: Add support for VLAN devices bridging")
Reported-by: Elad Raz <eladr@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 217856b..0fa8da5 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -2746,6 +2746,13 @@ static int mlxsw_sp_vport_bridge_leave(struct mlxsw_sp_port *mlxsw_sp_vport,
 		goto err_vport_flood_set;
 	}
 
+	err = mlxsw_sp_port_stp_state_set(mlxsw_sp_vport, vid,
+					  MLXSW_REG_SPMS_STATE_FORWARDING);
+	if (err) {
+		netdev_err(dev, "Failed to set STP state\n");
+		goto err_port_stp_state_set;
+	}
+
 	if (flush_fdb && mlxsw_sp_vport_fdb_flush(mlxsw_sp_vport))
 		netdev_err(dev, "Failed to flush FDB\n");
 
@@ -2763,6 +2770,7 @@ static int mlxsw_sp_vport_bridge_leave(struct mlxsw_sp_port *mlxsw_sp_vport,
 
 	return 0;
 
+err_port_stp_state_set:
 err_vport_flood_set:
 err_port_vid_learning_set:
 err_port_vid_to_fid_validate:
-- 
1.9.3

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

* Re: [patch net 0/2] mlxsw fixes
  2016-02-15 12:19 [patch net 0/2] mlxsw fixes Jiri Pirko
  2016-02-15 12:19 ` [patch net 1/2] mlxsw: Treat local port 64 as valid Jiri Pirko
  2016-02-15 12:19 ` [patch net 2/2] mlxsw: spectrum: Set STP state when leaving 802.1D bridge Jiri Pirko
@ 2016-02-17 20:53 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-02-17 20:53 UTC (permalink / raw)
  To: jiri; +Cc: netdev, idosch, eladr, yotamg, ogerlitz

From: Jiri Pirko <jiri@resnulli.us>
Date: Mon, 15 Feb 2016 13:19:52 +0100

> Just a couple of fixes from Ido.

Series applied, thanks Jiri.

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

end of thread, other threads:[~2016-02-17 20:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 12:19 [patch net 0/2] mlxsw fixes Jiri Pirko
2016-02-15 12:19 ` [patch net 1/2] mlxsw: Treat local port 64 as valid Jiri Pirko
2016-02-15 12:19 ` [patch net 2/2] mlxsw: spectrum: Set STP state when leaving 802.1D bridge Jiri Pirko
2016-02-17 20:53 ` [patch net 0/2] mlxsw fixes David Miller

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).