DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,
	matan@mellanox.com, Stephen Hemminger <sthemmin@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH] net/vdev_netvsc: print warning if Mellanox devices are not configured
Date: Fri, 24 May 2019 19:05:20 +0200	[thread overview]
Message-ID: <2341346.KjBqQsXUje@xps> (raw)
In-Reply-To: <20190524094812.1d4aba4c@hermes.lan>

24/05/2019 18:48, Stephen Hemminger:
> On Fri, 24 May 2019 18:38:53 +0200
> Thomas Monjalon <thomas@monjalon.net> wrote:
> > 24/05/2019 18:07, Stephen Hemminger:
> > > On Fri, 24 May 2019 14:26:40 +0100
> > > Ferruh Yigit <ferruh.yigit@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@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
> > > > enabled.  
> > > 
> > > 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.  
> > 
> > 
> > It really looks strange to me.
> > What you need is to fail at compilation if requested PMD is not built.
> > I would advise to work on a script to configure meson.
> 
> None of the people that ran into this were using meson build.
> For example, VPP doesn't use meson.

They will use meson when makefile will be removed :)

Anyway, no matter the build system, what we want is a way
to guide users to a proper DPDK installation.
Your solution is to add some very specific logs.
My proposal is to guide the user with a script and some
specific parameters so it will fail if a required dependency is not met.



  reply	other threads:[~2019-05-24 17:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 22:01 Stephen Hemminger
2019-05-24 13:26 ` Ferruh Yigit
2019-05-24 16:07   ` Stephen Hemminger
2019-05-24 16:38     ` Thomas Monjalon
2019-05-24 16:48       ` Stephen Hemminger
2019-05-24 17:05         ` Thomas Monjalon [this message]
2019-05-24 17:11           ` Stephen Hemminger
2019-05-24 17:32             ` Thomas Monjalon
2019-05-24 22:06               ` Stephen Hemminger
2019-05-27  8:31                 ` Thomas Monjalon
2019-05-27 14:54                   ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2341346.KjBqQsXUje@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=matan@mellanox.com \
    --cc=stephen@networkplumber.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).