From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matan Azrad Subject: Re: [RFC] net/vdev_netvsc: check for required related drivers Date: Sun, 17 Mar 2019 06:53:02 +0000 Message-ID: References: <20190313151858.2175-1-stephen@networkplumber.org> <20190314085215.26c6daf0@shemminger-XPS-13-9360> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , "vpp-dev@lists.fd.io" To: Stephen Hemminger Return-path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130072.outbound.protection.outlook.com [40.107.13.72]) by dpdk.org (Postfix) with ESMTP id D80062C16 for ; Sun, 17 Mar 2019 07:53:03 +0100 (CET) In-Reply-To: <20190314085215.26c6daf0@shemminger-XPS-13-9360> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi From: Stephen Hemminger > wrote: >=20 > > Hi > > > > From: Stephen Hemminger > > > The vdev_netvsc virtual driver that is used to do initialization on > > > Hyper- V/Azure won't work without failsafe and tap device. > > > If the related devices aren't present, it causes confusing errors > > > later in initialization when it crafts devargs and attempts to send > > > them to a device driver that isn't there. > > > > > > Unfortunately, this is common with VPP where the TAP and FAILSAFE > > > PMD's are both optional. The suggestion here is to detect this in > > > the startup phase earlier. > > > > > > Alternative would be to use RTE_BUILD_BUG_ON(!defined(...)) but that > > > would break people doing normal VPP build. > > > > > > > The failsafe and tap devices are created by the vdev_netvsc PMD, so it = is > not expected to find them in the scan time. > > If the VM doesn't want vdev_netvsc driver to run, it have 2 options: > > 1. assign IP to the netvsc netdevs. > > 2. run --vdev=3D"vdev_netvsc0,ignore=3D1" - see documentation for more = info. > > >=20 >=20 > How do we improve the error reporting for configurations that have run > Hyper-V/Azure but forget to build failsafe, tap or mlx5 device drivers. R= ight > now the error messages are confusing, misleading and waste significant > amount of developer time. >=20 > What solution do you propose? The DPDK build system is not as smart as > kernel Kconfig, there is no way to force dependencies. Why? Can't you condition the vdev_netvsc compilation in failsafe and tap compila= tion? 1 more option: To condition the vdev_netvsc automated probing (in vdev_netvsc_custom_scan_= add) by "ifdef" statement in failsafe and tap compilation existence. Moreover, you can add clearer massage for this case if vdev_netvsc is runni= ng (vdev_netvsc_vdev_probe). Matan. =20