DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] usertools: fix adding devices of same class
@ 2017-05-04 10:48 Jerin Jacob
  2017-05-04 10:48 ` [dpdk-dev] [PATCH 2/2] usertools: add cavium pkx device as network device Jerin Jacob
  2017-05-07 12:32 ` [dpdk-dev] [PATCH 1/2] usertools: fix adding devices of same class Thomas Monjalon
  0 siblings, 2 replies; 3+ messages in thread
From: Jerin Jacob @ 2017-05-04 10:48 UTC (permalink / raw)
  To: dev; +Cc: thomas, Guduri Prathyusha

From: Guduri Prathyusha <gprathyusha@caviumnetworks.com>

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: 8ad08a287918 ("usertools: define DPDK PCI functional device")

Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
---
 usertools/dpdk-devbind.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index 2d99e9d82..79e7e8938 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -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
-- 
2.12.2

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

* [dpdk-dev] [PATCH 2/2] usertools: add cavium pkx device as network device
  2017-05-04 10:48 [dpdk-dev] [PATCH 1/2] usertools: fix adding devices of same class Jerin Jacob
@ 2017-05-04 10:48 ` Jerin Jacob
  2017-05-07 12:32 ` [dpdk-dev] [PATCH 1/2] usertools: fix adding devices of same class Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Jerin Jacob @ 2017-05-04 10:48 UTC (permalink / raw)
  To: dev; +Cc: thomas, Jerin Jacob

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 usertools/dpdk-devbind.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index 79e7e8938..f0225b6ce 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -49,8 +49,10 @@
               'SVendor': None, 'SDevice': None}
 cavium_fpa = {'Class': '08', 'Vendor': '177d', 'Device': 'a053',
               'SVendor': None, 'SDevice': None}
+cavium_pkx = {'Class': '08', 'Vendor': '177d', 'Device': 'a0dd,a049',
+              'SVendor': None, 'SDevice': None}
 
-network_devices = [network_class]
+network_devices = [network_class, cavium_pkx]
 crypto_devices = [encryption_class, intel_processor_class]
 eventdev_devices = [cavium_sso]
 mempool_devices = [cavium_fpa]
-- 
2.12.2

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

* Re: [dpdk-dev] [PATCH 1/2] usertools: fix adding devices of same class
  2017-05-04 10:48 [dpdk-dev] [PATCH 1/2] usertools: fix adding devices of same class Jerin Jacob
  2017-05-04 10:48 ` [dpdk-dev] [PATCH 2/2] usertools: add cavium pkx device as network device Jerin Jacob
@ 2017-05-07 12:32 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-05-07 12:32 UTC (permalink / raw)
  To: Jerin Jacob, Guduri Prathyusha; +Cc: dev

04/05/2017 12:48, Jerin Jacob:
> From: Guduri Prathyusha <gprathyusha@caviumnetworks.com>
> 
> 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: 8ad08a287918 ("usertools: define DPDK PCI functional device")
> 
> Signed-off-by: Guduri Prathyusha <gprathyusha@caviumnetworks.com>

Series applied, thanks

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

end of thread, other threads:[~2017-05-07 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 10:48 [dpdk-dev] [PATCH 1/2] usertools: fix adding devices of same class Jerin Jacob
2017-05-04 10:48 ` [dpdk-dev] [PATCH 2/2] usertools: add cavium pkx device as network device Jerin Jacob
2017-05-07 12:32 ` [dpdk-dev] [PATCH 1/2] usertools: fix adding devices of same class Thomas Monjalon

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