mlxsw: spectrum: Introduce port splitting
authorIdo Schimmel <idosch@mellanox.com>
Fri, 26 Feb 2016 16:32:31 +0000 (17:32 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Mar 2016 21:07:31 +0000 (16:07 -0500)
commit18f1e70c413713f28629ffe6863a2c43248ff7a3
tree459917c7636f20843eddce7956b4949bfa28b0c6
parenta133318cde2000a3264032ea3b561c9054613486
mlxsw: spectrum: Introduce port splitting

Allow a user to split or unsplit a port using the newly introduced
devlink ops.

Once split, the original netdev is destroyed and 2 or 4 others are
created, according to user configuration. The new ports are like any
other port, with the sole difference of supporting a lower maximum
speed. When unsplit, the reverse process takes place.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/port.h
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h