net/mlx5: fix RoCE LAG bond device probing
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Wed, 21 Jul 2021 08:31:40 +0000 (11:31 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 22 Jul 2021 14:43:49 +0000 (16:43 +0200)
commit9f430dd75107d47fb9b67ab756503397b59b8955
treeadf51e84961c0b2bd5bc3b808b6f19c4c9e9ee91
parent39f0df9b6d135ee0dd049c53d876092c6236a398
net/mlx5: fix RoCE LAG bond device probing

The RoCE LAG bond device requires neither E-Switch nor SR-IOV
configurations. It means the RoCE LAG bond device might be
presented as a single port Infiniband device.

The mlx5 PMD wrongly recognized standalone RoCE LAG bond device
as E-Switch configuration, this triggered the calls of E-Switch
ports related API and the latter failed (over the new OFED kernel
driver, starting since 5.4.1), causing the overall device probe
failure.

If there is a single port Infiniband bond device found the
E-Switch related flags must be cleared indicating standalone
configuration.

Also, it is not true anymore the bond device can exist
over E-Switch configurations only (as it was claimed for VF LAG
bond devices). The related checks are not relevant anymore
and removed.

Fixes: 790164ce1d2d ("net/mlx5: check kernel support for VF LAG bonding")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c