mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
net/mlx5: Remove max_external_SFs device resource
The device-level max_external_SFs resource is redundant now that per-port max_SFs resources are registered on each PF port representor. Users can look up SF limits per-port directly via 'devlink port show' to correlate with controller number and pfnum. Signed-off-by: Or Har-Toov <ohartoov@nvidia.com> Reviewed-by: Shay Drori <shayd@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20261011093828.784454-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
4f9fbb30e3
commit
001e9181ad
|
|
@ -89,14 +89,12 @@ To list resources for all devlink devices and ports:
|
|||
$ devlink resource show
|
||||
pci/0000:03:00.0:
|
||||
name max_local_SFs size 128 unit entry dpipe_tables none
|
||||
name max_external_SFs size 128 unit entry dpipe_tables none
|
||||
pci/0000:03:00.0/196608:
|
||||
name max_SFs size 128 unit entry dpipe_tables none
|
||||
pci/0000:03:00.0/196609:
|
||||
name max_SFs size 128 unit entry dpipe_tables none
|
||||
pci/0000:03:00.1:
|
||||
name max_local_SFs size 128 unit entry dpipe_tables none
|
||||
name max_external_SFs size 128 unit entry dpipe_tables none
|
||||
pci/0000:03:00.1/196708:
|
||||
name max_SFs size 128 unit entry dpipe_tables none
|
||||
pci/0000:03:00.1/196709:
|
||||
|
|
@ -124,10 +122,8 @@ To dump only device-level resources across all devices:
|
|||
$ devlink resource show scope dev
|
||||
pci/0000:03:00.0:
|
||||
name max_local_SFs size 128 unit entry dpipe_tables none
|
||||
name max_external_SFs size 128 unit entry dpipe_tables none
|
||||
pci/0000:03:00.1:
|
||||
name max_local_SFs size 128 unit entry dpipe_tables none
|
||||
name max_external_SFs size 128 unit entry dpipe_tables none
|
||||
|
||||
To dump only port-level resources across all devices:
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
enum mlx5_devlink_resource_id {
|
||||
MLX5_DL_RES_MAX_LOCAL_SFS = 1,
|
||||
MLX5_DL_RES_MAX_EXTERNAL_SFS,
|
||||
|
||||
__MLX5_ID_RES_MAX,
|
||||
MLX5_ID_RES_MAX = __MLX5_ID_RES_MAX - 1,
|
||||
|
|
|
|||
|
|
@ -262,24 +262,17 @@ static void mlx5_sf_hw_table_res_unregister(struct mlx5_core_dev *dev)
|
|||
devl_resources_unregister(priv_to_devlink(dev));
|
||||
}
|
||||
|
||||
static int mlx5_sf_hw_table_res_register(struct mlx5_core_dev *dev, u16 max_fn,
|
||||
u16 max_ext_fn)
|
||||
static int mlx5_sf_hw_table_res_register(struct mlx5_core_dev *dev,
|
||||
u16 max_fn)
|
||||
{
|
||||
struct devlink_resource_size_params size_params;
|
||||
struct devlink *devlink = priv_to_devlink(dev);
|
||||
int err;
|
||||
|
||||
devlink_resource_size_params_init(&size_params, max_fn, max_fn, 1,
|
||||
DEVLINK_RESOURCE_UNIT_ENTRY);
|
||||
err = devl_resource_register(devlink, "max_local_SFs", max_fn, MLX5_DL_RES_MAX_LOCAL_SFS,
|
||||
DEVLINK_RESOURCE_ID_PARENT_TOP, &size_params);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
devlink_resource_size_params_init(&size_params, max_ext_fn, max_ext_fn, 1,
|
||||
DEVLINK_RESOURCE_UNIT_ENTRY);
|
||||
return devl_resource_register(devlink, "max_external_SFs", max_ext_fn,
|
||||
MLX5_DL_RES_MAX_EXTERNAL_SFS, DEVLINK_RESOURCE_ID_PARENT_TOP,
|
||||
return devl_resource_register(devlink, "max_local_SFs", max_fn,
|
||||
MLX5_DL_RES_MAX_LOCAL_SFS,
|
||||
DEVLINK_RESOURCE_ID_PARENT_TOP,
|
||||
&size_params);
|
||||
}
|
||||
|
||||
|
|
@ -303,7 +296,7 @@ int mlx5_sf_hw_table_init(struct mlx5_core_dev *dev)
|
|||
if (err)
|
||||
return err;
|
||||
|
||||
if (mlx5_sf_hw_table_res_register(dev, max_fn, max_ext_fn))
|
||||
if (mlx5_sf_hw_table_res_register(dev, max_fn))
|
||||
mlx5_core_dbg(dev, "failed to register max SFs resources");
|
||||
|
||||
if (!max_fn && !max_ext_fn && !mlx5_esw_has_spf_sfs(dev))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user