usertools: fix binding device match

If multiple devices of same class are added to a device type,
only devices that match first device listed in device type list are
processed.

Fixing it in device_type_match() by returning false after iterating
through all the devices listed in a device type list.

Fixes: 8ad08a2879 ("usertools: define DPDK PCI functional device")

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
This commit is contained in:
Guduri Prathyusha 2017-05-04 16:18:49 +05:30 committed by Thomas Monjalon
parent 3af72783d1
commit 6413d477a6

View file

@ -354,8 +354,7 @@ def device_type_match(dev, devices_type):
# count must be the number of non None parameters to match
if match_count == param_count:
return True
else:
return False
return False
def dev_id_from_dev_name(dev_name):
'''Take a device "name" - a string passed in by user to identify a NIC