]> asedeno.scripts.mit.edu Git - linux.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)
commitee813f314b2486549cd06e9e2c4d56ccab005609
tree4226f95f72f4068bfeef2d8c9625600bbd206a6a
parent786ef904b43b9ddb675f55ef05afad5f07fb49d0
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