From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0043.outbound.protection.outlook.com [104.47.33.43]) by dpdk.org (Postfix) with ESMTP id 06E21677D for ; Fri, 26 Aug 2016 13:36:13 +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=fHNILcC/1RBIOAsCr6NgCofmGxlaVuX5IY0XS6c/tw4=; b=D4U/hLMwKkezexvUZ9TNow56Xk25r2nPADAss0s/WZxKpF20vWBeu1jnWS/m+rdPRHQpRMGCH1kzsYskNFLwOzbQ/eX0RPK0GcZalhNURwh0/93B6EIjwmAKDsXghoPp2gBWFdBOe7sCJdrOLZdd3QwOQbIzJiErynJ6UEQ55UA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sodey@sonusnet.com; Received: from SODEY-LMA.sonusnet.com (73.114.33.70) 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 11:36:10 +0000 From: souvikdey33 To: CC: souvikdey33 Date: Fri, 26 Aug 2016 07:35:58 -0400 Message-ID: <20160826113558.11856-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.33.70] X-ClientProxiedBy: DM5PR20CA0046.namprd20.prod.outlook.com (10.171.161.160) To BN6PR03MB2740.namprd03.prod.outlook.com (10.173.144.135) X-MS-Office365-Filtering-Correlation-Id: bf770faa-d208-4ff4-8978-08d3cda52d81 X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2740; 2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fmlu7WQytWMDy20=; 20:MVZ0FRcvkzPMWBUd9OpMjupIDiuTVPL6l8upw7craCfxAp5IzFmcrvlpSxiagW+QNtY6nw56sibFgUSZwOG355+JYitfJqxxjEbuJqkGl2mYJ+FAQ4OjSV4HtliEKWL92eDwbQI9LVIguLJTRbFxrJ8EsoqAqvGXjzK1iVd97KLnofKET/QaHi9EVhm6MCX3Q/q+n5LgsxJrnnbDvT7Gr/rcimJUuIk2wgc9FD7oVu12+wAlF0bfrZZr336DlABz6hwvUHcdfLxehTzkKByIdzY3OWk71nACkDyLRoYkWultCa6r+qebUj3E2AHBD1rY0n47IRBTlxSjavA94gZku1QOirhcScJh5sBD0EGpi1Ct/0toN3GxBHQwX3xbejrSWNt3+fOkGKUOziYVNDIqkkMTJFz85hgd+Wnq0fQt2S2p6t/vI48lmkmgCWXRHkGUp1IIRrQyHN65Sfh6LUN1BgQoSIgobj30fme5MWPdW5WX1RdTKcam5lskgsSbfn0U 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:h2soHAh1b2KnjdhhJwMgHqE/V1SngcpUjQMHhYWzLre5mWbK2YTVfu3JQnO6culTWZFGU9bw2vvniPqTZcbf+i0N4Z8a7Yq13qo0p6A1eeLiHY9Uj/DCDVmSnE6Vf+EEvPO1WwGSr5laITu7RbUT+WBtepQGa3STJ1dqKURKwc5U7+0wIc7AB6wyWDFgPr2esWZ9LVrK/biyoATHNIvQgJrRlkAOXKTTeyL/ynm3Il1SAQjKWA1aSEshyOFTVns2NFgq94ZwJDYfLvXXdpljTo4u2xYSsF92EL6WveTR30JeVb/BmmyocHdVyVrDDgBbL4Gd078FdjM1Eoo84OM2QKp8EG8xeQK7mEQfswntnSmcaAwabYLMfvsxky7nsG0jbbqEiFs9Yy4cnIT8Dc+4gA== X-Forefront-PRVS: 00462943DE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(189002)(199003)(76176999)(7846002)(101416001)(575784001)(586003)(305945005)(86362001)(1076002)(86152002)(3846002)(50466002)(47776003)(48376002)(5660300001)(6116002)(4001430100002)(110136002)(69596002)(81166006)(81156014)(19580405001)(50226002)(4326007)(107886002)(8676002)(5003940100001)(450100001)(2906002)(105586002)(97736004)(66066001)(50986999)(189998001)(92566002)(77096005)(42186005)(2950100001)(53416004)(33646002)(106356001)(7736002)(68736007)(36756003)(2351001)(229853001)(19580395003)(43062003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2740; 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; BN6PR03MB2740; 23:gjuA4fxOvBReufTfBHd91z9Ts+9ELv93C67IGwxtW?= =?us-ascii?Q?tr7YNFh87qzMnmcpK7vaTfe/V0xMNw9BBAaepDEsq6sHt8ljgyzjtQrJReXb?= =?us-ascii?Q?vRrgCn0Fp1VoIprE5lgvmmXEYvKa2YFpbhA9SDYxgyAWaAqtrDfL76X+TwEl?= =?us-ascii?Q?LrbFjCv9RuHOPy4BWdcEoE9Fsy48SkXoY27Q8VniHoeMSUgFKTXEe7FbKYrc?= =?us-ascii?Q?0VdQPvE5WDZkzftm5zUmyJqFOT1AHX3H9UyR8nnneXYtXQrJ6pWRYAi2Pg4a?= =?us-ascii?Q?gi0wTe6ZtRcxkQz/YFCZreqKe2FYOZLiTqwHIUxmPsqSLKHVTKfcE1hZXji6?= =?us-ascii?Q?lzjvnKltdcoCG/Oa6c9CPQZaLNyukk3tg2sFsQvARgF9q1PSrresnfgu7Ka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LZZJ?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2740; 6:BpS9rdMmmjPxrgh2QTBglHmLJb6jNjnRkzRE9r8xS0fJvCy/21twsVJsbQwdyi0QE9IbhHaf8kMTLYHMKzUlH7g9uK8iwaN+JwfHDBvkg5r90hTgauVVgIfHC9zC03mIlt9FwAv4E/S6xi4bPfcUePUeKh1sjoqkiDclglZxQQvsZlYBV4CFp3cBXyK5R/JHCeEQydR6l6HU0YyVUBCqJgdwOfMx0hgtuX1fQ6XrtoujBzWZvI/bKRe9ls3LD5uReD1pNGl+tphu9lXaOifLoe5QAmTFjZK9LHC/vtCMYS4=; 5:45EZ01We8/coS64S4+Ai4JjPedxgPSEM01VW7kApLPEf8gtohYjuxQdNIBwXmvNbYChgZ2Kxhg/DnfbUlD73BKk6qa97Js3tluUCd6zLZRz4KSfSp7MTSYaSB85BhAEtlIPMjgFpSsfTFK1TDiYeJg==; 24:luq4M4j9uUo7+Lho1O9Mtqywq19njRqJ47CdX8p2qsCx1UwcIqV1rhIJ2v0uONcc0DTsihYwhYx5+UCWEbwQKyaA6Lp32RakBvzXRJgF5hw=; 7:Z0EfEmLhdk6KnOcrNXKGxk2BDWM8mnG3YkHToCqlsgz9hv0orT8jH2gRGmF0o0OUi5c8iOTpgmUYHO0hhLE1LhFkCUwLJ94Nq+2a4Em+6FXxSWedjff+F0uls3FPgghmBFCnYHvEWhIdrPwSDfiIGjROEjKeX0dkcKXgyG6jxCTdH4btmIpa6o/k1Ydhl5SidsRtBGjEOnoHsaUv8mnXlOpjq1m41MJcR89B9WmSAocrflJ4MnhODVgNItkfjidV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sonusnet.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2016 11:36:10.2600 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2740 Subject: [dpdk-dev] [PATCH v3] 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 11:36:13 -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 tools/dpdk-devbind.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- >>From 1fb8e8896ca8d5b33bdcc875231bfb5ff72550c6 Mon Sep 17 00:00:00 2001 From: souvikdey33 Date: Fri, 26 Aug 2016 07:27:43 -0400 Subject: [PATCH v3] 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. Fixes: e2af2c716077 ("Signed-off-by: Souvik Dey ") --- tools/dpdk-devbind.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py index b69ca2a..c0b46ee 100755 --- a/tools/dpdk-devbind.py +++ b/tools/dpdk-devbind.py @@ -36,6 +36,7 @@ import sys import os import getopt import subprocess + from os.path import exists, abspath, dirname, basename # The PCI base class for NETWORK devices @@ -222,8 +223,19 @@ 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, 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(virtio_sys_path): + device["Interface"] = ",".join(os.listdir(virtio_sys_path)) else: device["Interface"] = "" # check if a port is used for ssh connection -- 2.9.3.windows.1