]> asedeno.scripts.mit.edu Git - linux.git/commit
net/mlx5: Reuse mlx5_esw_for_each_vf_vport macro in two files
authorParav Pandit <parav@mellanox.com>
Sun, 21 Apr 2019 05:36:21 +0000 (00:36 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 1 May 2019 21:39:17 +0000 (14:39 -0700)
commit786ef904b43b9ddb675f55ef05afad5f07fb49d0
tree3613c19a4b61fce4e572bc92cac64aaedae1cd1e
parentc9bbfb378bc35fcd0b51e4a8950bd50447f39832
net/mlx5: Reuse mlx5_esw_for_each_vf_vport macro in two files

Currently mlx5_esw_for_each_vf_vport iterates over mlx5_vport entries in
eswitch.c
Same macro in eswitch_offloads.c iterates over vport number in
eswitch_offloads.c

Instead of duplicate macro names, to avoid confusion and to reuse the
same macro in both files, move it to eswitch.h.

To iterate over vport numbers where there is no need to iterate over
mlx5_vport, but only a vport number is needed, rename those macros in
eswitch_offloads.c to mlx5_esw_for_each_vf_num_vport*.

While at it, keep all vport and vport rep iterators together.

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