From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0083.outbound.protection.outlook.com [104.47.36.83]) by dpdk.org (Postfix) with ESMTP id E049258C8 for ; Fri, 26 Aug 2016 06:00:23 +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=AnsPsMnVaGwM9yLaAuE6muR3kMsVnzs2w/IIfyaNElEGgTfydPAz8S+z+LvUBUBHH0iAC2xm3r7ajpMZkZ5kbfqi9BlaSnIPKIO/TR/4YKWqRjQGa8+okuJ5ITwkfxJP9i3P1Yn7itkio3pAIrXjOMQn8bKNi9pySrqIrtErCzk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sodey@sonusnet.com; Received: from SODEY-LMA.sonusnet.com (73.114.35.9) by CY4PR03MB2742.namprd03.prod.outlook.com (10.173.38.8) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9; Fri, 26 Aug 2016 04:00:12 +0000 From: souvikdey33 To: , CC: souvikdey33 Date: Thu, 25 Aug 2016 23:59:56 -0400 Message-ID: <20160826035956.17580-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: DM2PR0801CA0013.namprd08.prod.outlook.com (10.162.18.23) To CY4PR03MB2742.namprd03.prod.outlook.com (10.173.38.8) X-MS-Office365-Filtering-Correlation-Id: f0fc8b0e-ef63-455a-99f6-08d3cd657b46 X-Microsoft-Exchange-Diagnostics: 1; C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6AXkuF8tpEddfX64f6pE73HSpreXwJh95gMS5KXndv2VDMKuW0NfJKOdx0hlBeMIh4zqe0fOsIKSoxslkHQxi3MCpDL2jPy8ug9STYK5fiI9GPncdjFCh/iOr5HR7uSo2Ywsmw+XVol8T/xBMn5ynNCbE5GdjFoqgU2/NHiMC2sKdYk/9ifaA4qXdOlNF912sEs8AM9Fw== 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:CY4PR03MB2742; BCL:0; PCL:0; RULEID:; SRVR:CY4PR03MB2742; X-Forefront-PRVS: 00462943DE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(189002)(199003)(7736002)(305945005)(42186005)(7846002)(8676002)(2950100001)(36756003)(1076002)(81166006)(81156014)(66066001)(47776003)(50226002)(2906002)(19580405001)(19580395003)(575784001)(86362001)(105586002)(4326007)(86152002)(48376002)(50466002)(53416004)(97736004)(4001430100002)(229853001)(189998001)(107886002)(92566002)(5001770100001)(5003940100001)(50986999)(76176999)(33646002)(101416001)(106356001)(77096005)(6116002)(586003)(3846002)(68736007)(69596002)(5660300001)(43062003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2742; H:SODEY-LMA.sonusnet.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; CY4PR03MB2742; 23:gmTHGTphqiLOvdwsn9YDnRsKpna7CufLeOgi10ndM?= =?us-ascii?Q?ia7fmjG8Cba+S+Py0SLWpG2GPu3ZdLY43U5UZDE4Zw+nCTu/uW8JUy2Am5vB?= =?us-ascii?Q?E21HyNYd7JNBpoS/RlixDZYntNPa/NKMHmRUH/y9ukTEqc3xUZx2z0Q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JQRXaFbcbloBI4gL/waHigbhYLdPYXWdaEscnxreMwkd3Tj6FR2nvVtg/x0J4RgU SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sonusnet.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2016 04:00:12.9484 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2742 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 04:00:24 -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