From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Gary Mussar <gmussar@ciena.com>
Cc: dpdk stable <stable@dpdk.org>,
Yuanhan Liu <yuanhan.liu@linux.intel.com>,
John McNamara <john.mcnamara@intel.com>
Subject: [dpdk-stable] patch 'tools: fix virtio interface name when binding' has been queued to stable release 16.07.1
Date: Wed, 12 Oct 2016 14:44:24 +0800 [thread overview]
Message-ID: <57fddbc8.QCuN/epDEagCN5jV%yuanhan.liu@linux.intel.com> (raw)
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 <gmussar@ciena.com>
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 <gmussar@ciena.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
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
reply other threads:[~2016-10-12 6:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57fddbc8.QCuN/epDEagCN5jV%yuanhan.liu@linux.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=gmussar@ciena.com \
--cc=john.mcnamara@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).