net/mlx5: Fix lag port remapping logic
authorEli Cohen <elic@nvidia.com>
Mon, 3 May 2021 11:39:58 +0000 (14:39 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 27 May 2021 18:54:39 +0000 (11:54 -0700)
commit8613641063617c1dfc731b403b3ee4935ef15f87
tree237b305b71e9071981d13d73b8e5eb5460f8e9f4
parent2b1476752521aae142d4c8bc37dfd2be66b2acfa
net/mlx5: Fix lag port remapping logic

Fix the logic so that if both ports netdevices are enabled or disabled,
use the trivial mapping without swapping.

If only one of the netdevice's tx is enabled, use it to remap traffic to
that port.

Signed-off-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/lag.c