]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Use available mlx5_vport struct
authorParav Pandit <parav@mellanox.com>
Mon, 22 Apr 2019 01:34:45 +0000 (20:34 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 1 May 2019 21:39:17 +0000 (14:39 -0700)
commitb38237133f79328c4f1f0bafc33ff15e7d42ceda
tree4226f95f72f4068bfeef2d8c9625600bbd206a6a
parent34395eb4ee070f0f3b531e1286311a117df4e8c8
net/mlx5: Use available mlx5_vport struct

Several functions need to access mlx5_vport and vport_num.
When these functions are called, caller already has mlx5_vport*
available.
Hence pass such mlx5_vport pointer.

This is preparation patch to add error checks to
mlx5_eswitch_get_vport() and to return error status.
By doing so, reduce places where error check of mlx5_eswitch_get_vport()
can be avoided.

While doing such change, mlx5_eswitch_query_vport_drop_stats() gets
corrected to work on vport, instead of vport_idx.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Bodong Wang <bodong@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c