From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0059.outbound.protection.outlook.com [104.47.1.59]) by dpdk.org (Postfix) with ESMTP id 1DBE11B21D; Mon, 21 May 2018 19:25:54 +0200 (CEST) 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=5mM9d1sejHyoluUyTxCvMnRd055ID1POe+pgIXM15qk=; b=HmxF0FPQPuC/wk3p4dUrl5vGJ+M8a4NTX+1ffm4FvlS35TeFUiowNeD/SmHLXv/IKPeRdpIAF0ovDUYvP2l4xzQU9Ivzmy6IVuhscBhGBbNnhTeC8vEwZMBAlaVJjkblbCAyiNUL4v12XSC0I5v5qx5YfFIVqN5zm09R8A6ILZk= Received: from VI1PR0501MB2608.eurprd05.prod.outlook.com (10.168.137.20) by VI1PR0501MB2430.eurprd05.prod.outlook.com (10.168.135.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Mon, 21 May 2018 17:25:51 +0000 Received: from VI1PR0501MB2608.eurprd05.prod.outlook.com ([fe80::1035:58f9:b94c:2180]) by VI1PR0501MB2608.eurprd05.prod.outlook.com ([fe80::1035:58f9:b94c:2180%18]) with mapi id 15.20.0776.015; Mon, 21 May 2018 17:25:51 +0000 From: Matan Azrad To: Stephen Hemminger CC: "dev@dpdk.org" , Ferruh Yigit , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/vdev_netvsc: fix automatic probing Thread-Index: AQHT8SAi3Y4UhApLakmfwP1XOydxbaQ6ZeIAgAAIwcA= Date: Mon, 21 May 2018 17:25:51 +0000 Message-ID: References: <1526919810-24303-1-git-send-email-matan@mellanox.com> <20180521095214.2959d2c1@xeon-e3> In-Reply-To: <20180521095214.2959d2c1@xeon-e3> 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-microsoft-exchange-diagnostics: 1; VI1PR0501MB2430; 7:uOYjFi9WcgBYr5YFDdEc7wWrIeT7I+fn/+U1i6nX5lUKMwVWL2AOncYADZRAeyDej5g6ne383mAd3DVCNQ1uca5jhbelRT0+3dLGRbQcuCHq07iisEOvGlVfuPS16ovULHVE9qTjXuff/mHr8umusmvKUs6tJaXX7CrYnZC8dUvIn2WYmPnDScJzSQM49FuOLuXI5tV33nJ8wjwaSe2pX8zJmNrIOCrcvFCQwrEvITW29bDuQKySr+6tEuyD/4yS x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2430; x-ms-traffictypediagnostic: VI1PR0501MB2430: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231254)(944501410)(52105095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:VI1PR0501MB2430; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2430; x-forefront-prvs: 06793E740F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(396003)(39380400002)(39860400002)(376002)(189003)(199004)(478600001)(53936002)(8676002)(74316002)(86362001)(97736004)(8936002)(6246003)(55016002)(105586002)(106356001)(4326008)(9686003)(5660300001)(102836004)(81156014)(316002)(81166006)(33656002)(3660700001)(26005)(3280700002)(14454004)(76176011)(186003)(2906002)(54906003)(7696005)(6436002)(6506007)(99286004)(446003)(11346002)(2900100001)(486006)(476003)(25786009)(6916009)(7736002)(66066001)(5250100002)(6116002)(3846002)(229853002)(305945005)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2430; H:VI1PR0501MB2608.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:3; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: KhuEe1lSh02W8WgIPRbfGoh7DDgoaAetHdttQ594P3J8DqtyGoI6AC1ZhfdsY7VkZz0PS48GkTruJVp1ou4d9vf0ZxKaEO6OfELEhikZbj0OzIOt24/CzdG/BAhU7/6HUjRhRPEf6BeKsbOROaSaAo57lXOr49UubxPB1x3CLwoN7h4+qdwpQF2VoMVEktia spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 21492902-b50e-4d75-e048-08d5bf3fe68b X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21492902-b50e-4d75-e048-08d5bf3fe68b X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2018 17:25:51.3627 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2430 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/vdev_netvsc: fix automatic probing X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 17:25:54 -0000 From: Stephen Hemminger > On Mon, 21 May 2018 16:23:30 +0000 > Matan Azrad wrote: >=20 > > The vdev_netvsc driver allows an automatic probe in Hyper-V VM systems > > unless it was already specified by the EAL command line. > > > > The detection of a specified NetVSC device is wrongly done by > > comparing the vdev_netvsc driver name to all the vdev devices names, > > including the suffix device index. Thus, if the user specifies the > > vdev_netvsc device by adding an index to the device name, the compariso= n > fails. > > Consequently, the vdev_netvsc driver may automatically probe NetVSC > > devices, despite the NetVSC device that was specified by the EAL > > command line. > > > > Compare the vdev_netvsc driver name to the devices names without the > > index. > > > > Fixes: 56252de779a6 ("net/vdev_netvsc: add automatic probing") > > Cc: stable@dpdk.org > > > > Signed-off-by: Matan Azrad > > --- > > drivers/net/vdev_netvsc/vdev_netvsc.c | 7 +++++-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c > > b/drivers/net/vdev_netvsc/vdev_netvsc.c > > index de2bd14..48717f2 100644 > > --- a/drivers/net/vdev_netvsc/vdev_netvsc.c > > +++ b/drivers/net/vdev_netvsc/vdev_netvsc.c > > @@ -39,6 +39,7 @@ > > > > #define VDEV_NETVSC_DRIVER net_vdev_netvsc #define > > VDEV_NETVSC_DRIVER_NAME RTE_STR(VDEV_NETVSC_DRIVER) > > +#define VDEV_NETVSC_DRIVER_NAME_LEN 15 >=20 > Looks correct, why did you not just use IFNAMSIZ which is commonly used > across much of the network code? Actually this is the driver name size (without \0) no an interface name.