net/mlx5: fix probing with secondary bonding member
authorRongwei Liu <rongweil@nvidia.com>
Wed, 6 Apr 2022 07:12:24 +0000 (10:12 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 21 Apr 2022 10:47:39 +0000 (12:47 +0200)
commitf956d3d4c33cdfac5e352f457050029bd5c9b8a8
treec15a9f862dffc80a20857d8fa5301d0067146ada
parente2259f93ef455c75bfeda9a7349689b7e9be5981
net/mlx5: fix probing with secondary bonding member

Users can probe primary or secondary PCIe id when bonding is
configured.
1. -a 0a:00.0,representor=pf[0-1]vf[0-1], PMD probes 5 ports
totally: bonding device plus 4 representor ports.
2. -a 0a:00.1,representor=pf[0-1]vf[0-1], PMD only probes 2
representor ports.

Under the 2nd condition, bonding IB device doesn't have the same
PCIe id and PMD needs to check bonding relationship otherwise
probe failure.

Fixes: 6856efa54eea ("net/mlx5: fix PF leak on PCI probing failure")
Cc: stable@dpdk.org
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/common/mlx5/linux/mlx5_common_os.c
drivers/net/mlx5/linux/mlx5_os.c