From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 6D294A05FE for ; Mon, 18 Mar 2019 16:06:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 82B982C54; Mon, 18 Mar 2019 16:06:00 +0100 (CET) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 7D4422BAF for ; Mon, 18 Mar 2019 16:05:59 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id a3so11445272pff.11 for ; Mon, 18 Mar 2019 08:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZlS8KRPw2nBky5MTf+UwAmMSkck49iZ7GuW75kCY1+I=; b=l3ka7nmamqQkygehgM2g2yzV7AuRpk4NvntndCbKtSH0uVo6FFF5aPYS185lJdcsOC 5UZssQhhnu3D1ZJDE1D5s2R1f+5Bo1XZdONV3kPTYAdiYcMS0kfQZbap6STM6J3wTfEN 685pdK+aSXi2aY81+LjYSzHmNqrWSqi44zKRWzHOvZ3ELaJFvBDHjVm6w40KAJEFnXNz m/glngmBclSCrejgpFC2KNV9p3rpDyy2t019zRboeATJ8hr8uD99kHtEnbkJY6Q25n1h EfxeJ7nfT/TZ+UGsno/B5A/848tO6A943pR+LJNADh0zg4pzD2gquys6WPPcUAKY7TMQ JjMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZlS8KRPw2nBky5MTf+UwAmMSkck49iZ7GuW75kCY1+I=; b=DhsPJhPKaEAUEz2ppAIJu/VVh/ozo4eigNESzM0fbfTw01a6hAkDWE+UjxubJ8j5J4 t9UxyKwkLDbW+HEdcp8pda/rloDY0A+NiJom97Nwf5TjdJQur8XO+8qyL5hFoPCWJUIf gBSesggEVsqUHLzUa2I1rmqbYI7p8B2w3AxdV/c33bIJWm30lprNnCCzF3i/av1ry0C7 P05z8L2Y6zIcI24UOOZZBUCq3NtH5I7jQ6jD/9LP/TYIZ6NvJoccu6s0BgEBJAVutKSK 3WIQk4i0GzgNQtax59iN6WfqB7G2JULCppl2s+NUfH2a6mRdOyaqgChEBPDSB+/S/uI6 D7XA== X-Gm-Message-State: APjAAAUQCI9LKt7no5XeHY+3noW1sDcoOBrFlNnK5n2aLZ2lnUkP7JNM IbOCRxUiD/qy6jY/IFxcKIAaug== X-Google-Smtp-Source: APXvYqyAVGoNMD+po4Br2pjjUyd/jbwgGngYIQFtvIISGZyWQPEgsFtbp2mfe2n2Pct4++v6gRd11g== X-Received: by 2002:a17:902:127:: with SMTP id 36mr20628972plb.268.1552921558693; Mon, 18 Mar 2019 08:05:58 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 23sm17078966pfn.2.2019.03.18.08.05.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2019 08:05:58 -0700 (PDT) Date: Mon, 18 Mar 2019 08:05:55 -0700 From: Stephen Hemminger To: Matan Azrad Cc: "dev@dpdk.org" , "vpp-dev@lists.fd.io" Message-ID: <20190318080555.359b8d54@shemminger-XPS-13-9360> In-Reply-To: References: <20190313151858.2175-1-stephen@networkplumber.org> <20190314085215.26c6daf0@shemminger-XPS-13-9360> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC] net/vdev_netvsc: check for required related drivers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190318150555.G8W-YLhBtIhJT8phyMgnSNqcP2J2mBhDeQRWBu22Ik4@z> On Sun, 17 Mar 2019 06:53:02 +0000 Matan Azrad wrote: > Hi > > From: Stephen Hemminger > > wrote: > > > > > 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="vdev_netvsc0,ignore=1" - see documentation for more info. > > > > > > > > > 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. Right > > now the error messages are confusing, misleading and waste significant > > amount of developer time. > > > > 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 compilation? > > 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 running (vdev_netvsc_vdev_probe). Right now FAILSAFE, TAP and MLX5 are all optional in how VPP builds. If FAILSAFE or TAP is not configured then vdev_netvsc will try and configure them anyway and fail obscurely. My current preference would be: RTE_BUILD_BUG_ON(!defined(CONFIG_RTE_LIBRTE_PMD_FAILSAFE));