diff options
author | Arkadi Sharshevsky | 2018-01-15 08:59:10 +0100 |
---|---|---|
committer | David S. Miller | 2018-01-16 20:15:35 +0100 |
commit | e21d21ca31f2fec31f9359a2209929a32a5faf9f (patch) | |
tree | 3fdbcbe122c91df3ee0d232c91d2cac4288c80e2 /drivers/net/ethernet/mellanox/mlxsw/core.h | |
parent | mlxsw: spectrum: Add support for getting kvdl occupancy (diff) | |
download | kernel-qcow2-linux-e21d21ca31f2fec31f9359a2209929a32a5faf9f.tar.gz kernel-qcow2-linux-e21d21ca31f2fec31f9359a2209929a32a5faf9f.tar.xz kernel-qcow2-linux-e21d21ca31f2fec31f9359a2209929a32a5faf9f.zip |
mlxsw: pci: Add support for getting resource through devlink
Up until now the KVD partition was static. This patch introduces the
ability to get the resource sizes via devlink. In case the resource is not
available the default configuration is used.
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/core.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/core.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.h b/drivers/net/ethernet/mellanox/mlxsw/core.h index e23f83b14910..e44061dfe8c7 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core.h +++ b/drivers/net/ethernet/mellanox/mlxsw/core.h @@ -309,10 +309,19 @@ struct mlxsw_driver { void (*txhdr_construct)(struct sk_buff *skb, const struct mlxsw_tx_info *tx_info); int (*resources_register)(struct mlxsw_core *mlxsw_core); + int (*kvd_sizes_get)(struct mlxsw_core *mlxsw_core, + const struct mlxsw_config_profile *profile, + u64 *p_single_size, u64 *p_double_size, + u64 *p_linear_size); u8 txhdr_len; const struct mlxsw_config_profile *profile; }; +int mlxsw_core_kvd_sizes_get(struct mlxsw_core *mlxsw_core, + const struct mlxsw_config_profile *profile, + u64 *p_single_size, u64 *p_double_size, + u64 *p_linear_size); + bool mlxsw_core_res_valid(struct mlxsw_core *mlxsw_core, enum mlxsw_res_id res_id); |