diff options
author | Moshe Shemesh <moshe@nvidia.com> | 2022-07-11 11:14:04 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2022-07-12 11:26:22 +0300 |
commit | da212bd29d7fdc326f0be47d15183d62e9c7c172 (patch) | |
tree | 2285bcfee9f6d406d4fb2a4a2c7145b08ede3a7d /include/net/devlink.h | |
parent | f1bc646c9a06f09aad5d8bacb87103b5573ee45e (diff) | |
download | linux-da212bd29d7fdc326f0be47d15183d62e9c7c172.tar.xz |
net/mlx5: Use devl_ API in mlx5_esw_devlink_sf_port_register
The function mlx5_esw_devlink_sf_port_register() calls
devlink_port_register() and devlink_rate_leaf_create(). Use devl_ API to
call devl_port_register() and devl_rate_leaf_create() accordingly and
add devlink instance lock in driver paths to this function.
Similarly, use devl_ API to call devl_port_unregister() and
devl_rate_leaf_destroy() in mlx5_esw_devlink_sf_port_unregister() and
ensure locking devlink instance lock on all the paths to this function
too.
This will be used by the downstream patch to invoke
mlx5_devlink_eswitch_mode_set() with devlink lock held.
Note this patch is taking devlink lock on mlx5_devlink_sf_port_new/del()
which are devlink callbacks for port_new/del(). We will take these locks
off once these callbacks will be locked by devlink too.
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/net/devlink.h')
0 files changed, 0 insertions, 0 deletions