Skip to contentSkip to conversation

mlxsw: spectrum: Mark split ports as such

PATCH Applied Jiri Pirko 2 participants 2 messages Dec 16, 2016 – Dec 18, 2016

Subsystems (3)
lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

PATCH 1/1 mlxsw: spectrum: Mark split ports as such

From: Ido Schimmel <[email protected]>

When a port is split we should mark it as such, as otherwise the split ports aren't renamed correctly (e.g. sw1p3 -> sw1p3s1) and the unsplit operation fails:

$ devlink port split sw1p3 count 4
$ devlink port unsplit eth0
devlink answers: Invalid argument
[  598.565307] mlxsw_spectrum 0000:03:00.0 eth0: Port wasn't split
Fixes 67963a33b4fd ("mlxsw: Make devlink port instances independent of spectrum/switchx2 port instances")
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +1 -1
index fece974..d768c7b 100644
@@ -2404,7 +2404,7 @@ static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port,
 			local_port);
 		return err;
 	}
-	err = __mlxsw_sp_port_create(mlxsw_sp, local_port, false,
+	err = __mlxsw_sp_port_create(mlxsw_sp, local_port, split,
 				     module, width, lane);
 	if (err)
 		goto err_port_create;
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw

From: Jiri Pirko <[email protected]>
Date: Fri, 16 Dec 2016 19:29:03 +0100

Quoted 11 lines

From: Ido Schimmel <[email protected]>

When a port is split we should mark it as such, as otherwise the split ports aren't renamed correctly (e.g. sw1p3 -> sw1p3s1) and the unsplit operation fails:

$ devlink port split sw1p3 count 4
$ devlink port unsplit eth0
devlink answers: Invalid argument
[  598.565307] mlxsw_spectrum 0000:03:00.0 eth0: Port wasn't split
Quoted 6 lines
Fixes 67963a33b4fd ("mlxsw: Make devlink port instances independent of spectrum/switchx2 port instances")

Applied, thanks Jiri.