DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names
@ 2016-09-02 13:16 Gary Mussar
  2016-09-02 15:23 ` Mcnamara, John
  0 siblings, 1 reply; 7+ messages in thread
From: Gary Mussar @ 2016-09-02 13:16 UTC (permalink / raw)
  To: dev; +Cc: Gary Mussar

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>
---
 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"] = ""
-- 
2.1.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names
  2016-09-02 13:16 [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names Gary Mussar
@ 2016-09-02 15:23 ` Mcnamara, John
  2016-09-22 14:34   ` Mussar, Gary
  2016-09-23  9:49   ` Yuanhan Liu
  0 siblings, 2 replies; 7+ messages in thread
From: Mcnamara, John @ 2016-09-02 15:23 UTC (permalink / raw)
  To: Gary Mussar, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Gary Mussar
> Sent: Friday, September 2, 2016 2:17 PM
> To: dev@dpdk.org
> Cc: Gary Mussar <gmussar@ciena.com>
> Subject: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names
> 
> 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>

Thanks for that.

Note, the subject line should be lowercase but apart from that:

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names
  2016-09-02 15:23 ` Mcnamara, John
@ 2016-09-22 14:34   ` Mussar, Gary
  2016-09-22 14:46     ` Thomas Monjalon
  2016-09-23  9:49   ` Yuanhan Liu
  1 sibling, 1 reply; 7+ messages in thread
From: Mussar, Gary @ 2016-09-22 14:34 UTC (permalink / raw)
  To: Mcnamara, John, dev; +Cc: yuanhan.liu, thomas.monjalon

I am new at submitting patches to dpdk.org. This patch has been acked and patchwork claims success on build it: http://www.dpdk.org/dev/patchwork/patch/15595/

Other users state it has corrected their problems. Am I supposed to be doing something else with it before it gets applied to master?

Gary

> -----Original Message-----
> From: Mcnamara, John [mailto:john.mcnamara@intel.com]
> Sent: Friday, September 02, 2016 11:24 AM
> To: Mussar, Gary; dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Gary Mussar
> > Sent: Friday, September 2, 2016 2:17 PM
> > To: dev@dpdk.org
> > Cc: Gary Mussar <gmussar@ciena.com>
> > Subject: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface
> > names
> >
> > 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>
> 
> Thanks for that.
> 
> Note, the subject line should be lowercase but apart from that:
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names
  2016-09-22 14:34   ` Mussar, Gary
@ 2016-09-22 14:46     ` Thomas Monjalon
  2016-09-23  7:36       ` Yuanhan Liu
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2016-09-22 14:46 UTC (permalink / raw)
  To: Mussar, Gary; +Cc: Mcnamara, John, dev, yuanhan.liu

2016-09-22 10:34, Mussar, Gary:
> I am new at submitting patches to dpdk.org. This patch has been acked and patchwork claims success on build it: http://www.dpdk.org/dev/patchwork/patch/15595/
> 
> Other users state it has corrected their problems. Am I supposed to be doing something else with it before it gets applied to master?

No, thanks Gary.
It will be applied as soon as a lazy guy starts doing his work :)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names
  2016-09-22 14:46     ` Thomas Monjalon
@ 2016-09-23  7:36       ` Yuanhan Liu
  2016-09-23  8:39         ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Yuanhan Liu @ 2016-09-23  7:36 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Mussar, Gary, Mcnamara, John, dev

On Thu, Sep 22, 2016 at 04:46:52PM +0200, Thomas Monjalon wrote:
> 2016-09-22 10:34, Mussar, Gary:
> > I am new at submitting patches to dpdk.org. This patch has been acked and patchwork claims success on build it: http://www.dpdk.org/dev/patchwork/patch/15595/
> > 
> > Other users state it has corrected their problems. Am I supposed to be doing something else with it before it gets applied to master?
> 
> No, thanks Gary.
> It will be applied as soon as a lazy guy starts doing his work :)

Hmm., I just found this has been assinged to me in patchwork...

Thomas, should I apply it to next-virtio tree, or you will apply it on
yours?

	--yliu

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names
  2016-09-23  7:36       ` Yuanhan Liu
@ 2016-09-23  8:39         ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2016-09-23  8:39 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: Mussar, Gary, Mcnamara, John, dev

2016-09-23 15:36, Yuanhan Liu:
> On Thu, Sep 22, 2016 at 04:46:52PM +0200, Thomas Monjalon wrote:
> > 2016-09-22 10:34, Mussar, Gary:
> > > I am new at submitting patches to dpdk.org. This patch has been acked and patchwork claims success on build it: http://www.dpdk.org/dev/patchwork/patch/15595/
> > > 
> > > Other users state it has corrected their problems. Am I supposed to be doing something else with it before it gets applied to master?
> > 
> > No, thanks Gary.
> > It will be applied as soon as a lazy guy starts doing his work :)
> 
> Hmm., I just found this has been assinged to me in patchwork...
> 
> Thomas, should I apply it to next-virtio tree, or you will apply it on
> yours?

Oh sorry, I was thinking to apply it myself when reading Gary's mail.
But yes, Yuanhan, you can handle it in the virtio tree.
It will be faster if you bypass the lazy man ;)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names
  2016-09-02 15:23 ` Mcnamara, John
  2016-09-22 14:34   ` Mussar, Gary
@ 2016-09-23  9:49   ` Yuanhan Liu
  1 sibling, 0 replies; 7+ messages in thread
From: Yuanhan Liu @ 2016-09-23  9:49 UTC (permalink / raw)
  To: Mcnamara, John; +Cc: Gary Mussar, dev, stable

On Fri, Sep 02, 2016 at 03:23:34PM +0000, Mcnamara, John wrote:
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Gary Mussar
> > Sent: Friday, September 2, 2016 2:17 PM
> > To: dev@dpdk.org
> > Cc: Gary Mussar <gmussar@ciena.com>
> > Subject: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names
> > 
> > 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>
> 
> Thanks for that.
> 
> Note, the subject line should be lowercase but apart from that:

Applied to dpdk-next-virtio, this this minor fix.

And, it looks like a good candidate for stable release, so,
stable@dpdk.org cc'ed.

Thanks.

	--yliu

> 
> Acked-by: John McNamara <john.mcnamara@intel.com>
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-23  9:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02 13:16 [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names Gary Mussar
2016-09-02 15:23 ` Mcnamara, John
2016-09-22 14:34   ` Mussar, Gary
2016-09-22 14:46     ` Thomas Monjalon
2016-09-23  7:36       ` Yuanhan Liu
2016-09-23  8:39         ` Thomas Monjalon
2016-09-23  9:49   ` Yuanhan Liu

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).