From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0044.outbound.protection.outlook.com [104.47.41.44]) by dpdk.org (Postfix) with ESMTP id AB217568C for ; Fri, 26 Aug 2016 07:51:03 +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=/8aaKQ0BL0EL788kRACuUXC54K+Ez1KWdqS0bxY2Mt8=; b=rfHkskVOo6Fhw/2rCx6vtDNVemXcN6xdsjIbjNWZ3QpuT76O5zMN+lrdpLTrvijgInlRu0YcaDqNjwb79UhH115JV6EN/aKVOZJuUmRHQWJfudVwi6ipOEnJIz9UCJ4v2anJNM7kVYrMQ/RPWoFsdt7Pz+7z3CBJWDq7EcGIPZY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sodey@sonusnet.com; Received: from SODEY-LMA.sonusnet.com (73.114.35.9) by BN6PR03MB2740.namprd03.prod.outlook.com (10.173.144.135) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.13; Fri, 26 Aug 2016 05:51:00 +0000 From: souvikdey33 To: , CC: souvikdey33 Date: Fri, 26 Aug 2016 01:50:49 -0400 Message-ID: <20160826055049.15560-1-sodey@sonusnet.com> X-Mailer: git-send-email 2.9.3.windows.1 In-Reply-To: <20160825022546.96468-1-sodey@sonusnet.com> References: <20160825022546.96468-1-sodey@sonusnet.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [73.114.35.9] X-ClientProxiedBy: BN3PR0301CA0045.namprd03.prod.outlook.com (10.160.152.141) To BN6PR03MB2740.namprd03.prod.outlook.com (10.173.144.135) X-MS-Office365-Filtering-Correlation-Id: 9009bb54-94ed-48d2-9769-08d3cd74f59a X-Microsoft-Exchange-Diagnostics: 1; BN6P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oQCoExeFJa2a+BQdrkpsdio=; 20:FEbbDmMCjnrtyKfUTr2VZrEtivsbv1e3Tq8N2jCSfaExZ5SS4n3FPEsqpLVl4PyltzxjTXWWjO1lSgGS9NZ/e6DyegK2Ql8n91FxTy2kEowS9YUWh+r+N5LLdi2Cy5TBM7ftVnFgegiJoNSGMCajzsM3zXObzZ1phwn6rY7Psgj3FAyY69hnsEOPKF7ZwzVlEhLCETIzq/4p7BWbo2Yfojx6DAdBojnkPm88IMg6Sr+6amCHXK3MoXdITPIoc6WbBmyMUbDxznZHuBmBamCpMzeSxlcVzPqBKFgIW71k9RUN3jB+U8at/Cxy0R/UHEiD24WG1xCrdoGYzd4yjrm4JsCauPdDhxRaa/FZXRNgO5Xtte7tM+s6A9vAiOtzpc/rj+3JzIppwkipahlePWpM3wnIuEfKJd3fLdsoAAdyVdFJle9tot1/7VpWVMKFYNJ1VoR2QAHmju30BMrIe7Loezo94jWa/cO1Hz3KUXcChwlzz49+3boX6Ig3v/168lyG 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)(10201501046)(3002001); SRVR:BN6PR03MB2740; BCL:0; PCL:0; RULEID:; SRVR:BN6PR03MB2740; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2740; 4:Ygdqd9xVRXCrah0Fq2GF63ILeWD0oRrV0riThtm7V17+d4latDWKjin/mAu045zRgsGWmD33713dQHIFP6wQ/TctlHFD+7ou3ERe59nqu0nZqJRU/foLlGPX/h720r5kFeC5zt6Rilh/lcnR/kMAwn5yEYem1FijEpYfLARn2CNmz8BSu6ICp/8bAkdqV7v39aBzPdEXofYjFWshwJkqODBsBFn9B8eLsIHwhqYnOeDmHJnAQ3XdkUCcLJPwEbn5g/4IegkLiwyefmCPuZL976THVEa4ZazN5OxDxP44rLOVTOYjD90pbWCv5YWNXfljIF+MbCx4ifYNPmozBwsTJoO83FqXhXGSjxYLZloo9HIMbrEFdBRMPiFG/pftP2PC6eMvIgKhI7xm8EVZEqd13A== X-Forefront-PRVS: 00462943DE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(189998001)(92566002)(77096005)(50986999)(2906002)(5001770100001)(5003940100001)(97736004)(66066001)(105586002)(19580395003)(2950100001)(53416004)(42186005)(7736002)(33646002)(106356001)(68736007)(36756003)(229853001)(50466002)(47776003)(1076002)(3846002)(86152002)(48376002)(5660300001)(6116002)(305945005)(7846002)(101416001)(76176999)(575784001)(86362001)(586003)(50226002)(19580405001)(107886002)(8676002)(4326007)(4001430100002)(69596002)(81166006)(81156014)(43062003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2740; H:SODEY-LMA.sonusnet.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) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2740; 23:INIqobAbyryc1Fh1kta01VPukWSSWNKQUBif3KYyv?= =?us-ascii?Q?ZUsnuK4vi3I75G0I9Cft4v0MX7FMGkcCGJAg+bQEdscRdgrtEWbnAaO87q+v?= =?us-ascii?Q?qgWPRix0z4FKYEIBc5V95Wlp9zftADV6B7tZxE6QXzzbELHwLJCLyvW/glfs?= =?us-ascii?Q?uB1rEMlt3gXH8P5jJ3mRArum0CTZs2K99I5g7LJ0zkApxRZBZIbtjLHrAV0b?= =?us-ascii?Q?3cAxQTw54vFY4kbm+Kxh99wEhjZviYUmN/WuDxTG60/8CguPJt6ltbECvdLc?= =?us-ascii?Q?ciwMBKfifJrUCwqeFmEm+4+6WCoLB/Tj9dkBGqdJ3PPFvsLVUcIx518UqXdX?= =?us-ascii?Q?+Y+xEkH3d2+vkGRtJNUExEJ8EDaOdwW3bGZjfo5KBcVSfgvF1girc1am1Yyn?= =?us-ascii?Q?qoto6shwhgBk2AqgvZJAzLWVId30+mQBspQexeTDaaewJ0nr8wMQkjVSbx24?= =?us-ascii?Q?RM9PRhubUNOMpAFfTcqJrGXgWDRfbNiVPGs8PqJR27/rbIQEfESOD0rF3KFG?= =?us-ascii?Q?yX0KOS0gte3NFs/iMCwtqVrsjEFEyd7aUcJC/52mJPzif+VZ3GY+9YMaL75d?= =?us-ascii?Q?N+/nm6Imwd4EnyqO6ioIwl4nu3oWhwEyikmSSzpGkYPlFCcNVrpPVKm1BoWj?= =?us-ascii?Q?IDsN67rSMXGexuIiLLeKVCD8hHSbs+hap6MoiUch1MeXvxfa349TUIpWMAAi?= =?us-ascii?Q?lueHYBye2oQ87KSi0b9zirlVMbgjBKFvy3nJcvgSJQG9H0r3pSyVL4bb53Z6?= =?us-ascii?Q?mkTxBbwCFH7q0G8IrEDMaG+IZVUTdN/rq9QZTg0H1V4A3BXvs7pvnUOOACiH?= =?us-ascii?Q?ekgnQGCsEt2FPma23fhRG5nXh3uH7zOROu8q6KapIldiZYGnixq00jmEcDzb?= =?us-ascii?Q?9zvLL2x40/lkaz2lv+1OIa06Zvb1NPrESLZLH98cR8lswwEIKwHvbcWdm4Sk?= =?us-ascii?Q?O08W8R9nxkyn4h7maaEwA7WCIng1aHpuBRonQqeLT1vj+YJ38lqBrdulYBJ0?= =?us-ascii?Q?Zn4waxgS0KcsEoQvirb2srK7RmkAtGWfXLgJOGR0W2Hf021us5rTX50P9eX1?= =?us-ascii?Q?L25IZIJVlBdKWiig92q3TmZp8feVXL6ezu0c//rzlCbawGeWgfPeTk2Ko41A?= =?us-ascii?Q?m6xf0TXtg496cxKrgYjgJCCR6CTqh9Jpt3p7zFVy7PjTgJfPaY6gQBN6NaxK?= =?us-ascii?Q?1thkit2qY3K7M5snw5Gg5iSs5vPY4G59vIUTGdXFzB0kkwKpTujMWPyVg=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2740; 6:6lJL0dCNzIyEc2rru+/d9XVhy1CDmcPi9PdzjheJnGX7OTM1x/zPz2/doj3jkaI4QaUEwflJ+QY/P6guybTAwxOUWmF8J5cZ0g1hs7HD9MqY+engRTZz6/MpD5SFSoRBvcrXDbbhgmPpv2FG43cGm69TfiMxEaM5eQCk56wuJ/sUbbx/pop5l3wCVeu1aGMBoabi5l2M0+wXxhUpV3y4jg8GNyBM0a2yopUuWln4EtWGHyUbj/rJucrP8WXCsUL36emQAhseVAXJpWP6Xq2X8NcsNcxU13ZiAbiFacGbkHc=; 5:BGe6OC8RznBsqAf5D6DtbZvE2zIrmQj7YdfaM/9h4WnUcFL1xEoBTxfR1RXL2/4eyKKCg1wwsWT0i9eKSZCw8w1yvj5jgUQ8GrQK27ebkiq2FeXotPvGlbqqVKyi9vUqd/XQ1Y66OWKNCzEZ5H6LIA==; 24:u+BLAjgGOQ4OWgF29gjRwdTgKilxUAD7nU2XQQhbJxhRPAOjL3D7bftN48dsrmapqgBez5AHTze2/HrrFvrXCD697j/IMAGc+5mm+4fY4FE=; 7:f9OQQPtU98HUoFnJb/6G/3MQpRGyak13Z/X++0Zda31urzOEVCVYK828trcJmk9C2LXnn4FXA2hY6loM712X/ClLqhrnrDbboZq6fpJ79LbkB6Jj7AcPL7kyyrQImRxS3g77gVQlwLM7HblQyRD3eDQjl6ldmEdd79R+e+gEINnppz5qlWd/Hnklo8UfYke4+swVE/8b0pxmZMRwdeepXbCA+5gyaX++ARsQtOuzrw1W2+SJM0z8xAoaZy/s9d0q SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sonusnet.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2016 05:51:00.8080 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2740 Subject: [dpdk-dev] [PATCH v2] tools: fix issue with virtio interfaces 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: Fri, 26 Aug 2016 05:51:04 -0000 This change is required to have the interface name for virtio interfaces. When we execute the status command the for virtio inerfaces we get Sample output without the change: 0000:00:04.0 'Virtio network device' if= drv=virtio-pci unused=virtio_pci,igb_uio Though for other drivers this works. Sample output with the change: 0000:00:04.0 'Virtio network device' if=eth0 drv=virtio-pci unused=virtio_pci,igb_uio souvikdey33 (1): Signed-off-by: Souvik Dey Fixes: 3da038604009 ("Signed-off-by: Souvik Dey ") tools/dpdk-devbind.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) -- >>From 3da0386040092fcd54ee333ceff8c427a36c6b45 Mon Sep 17 00:00:00 2001 From: souvikdey33 Date: Thu, 25 Aug 2016 23:31:28 -0400 Subject: [PATCH v2] Signed-off-by: Souvik Dey When we execute the status command the for virtio inerfaces the interface name is not shown. Sample output without the change. 0000:00:04.0 'Virtio network device' if= drv=virtio-pci unused=virtio_pci,igb_uio Though for other this works. --- tools/dpdk-devbind.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py index 9829e25..c0b46ee 100755 --- a/tools/dpdk-devbind.py +++ b/tools/dpdk-devbind.py @@ -36,7 +36,6 @@ import sys import os import getopt import subprocess -import commands from os.path import exists, abspath, dirname, basename @@ -224,14 +223,18 @@ def get_pci_device_details(dev_id): device[name] = value # check for a unix interface name sys_path = "/sys/bus/pci/devices/%s/net/" % dev_id - #The path for virtio devices are different. Get the correct path. - virtio = "/sys/bus/pci/devices/%s/" % dev_id - cmd = " ls %s | grep 'virt' " %virtio - virtio = commands.getoutput(cmd) - virtio_sys_path = "/sys/bus/pci/devices/%s/%s/net/" % (dev_id,virtio) + # the path for virtio devices are different, so get the correct path + virtio = "/sys/bus/pci/devices/%s/" % dev_id + ls = subprocess.Popen(['ls', virtio], stdout=subprocess.PIPE) + grep = subprocess.Popen('grep virt'.split(), stdin=ls.stdout, + stdout=subprocess.PIPE) + ls.stdout.close() + virtio = grep.communicate()[0].rstrip() + ls.wait() + virtio_sys_path = "/sys/bus/pci/devices/%s/%s/net/" % (dev_id, virtio) if exists(sys_path): device["Interface"] = ",".join(os.listdir(sys_path)) - elif exists(virt_path): + elif exists(virtio_sys_path): device["Interface"] = ",".join(os.listdir(virtio_sys_path)) else: device["Interface"] = "" -- 2.9.3.windows.1