net/mlx5: Simplify unload all rep code
authorDaniel Jurgens <danielj@nvidia.com>
Tue, 7 Mar 2023 22:02:12 +0000 (00:02 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 10 Jun 2023 01:40:50 +0000 (18:40 -0700)
commit18a92b05425493c3d131c47689443d7ae860c986
treeb6e287ada4aa9b1067ca3686dfd08d825d8eed53
parentded5c1a16ec69bb815f2b7d9ea4028913ebffca4
net/mlx5: Simplify unload all rep code

Instead of using type specific iterators which are only used in one place
just traverse the xarray. It will provide suitable ordering based on the
vport numbers. This will also eliminate the need for changes here when
new types are added.

Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Reviewed-by: William Tu <witu@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c