From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1455A6CC9 for ; Wed, 12 Oct 2016 08:44:48 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 11 Oct 2016 23:44:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,332,1473145200"; d="scan'208";a="1043572793" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga001.jf.intel.com with ESMTP; 11 Oct 2016 23:44:47 -0700 Date: Wed, 12 Oct 2016 14:44:24 +0800 From: Yuanhan Liu To: Gary Mussar Cc: dpdk stable , Yuanhan Liu , John McNamara Message-ID: <57fddbc8.QCuN/epDEagCN5jV%yuanhan.liu@linux.intel.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [dpdk-stable] patch 'tools: fix virtio interface name when binding' has been queued to stable release 16.07.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Oct 2016 06:44:49 -0000 Hi, FYI, your patch has been queued to stable release 16.07.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before this Friday. So please shutout if anyone has objections. Thanks. --yliu --- >>From 982e68b2f51d3198a5915f46067d3c9c90f40599 Mon Sep 17 00:00:00 2001 From: Gary Mussar Date: Fri, 2 Sep 2016 09:16:33 -0400 Subject: [PATCH] tools: fix virtio interface name when binding [ upstream commit 07c9d24e9d6ad7a4fcc7a0e80e72deda8c35c19a ] The dpdk-devbind.py script does not find/display the ifname for virtio interfaces since the "net" directory is not directly under the device directory but rather under a subdirectory. eg. > dpdk-devbind.py --status 0000:00:03.0 'Virtio network device' if= drv=virtio-pci unused= This change searches for the first "net" directory under the device directory hierarchy. eg. 0000:00:03.0 'Virtio network device' if=ens3 drv=virtio-pci unused= Fixes: 629395b063e8 ("igb_uio: remove PCI id table") Signed-off-by: Gary Mussar Acked-by: John McNamara Acked-by: Yuanhan Liu --- tools/dpdk-devbind.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py index b69ca2a..34be495 100755 --- a/tools/dpdk-devbind.py +++ b/tools/dpdk-devbind.py @@ -221,11 +221,12 @@ def get_pci_device_details(dev_id): name = name.strip(":") + "_str" device[name] = value # check for a unix interface name - sys_path = "/sys/bus/pci/devices/%s/net/" % dev_id - if exists(sys_path): - device["Interface"] = ",".join(os.listdir(sys_path)) - else: - device["Interface"] = "" + device["Interface"] = "" + for base, dirs, _ in os.walk("/sys/bus/pci/devices/%s/" % dev_id): + if "net" in dirs: + device["Interface"] = \ + ",".join(os.listdir(os.path.join(base, "net"))) + break # check if a port is used for ssh connection device["Ssh_if"] = False device["Active"] = "" -- 1.9.0