net/mlx5: Reuse exported virtfn index function call
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 24 Feb 2022 14:20:11 +0000 (16:20 +0200)
committerLeon Romanovsky <leonro@nvidia.com>
Sun, 27 Feb 2022 09:40:00 +0000 (11:40 +0200)
commit6ebd25b80c0d325a4a7f12614885aaf33dae76ab
tree90bcbd97daa12237754032bfb2471b47c483588f
parent21ca9fb62d4688da41825e0f05d8e7e26afc69d6
net/mlx5: Reuse exported virtfn index function call

Instead open-code iteration to compare virtfn internal index, use newly
introduced pci_iov_vf_id() call.

Link: https://lore.kernel.org/all/20220224142024.147653-3-yishaih@nvidia.com
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/sriov.c