net/mlx5: Use devl_ API for rate nodes destroy
authorMoshe Shemesh <moshe@nvidia.com>
Mon, 11 Jul 2022 08:14:01 +0000 (01:14 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 12 Jul 2022 08:26:22 +0000 (10:26 +0200)
commit03f9c47d0f7983bc73854ee34be6814b580ac7fc
tree520b65f991fa792a7f3df7c8c21465134ac36ba0
parent367dfa1212050b9418b890a2f74a3550e31b571d
net/mlx5: Use devl_ API for rate nodes destroy

Use devl_rate_nodes_destroy() instead of devlink_rate_nodes_destroy().
Add devlink instance lock in the driver paths to this function to have
it locked while calling devl_ API function.

This will be used by the downstream patch to invoke
mlx5_devlink_eswitch_mode_set() with devlink lock held.

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>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c