summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
diff options
context:
space:
mode:
authorIdo Schimmel2016-03-08 21:59:33 +0100
committerDavid S. Miller2016-03-11 20:47:58 +0100
commit869f63a4d28144c03c8f4a4c0d1e8f31f8c11a10 (patch)
tree31c59e1e25152de938722304ff781819c32fbcde /drivers/net/ethernet/mellanox/mlxsw/spectrum.h
parentmacvtap: always pass ethernet header in linear (diff)
downloadkernel-qcow2-linux-869f63a4d28144c03c8f4a4c0d1e8f31f8c11a10.tar.gz
kernel-qcow2-linux-869f63a4d28144c03c8f4a4c0d1e8f31f8c11a10.tar.xz
kernel-qcow2-linux-869f63a4d28144c03c8f4a4c0d1e8f31f8c11a10.zip
mlxsw: spectrum: Check requested ageing time is valid
Commit c62987bbd8a1 ("bridge: push bridge setting ageing_time down to switchdev") added a check for minimum and maximum ageing time, but this breaks existing behaviour where one can set ageing time to 0 for a non-learning bridge. Push this check down to the driver and allow the check in the bridge layer to be removed. Currently ageing time 0 is refused by the driver, but we can later add support for this functionality. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index 1b691d7e4a2a..4b8abaf06321 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -123,6 +123,8 @@ struct mlxsw_sp {
#define MLXSW_SP_DEFAULT_LEARNING_INTERVAL 100
unsigned int interval; /* ms */
} fdb_notify;
+#define MLXSW_SP_MIN_AGEING_TIME 10
+#define MLXSW_SP_MAX_AGEING_TIME 1000000
#define MLXSW_SP_DEFAULT_AGEING_TIME 300
u32 ageing_time;
struct mlxsw_sp_upper master_bridge;