net/mlx5: Reduce number of vport lookups passing vport pointer instead of index

During devlink port init/cleanup and register/unregister calls, there
are many lookups of vport. Instead of passing vport_num as argument to
functions, pass the vport struct pointer directly and avoid repeated
lookups.

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 14:14:50 +02:00 • committed by Saeed Mahameed
commit 2caa2a3911
4 changed files with 90 additions and 96 deletions