From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0064.outbound.protection.outlook.com [104.47.40.64]) by dpdk.org (Postfix) with ESMTP id 94F3D5686 for ; Thu, 25 Aug 2016 04:26:09 +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=FMukSXv+pBCJw+5xEf2KjGo99WS4l6SBDURC6D6MvBU=; b=uQnn5XYb6Bd+8Viw5itHoJ2nk5htjFjkM4ERFR6V5TlmfjXVyjHYaifW1MXMAUk/0uE+WB64BB2yUVUqtcPoQV/a4+WUhH7oJUuAdbYnokOrKT3JmpIeciyv/5zytE6T7whRE9a63MloKBnZGfRGjFHxV1y9k1jWq9SwvEUsm+g= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sodey@sonusnet.com; Received: from SODEY-LMA.sonusnet.com (73.114.35.72) by DM5PR03MB2745.namprd03.prod.outlook.com (10.168.197.147) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9; Thu, 25 Aug 2016 02:26:05 +0000 From: souvikdey33 To: , CC: souvikdey33 Date: Wed, 24 Aug 2016 22:25:46 -0400 Message-ID: <20160825022546.96468-1-sodey@sonusnet.com> X-Mailer: git-send-email 2.9.3.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [73.114.35.72] X-ClientProxiedBy: BN3PR0301CA0075.namprd03.prod.outlook.com (10.160.152.171) To DM5PR03MB2745.namprd03.prod.outlook.com (10.168.197.147) X-MS-Office365-Filtering-Correlation-Id: 6e1b79c2-8460-46fe-aeed-08d3cc8f2ae2 X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2745; 2:W2u7JIte78ehh5SpU5EvB+HrpqM9IQfGkAU9PJLiOlEWwKGH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2Y74vPo5kvNd8q9mmOtvX3OTsXyA3jF59zcv+Wda15OZ+YDf6l0XUMi35LHfF4EKEV61uCYbiiyb6pGWLWagM1los8RpS3Q/O9EZigH53s2WjlDjMR/BL8TztzGbyVfOqd4aOYxrMqV7l9jqJMCG2/oc0p0SYyjO2v0tunVmIsee/5Ng2KdKjpOUS7tOY5jVPEqqy1Godjl66jf4cFMuidGCDWibMZ4uGVN8Gc6tBpRaGFKnDM03gP0fmBhonCA3qUtGAGefrqVXdbGfesKCRV0PHXhydzjm7POO5p80MzPUv1XkpK6lOy7lrOtYQbAiru5d+2/1VZosrQaToJc0v6hX1rfe0hbQeNYsKeMADM7AYvS36SG9uOmWo1eaIIUchnVzQwQWnVwCeLEv2+d2A3oIBjRt9eVrqFVvg2XLTBjUYRYC5B2c70gPB7EqHUI8xA6li9giS6uO2ZdDQ9XdGaQXnBtq+hsiBl0/XGghyg0X X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:DM5PR03MB2745; BCL:0; PCL:0; RULEID:; SRVR:DM5PR03MB2745; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2745; 4:7fUWzFNQiq0SIkMlHkoDK8g8x6ce8oGY3XWFlxrfHPHACVUEHfy1L9d6JpnFmpAZmne934XGRFPIqnwozZHcUfWnd3w6UYlnZ01pFd/8ZM1BatNxanGDInD9afYwujSb0U9BB7JB+6CxBLZEboxFped1kmhvM08IFxSWTrUBSmUH6TMBBYEmUwsZgb/5KYRjxs28bP4GSY/w19Q6YRtZ2d2caE+psTZ7QqjyR1HDHWKWfc5sex3LMcvoRAehzQfNUYR5xICCx1Eq6TCHBt3Uek5D3OsBYIPkbz6XAu3udxtfO6n1YSQpXcVVX+7UfKYg1Ii6FtQHIJl/J1py4ElDwJjnDk+elDwlArkwclBfrVtxuY271Q6ZXHVLF6NvlK2rJqyZY9hfkdE7cI5ceZhWKQ== X-Forefront-PRVS: 0045236D47 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(106356001)(47776003)(105586002)(19580405001)(19580395003)(86362001)(42186005)(92566002)(66066001)(53416004)(5003940100001)(86152002)(229853001)(101416001)(50986999)(189998001)(33646002)(107886002)(77096005)(1076002)(50226002)(81156014)(8676002)(5001770100001)(5660300001)(81166006)(97736004)(586003)(7736002)(36756003)(6116002)(305945005)(2906002)(3846002)(4001430100002)(50466002)(68736007)(4326007)(7846002)(69596002)(48376002)(43062003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2745; 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; DM5PR03MB2745; 23:LJ0XgvkNr/v2vzzo6nuCuFeQyVfD9Rcz26vwIAVJ3?= =?us-ascii?Q?QNAlYVb3hLTO9+Xv2hw1EuIEjvuKKTl4liEMlFojYL5O5Gr4CmcsG+pUwHAf?= =?us-ascii?Q?KfKbOLecTXjkGgSc3YPoJ1GnsAuMDAmrOd5QpoMGlpyyuFza2leG8QRH031d?= =?us-ascii?Q?VVepszRH7C6hSdgZgobBsOlcDIN1h6eparJYxHHrBAAo2sCxiGTK/4fWx/r/?= =?us-ascii?Q?2aEKvLhRsKtbNx5sWnLgjspeqXXRmBsQDufRkedJ7PqQrOfmS/kXWadzSt7p?= =?us-ascii?Q?olOe6uwC7dp8DB9CkG0cuQbS0kjIqxsPFjTG+/pCYkIIoD9cZk7UjXCNLtpy?= =?us-ascii?Q?lJhvOAtnRP7DgDq75iEsifO4pOG1oJ+ygL+IfQnCdrHkGJRHVD584OJVDHxH?= =?us-ascii?Q?sk7bjt0dpfpHtBTdFAovp6JUkDWy0C+h48rjuJ8zDKS+6P6G18Rg+K4OvoKq?= =?us-ascii?Q?pClVDD2LSYNg1IF/KZow3EkLO9fRNh/EcPJkTiwFSl5ebOlb9edcphLyFwxg?= =?us-ascii?Q?jQwwZ99tGyuSFSdJweGwJwGSy0k7Hr3q7+wxSDL7QypJNi4fzSPwTQ1IfHEf?= =?us-ascii?Q?vjy9ubztcMZQB9PunJpUkJTqyWLkAe8woPdHPUWfmJR5QGtIziuJmxkrf/lG?= =?us-ascii?Q?jONskBmFHy4c/EjkpCdX2jCNbf9T00xEScTOrnWJUYf3IYNtIdh99eN3np5N?= =?us-ascii?Q?YOPacGVmCP5Jr7lmAAJFQCk1GM/EvZEhvqmstsUpuGrx0rprwJF/A90OmGE8?= =?us-ascii?Q?xLzq5nEzonsxwNgU5n7oYlDrAH0djOkYLYswTysm1N/ppv5Kf7uF6z2yUnIn?= =?us-ascii?Q?p/pvKnI3zZBAAHQlYppgAu08rmir2j/eGa5FuCelBqvQNdl4nX19usxbsycn?= =?us-ascii?Q?Rpoj4ggRHmht+cmmoFzqKq/+kHvzqoFvz5Xyje3VMV9Fk5pmjk6K0V0pfp4+?= =?us-ascii?Q?hwLGArWSenHWneP68NUwhG8HA4P9At/3pPnFJQ84It6+fFQ8S7CLNYFfQNIx?= =?us-ascii?Q?HkbJPkI7ItPP81RzkL4HtTu7bprFeSK/1uJFQp+bma5Mc/cyewFqbADbB/4s?= =?us-ascii?Q?8usG4LBCDIPU4VH4afDe2kmcJa3/lbD8y3zzSh67rszaNTGBcz0Fq/1tULtY?= =?us-ascii?Q?pK2nMhdXAa+TNymkoBXO7IvMuYsveL557GUIPpqHI32HAp0ZsOqCw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2745; 6:JjqwfO82z+hY0sp1e9Fx0wVHNGwHwFbaodOcjfXCz6/VJuwRN+mBGHPHOjHWEGtEI6gmjGEyqXVkqHHIkorcswBPuFijNyJZybD57pWSSBuzR/VtkglipRcJXt3Ri6b32f+myyKgJ9KUG1XBUV/EQhQZ75yby8Xik2JTTrk9Uqe9Gkw3LTejUbGBlFTCgk6ds/WvkmJPowz9aA694/kwPLnV56cHTz6kKJeUtvVlKDHGFCAmnrIA8iLUAzKZ7x/0vzwuhka+J4tprxQ9nINGv7N5p7ok6GOMo/G5hl2A6gE=; 5:ak+c0iF2BqWDeqMLmj/OJs6heMFyqxrmxcNyAtL0qBG+vZqC09QTY/sRRgnKAHQu3EzXifQ5jsiPe1k2FMfkxGMjI1Nsme1bqvaJaGmAz4ZQaQPWbiC+cdfJamK/QROBBmP4HIPm3Um33gzl5QM8+A==; 24:zb28I02HGxNrH+QUSemChtNI2TVLh8ITrQ7qnyl70YBZuc/FIxrkvVnQ30D+WhmpUPC6kxu64aX6OegckqY54JDeuL88+3c0MGbJJ1VPpZA=; 7:3RS2w1/lMAObJ0ftfhI+WIF8weDx0XVcsYXvDG9EoR5KeOnmfEO66uPqrOlfEQO7ORc8hEkGVSwUZH4spuMabxWGOQsBqbFI9QigwfzajRZoEBoTuIueFzwJslJBqZgLM2oCosDUy4UQEDPuDCiFsqoCl+p3+DPS3aAiwPA0as9TuDRe7Jp9NN9XiaId9+rJv8mS8a/bHaJdndMugzxyL866lb21OClalwhiWosBDM7FEONBP6xwOEal+VKjHJCM SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: sonusnet.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2016 02:26:05.7817 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2745 Subject: [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: Thu, 25 Aug 2016 02:26:10 -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: souvikdey33 tools/dpdk-devbind.py | 9 +++++++++ 1 file changed, 9 insertions(+) From d9e8937b8d88a22ee5519fde2c728b377bc8fb1f Mon Sep 17 00:00:00 2001 From: souvikdey33 Date: Wed, 24 Aug 2016 19:56:36 -0400 Subject: [PATCH v1] Signed-off-by: souvikdey33 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 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py index b69ca2a..9829e25 100755 --- a/tools/dpdk-devbind.py +++ b/tools/dpdk-devbind.py @@ -36,6 +36,8 @@ import sys import os import getopt import subprocess +import commands + from os.path import exists, abspath, dirname, basename # The PCI base class for NETWORK devices @@ -222,8 +224,15 @@ 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) if exists(sys_path): device["Interface"] = ",".join(os.listdir(sys_path)) + elif exists(virt_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