mlxsw: spectrum_router: Mark only first LPM tree as reserved
authorIdo Schimmel <idosch@mellanox.com>
Thu, 8 Jun 2017 06:47:43 +0000 (08:47 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Jun 2017 18:33:40 +0000 (14:33 -0400)
In new firmware versions (that we can now enforce via
request_firmware()), only the first LPM tree is reserved and not the
first two as in older versions.

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/spectrum_router.c

index 20061058801ecee066a144e7c5cb0ab86e1a68c7..700cc8c6aa5be69c9c6135c0572259434143955e 100644 (file)
@@ -591,7 +591,7 @@ static int mlxsw_sp_lpm_tree_put(struct mlxsw_sp *mlxsw_sp,
        return 0;
 }
 
-#define MLXSW_SP_LPM_TREE_MIN 2 /* trees 0 and 1 are reserved */
+#define MLXSW_SP_LPM_TREE_MIN 1 /* tree 0 is reserved */
 
 static int mlxsw_sp_lpm_init(struct mlxsw_sp *mlxsw_sp)
 {