* [dpdk-stable] [PATCH] net/mlx5: fix ROCE LAG bond device probing
@ 2021-07-21 8:31 Viacheslav Ovsiienko
2021-07-22 14:45 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Viacheslav Ovsiienko @ 2021-07-21 8:31 UTC (permalink / raw)
To: dev; +Cc: rasland, matan, stable
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 | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index aa5210fa45..e568cc9c48 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -2216,19 +2216,6 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
goto exit;
}
}
-#ifndef HAVE_MLX5DV_DR_DEVX_PORT
- if (bd >= 0) {
- /*
- * This may happen if there is VF LAG kernel support and
- * application is compiled with older rdma_core library.
- */
- DRV_LOG(ERR,
- "No kernel/verbs support for VF LAG bonding found.");
- rte_errno = ENOTSUP;
- ret = -rte_errno;
- goto exit;
- }
-#endif
/*
* Now we can determine the maximal
* amount of devices to be spawned.
@@ -2292,10 +2279,18 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
(list[ns].ifindex,
&list[ns].info);
}
-#ifdef HAVE_MLX5DV_DR_DEVX_PORT
if (!ret && bd >= 0) {
switch (list[ns].info.name_type) {
case MLX5_PHYS_PORT_NAME_TYPE_UPLINK:
+ if (np == 1) {
+ /*
+ * Force standalone bonding
+ * device for ROCE LAG
+ * confgiurations.
+ */
+ list[ns].info.master = 0;
+ list[ns].info.representor = 0;
+ }
if (list[ns].info.port_name == bd)
ns++;
break;
@@ -2312,7 +2307,6 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,
}
continue;
}
-#endif
if (!ret && (list[ns].info.representor ^
list[ns].info.master))
ns++;
--
2.18.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [PATCH] net/mlx5: fix ROCE LAG bond device probing
2021-07-21 8:31 [dpdk-stable] [PATCH] net/mlx5: fix ROCE LAG bond device probing Viacheslav Ovsiienko
@ 2021-07-22 14:45 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2021-07-22 14:45 UTC (permalink / raw)
To: Viacheslav Ovsiienko; +Cc: dev, stable, rasland, matan
21/07/2021 10:31, Viacheslav Ovsiienko:
> 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>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-22 14:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 8:31 [dpdk-stable] [PATCH] net/mlx5: fix ROCE LAG bond device probing Viacheslav Ovsiienko
2021-07-22 14:45 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).