[dpdk-dev] [PATCH] net/vdev_netvsc: print warning if Mellanox devices are not configured
stephen at networkplumber.org
Fri May 24 18:07:49 CEST 2019
On Fri, 24 May 2019 14:26:40 +0100
Ferruh Yigit <ferruh.yigit at intel.com> wrote:
> On 5/23/2019 11:01 PM, Stephen Hemminger wrote:
> > Several users have run into problems where the MLX drivers were not
> > enabled in their build. And then trying to run their DPDK
> > application on Azure. What happens is that all packets
> > go over the slow path, and failsafe repeatedly probes for never
> > existing sub-device.
> > Both Mellanox drivers should be checked. MLX4 for current versions,
> > and MLX5 for future upgrades. This code is only called if Hyper-V/Azure
> > is detected.
> > Signed-off-by: Stephen Hemminger <sthemmin at microsoft.com>
> > ---
> > drivers/net/vdev_netvsc/vdev_netvsc.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> > diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
> > index 801f54c96e01..64f9dbf66e18 100644
> > --- a/drivers/net/vdev_netvsc/vdev_netvsc.c
> > +++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
> > @@ -812,6 +812,13 @@ vdev_netvsc_scan_callback(__rte_unused void *arg)
> > struct rte_devargs *devargs;
> > struct rte_bus *vbus = rte_bus_find_by_name("vdev");
> > +#ifndef RTE_LIBRTE_MLX4_PMD
> > + DRV_LOG(WARNING, "Mellanox MLX4 not configured.");
> > +#endif
> > +#ifndef RTE_LIBRTE_MLX5_PMD
> > + DRV_LOG(WARNING, "Mellanox MLX5 not configured.");
> > +#endif
> Is it OK a virtual PMD being this much aware of another PMD?
> Can it be an option to add this check into build system? And if there is direct
> dependency perhaps even don't compile the 'vdev_netvsc' when none mlx PMD is
vdev_netvsc is not a device, it is really just a hack to start other
device drivers on Hyper-V/Azure. If the build system supported dependencies
(like Linux kbuild) this would not be necessary. Meson only does dynamic dependencies
so that doesn't help.
This is a warning and not fatal only because application will still at
least run, and somebody may want to run with SR-IOV with Intel NIC's on Hyper-V.
The warning is just to give users better immediate feedback rather than
trying to diagnose poor performance or mystery device not found messages.
More information about the dev