tools: fix virtio interface name when binding
authorGary Mussar <gmussar@ciena.com>
Fri, 2 Sep 2016 13:16:33 +0000 (09:16 -0400)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 27 Sep 2016 06:08:31 +0000 (08:08 +0200)
commit07c9d24e9d6ad7a4fcc7a0e80e72deda8c35c19a
tree2a1d39c300f27cabbbf0118696e4c1cff0cd7f66
parent81f7234b9e858a7e98bae1eb88bcd02ac93997ce
tools: fix virtio interface name when binding

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