net/mlx5: Store vport in struct mlx5_devlink_port and use it in port ops

Instead of using internal devlink_port->index to perform vport lookup in
every devlink port op, store the vport pointer to the container struct
mlx5_devlink_port and use it directly in port ops.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Jiri Pirko 2023-05-31 13:36:43 +02:00 • committed by Saeed Mahameed
commit 7d8335200c
3 changed files with 29 additions and 53 deletions