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 24D6CA0096 for ; Thu, 14 Mar 2019 12:26:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BAD1D47CE; Thu, 14 Mar 2019 12:26:08 +0100 (CET) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40041.outbound.protection.outlook.com [40.107.4.41]) by dpdk.org (Postfix) with ESMTP id 9E2EC374E for ; Thu, 14 Mar 2019 12:26:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d03d1wmHO/JCNtrkVOv+AKZVtZKAlXJE0c1Fe669ghs=; b=lMZRJOH7zxYg0MamHsyd3p6UPZlSFhxPBIryqXlRLyU1uYBABvgi+zf+nD+1EZq+X6PYRfY77fcoM0NjEP8MUZwUIbaDNf5+DZo4PqIXLc5PXJ5joLnjByf0rX96wyypnPVKhUtRbvlGUKEXwOnn+G7nRsjXDNWYdTuYxby0bCM= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (52.133.39.139) by AM0PR0502MB3619.eurprd05.prod.outlook.com (52.133.46.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.14; Thu, 14 Mar 2019 11:26:05 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::3cdc:e13a:204e:67a6]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::3cdc:e13a:204e:67a6%2]) with mapi id 15.20.1686.021; Thu, 14 Mar 2019 11:26:05 +0000 From: Matan Azrad To: Stephen Hemminger , "dev@dpdk.org" , "vpp-dev@lists.fd.io" Thread-Topic: [dpdk-dev] [RFC] net/vdev_netvsc: check for required related drivers Thread-Index: AQHU2bAb0HniiTRu/k+WmCuLSKsWwKYK+7Dw Date: Thu, 14 Mar 2019 11:26:05 +0000 Message-ID: References: <20190313151858.2175-1-stephen@networkplumber.org> In-Reply-To: <20190313151858.2175-1-stephen@networkplumber.org> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: af81086c-0435-48ad-bff1-08d6a86fd8db x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR0502MB3619; x-ms-traffictypediagnostic: AM0PR0502MB3619: x-microsoft-antispam-prvs: x-forefront-prvs: 09760A0505 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(346002)(376002)(39860400002)(199004)(189003)(66066001)(14454004)(68736007)(81166006)(2501003)(81156014)(8676002)(229853002)(74316002)(6436002)(478600001)(305945005)(8936002)(7736002)(14444005)(476003)(102836004)(26005)(256004)(486006)(11346002)(446003)(6116002)(186003)(99286004)(106356001)(105586002)(3846002)(71200400001)(71190400001)(6506007)(7696005)(76176011)(33656002)(9686003)(2906002)(53936002)(55016002)(2201001)(52536014)(110136005)(316002)(25786009)(86362001)(5660300002)(97736004)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3619; H:AM0PR0502MB4019.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: JYbPewRhodaZIaIqTIld0d20u15nbtpFPHvrlhhw95PojtZg0nurgEeeyxZwClRdDznLEkGR9UUC2gwx1EpyaIcPNNiS1nZ0RX90HGs3e5w0EeG0NwELIIz5yw1XlVkbC0Bhxj8+U39P3RPZhHeU1uJ8tekJRMAzX1AfFCjOHsLyMbctV7RCegMGrDad1aFVw/P8vO+qTaWmTh+BHEi0w5Hmoo5RxvfSsqB/Q9w4xfhfvvQ6/1NyecPRHhM7Ku7VgunH7is0B2vTLzCiEM4JZYXnXSWoKyc1tqP9w4T4PVx6v6G1cFhm1XfAQZ7qsPI3A4rj98lwbQnBSCdhWZi1aZ/03VVaP5acqIrL8KetnHB0dKD2gPv7k3n8GBhBzQJhl685ryVNd7abvRXSoixhu85cHNlfpRnGHl94AI34pRU= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: af81086c-0435-48ad-bff1-08d6a86fd8db X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2019 11:26:05.0428 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3619 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: <20190314112605.fEm_kueNv61lH04nYu5Ocs8JeckUipZvVxiTIr2BOEg@z> 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 i= n > initialization when it crafts devargs and attempts to send them to a devi= ce > driver that isn't there. >=20 > 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. >=20 > Alternative would be to use RTE_BUILD_BUG_ON(!defined(...)) but that > would break people doing normal VPP build. >=20 The failsafe and tap devices are created by the vdev_netvsc PMD, so it is n= ot 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.=20 2. run --vdev=3D"vdev_netvsc0,ignore=3D1" - see documentation for more info= . > Signed-off-by: Stephen Hemminger > --- > drivers/net/vdev_netvsc/vdev_netvsc.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) >=20 > diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c > b/drivers/net/vdev_netvsc/vdev_netvsc.c > index 801f54c96e01..9c262358b5ee 100644 > --- a/drivers/net/vdev_netvsc/vdev_netvsc.c > +++ b/drivers/net/vdev_netvsc/vdev_netvsc.c > @@ -812,6 +812,20 @@ vdev_netvsc_scan_callback(__rte_unused void > *arg) > struct rte_devargs *devargs; > struct rte_bus *vbus =3D rte_bus_find_by_name("vdev"); >=20 > + dev =3D vbus->find_device(NULL, vdev_netvsc_cmp_rte_device, > + "net_failsafe"); > + if (!dev) { > + DRV_LOG(ERR, "failsafe network device not present"); > + return; > + } > + > + dev =3D vbus->find_device(NULL, vdev_netvsc_cmp_rte_device, > + "net_tap"); > + if (!dev) { > + DRV_LOG(ERR, "tap network device driver not present"); > + return; > + } > + > RTE_EAL_DEVARGS_FOREACH("vdev", devargs) > if (!strncmp(devargs->name, VDEV_NETVSC_DRIVER_NAME, > VDEV_NETVSC_DRIVER_NAME_LEN)) > -- > 2.17.1