summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
diff options
context:
space:
mode:
authorArkadi Sharshevsky <arkadis@mellanox.com>2018-02-20 08:44:22 +0100
committerDavid S. Miller <davem@davemloft.net>2018-02-20 13:38:55 -0500
commit51d3c08e33712e4867970fc5bafc73df3265ed04 (patch)
tree6145e6fa303c7edbd930a5fe2188f8075c3a8183 /drivers/net/ethernet/mellanox/mlxsw/spectrum.c
parent4f4bbf7c4e3d4bd14987a13041c6b5b1ea59e21f (diff)
downloadlwn-51d3c08e33712e4867970fc5bafc73df3265ed04.tar.gz
lwn-51d3c08e33712e4867970fc5bafc73df3265ed04.zip
mlxsw: spectrum_kvdl: Add support for linear division resources
The linear part of the KVD memory is sub-divided into multiple parts. This patch exposes this internal partitions via the resource interface. Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 39196625ae8e..bfde93910f82 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -3885,6 +3885,10 @@ static int mlxsw_sp_resources_register(struct mlxsw_core *mlxsw_core)
if (err)
return err;
+ err = mlxsw_sp_kvdl_resources_register(devlink);
+ if (err)
+ return err;
+
double_size = kvd_size - linear_size;
double_size *= profile->kvd_hash_double_parts;
double_size /= profile->kvd_hash_double_parts +