From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0074.outbound.protection.outlook.com [104.47.33.74]) by dpdk.org (Postfix) with ESMTP id 82B2511DE for ; Sat, 27 Aug 2016 02:20:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=SonusNetworks.onmicrosoft.com; s=selector1-sonusnet-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=EqmojkK2xZDY8/hXGq/C71BSKeN7T+C+HI0PnlpsXso=; b=ZJv/NktWEJDQbaP4y11xbvuHB0aQgj6ZRyi5W/QbDttbZibcpLj3eglSJCY3djpMq6bE2Mx0dDjE/mmlMXukNpNHX4Dt7JuHI5rmHdwNVodfCK/UTLmxhHL46Q7T5B4EG5yZiPnCQ9VD8Zp8DZhI6rmWhFS4hHk55PrLVef8yq8= Received: from BN6PR03MB2740.namprd03.prod.outlook.com (10.173.144.135) by BN6PR03MB2738.namprd03.prod.outlook.com (10.173.144.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.13; Sat, 27 Aug 2016 00:20:31 +0000 Received: from BN6PR03MB2740.namprd03.prod.outlook.com ([10.173.144.135]) by BN6PR03MB2740.namprd03.prod.outlook.com ([10.173.144.135]) with mapi id 15.01.0587.013; Sat, 27 Aug 2016 00:20:31 +0000 From: "Dey, Souvik" To: Stephen Hemminger CC: "nhorman@tuxdriver.com" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v1] dpdk-devbind.py: Virtio interface issue. Thread-Index: AQHR/ngJrYBSlPHhJUWN6RhK2Yt0WKBbZ3YAgACM9VA= Date: Sat, 27 Aug 2016 00:20:31 +0000 Message-ID: References: <20160825022546.96468-1-sodey@sonusnet.com> <20160826085500.5691e07d@xeon-e3> In-Reply-To: <20160826085500.5691e07d@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sodey@sonusnet.com; x-originating-ip: [73.114.33.77] x-ms-office365-filtering-correlation-id: e699a1a0-cef5-450b-e390-08d3ce0ff4ac x-microsoft-exchange-diagnostics: 1; BN6PR03MB2738; 6:hoZZjr4QHHhmujCdibnyeaRaiuW8YG+/mqpJTNS/061bv42W96iq1IwMhb8JMTu3mHPSZN/aVwSmgDXncoDEMnQF1/18IChTBiLWmEsN+I5se+CyjMXFHP8MjXClRdqxAggs1VG0l7FZEJSo+OSR+eZF3Lg8oxdLoE0txWwKomcihyV63QOXtqUoujUTv8kjj6HV0UoqBUN0F2tnWQU0geYKzIf/3DiutQguCm0NiLd9YKk7J0g75lqwHlmITt9A1kgWz5cU4k6++yXayGql6gOgK8HLmRfqDwJGfWQTcpE=; 5:Jfib0DhBPFJ70q1srmZjaoMk048W1bJLg9oqLx4G5/XBFm0Zx0TNbvNGH7Dg4lcFp2a7fN3i4linWekGttbkdpJsf6ypRPFShlP88MnZGF55W/J/Uiebpoa1Z1Tk5Kt47fUy9i8yvX7VSSVMQViOsw==; 24:qHqK3n+Zx5i6n53rUq31YDUMa4MzXfyyadFhkO0KG9YXo/mkb7o3sFvPbKg13FKzdqn9yuY+Se88FEWxwHX8E5MwEMDxdisZtZilFJ1zpLo=; 7:RPi4rhMoWWKoQdW+g+FewwMZ5XIZgH9Chh0OH15sWWBAHcELE0+NRQa05UgQQwnOFldLPXl6aSCyB6d0t/7pddbqIOuGG/Fl5FqcKxgKkGJgJ4HXqypC8sh/YerX4X/JXsZRhVjiEt58IgUo5lG+xarGzjTyhvjBrhm6qRPxd0f56RtZRCtv/3zEdCw4H1ETh198SciagRftHC/JvEjU5uFbZoOHTzp8RVv8BUqxS4DkRLpEp4MHHq9EoYXwBoeE x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN6PR03MB2738; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BN6PR03MB2738; BCL:0; PCL:0; RULEID:; SRVR:BN6PR03MB2738; x-forefront-prvs: 0047BC5ADE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(6009001)(7916002)(377454003)(199003)(189002)(13464003)(24454002)(19580395003)(106356001)(15975445007)(5660300001)(8676002)(2900100001)(305945005)(92566002)(81156014)(81166006)(7736002)(2950100001)(77096005)(7696003)(11100500001)(8936002)(7846002)(97736004)(9686002)(2906002)(4326007)(19580405001)(74316002)(110136002)(3846002)(189998001)(10400500002)(5002640100001)(54356999)(86362001)(76576001)(99286002)(50986999)(76176999)(6116002)(106116001)(33656002)(105586002)(586003)(3280700002)(87936001)(101416001)(3660700001)(68736007)(15395725005)(122556002)(102836003)(66066001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2738; H:BN6PR03MB2740.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: sonusnet.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: sonusnet.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Aug 2016 00:20:31.1542 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 29a671dc-ed7e-4a54-b1e5-8da1eb495dc3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2738 Subject: Re: [dpdk-dev] [PATCH v1] dpdk-devbind.py: Virtio interface issue. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2016 00:20:34 -0000 Hi , I have already updated it and have re submitted the patch v3. Can you plea= se check that http://dpdk.org/dev/patchwork/patch/15378/ -- Regards, Souvik -----Original Message----- From: Stephen Hemminger [mailto:stephen@networkplumber.org]=20 Sent: Friday, August 26, 2016 11:55 AM To: Dey, Souvik Cc: nhorman@tuxdriver.com; dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v1] dpdk-devbind.py: Virtio interface issue. On Wed, 24 Aug 2016 22:25:46 -0400 souvikdey33 wrote: > + #The path for virtio devices are different. Get the correct path. > + virtio =3D "/sys/bus/pci/devices/%s/" % dev_id > + cmd =3D " ls %s | grep 'virt' " %virtio > + virtio =3D commands.getoutput(cmd) > + virtio_sys_path =3D "/sys/bus/pci/devices/%s/%s/net/" %=20 > +(dev_id,virtio) > if exists(sys_path): > device["Interface"] =3D ",".join(os.listdir(sys_path)) There should be a way to do this in python without going out to shell. This would be safer and more secure. The code already uses os.listdir() (which is the python library version of = ls) in later section. Why not use that here to check for virtio bus.