net/mlx5: fix probing device in legacy bonding mode
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Wed, 21 Apr 2021 08:10:13 +0000 (08:10 +0000)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 28 Apr 2021 06:43:40 +0000 (08:43 +0200)
commitecaee305b811036d297eda04ad7c91d8349de77e
tree783a60a94b7814b0e448eda688626d0cfa982116
parentb014c6b7b595277860308468c4c12a9337bf132e
net/mlx5: fix probing device in legacy bonding mode

If the device was configured as legacy bond one (without
involving E-Switch), the mlx5 PMD erroneously tried to deduce
the vport index raising the fatal error and preventing
device from being used.

The patch checks whether there is E-Switch present and we
should use vport index indeed.

Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Fixes: d5c06b1b10ae ("net/mlx5: query vport index match mode and parameters")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c