aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2016-02-26 17:32:31 +0100
committerDavid S. Miller <davem@davemloft.net>2016-03-01 16:07:31 -0500
commit18f1e70c413713f28629ffe6863a2c43248ff7a3 (patch)
tree459917c7636f20843eddce7956b4949bfa28b0c6 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h
parentmlxsw: spectrum: Mark unused ports using NULL (diff)
downloadlinux-dev-18f1e70c413713f28629ffe6863a2c43248ff7a3.tar.xz
linux-dev-18f1e70c413713f28629ffe6863a2c43248ff7a3.zip
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>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index a7d86ac033f8..1b691d7e4a2a 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -58,6 +58,10 @@
#define MLXSW_SP_MID_MAX 7000
+#define MLXSW_SP_PORTS_PER_CLUSTER_MAX 4
+
+#define MLXSW_SP_PORT_BASE_SPEED 25000 /* Mb/s */
+
struct mlxsw_sp_port;
struct mlxsw_sp_upper {
@@ -151,7 +155,8 @@ struct mlxsw_sp_port {
learning_sync:1,
uc_flood:1,
bridged:1,
- lagged:1;
+ lagged:1,
+ split:1;
u16 pvid;
u16 lag_id;
struct {