From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: [PATCH 1/2] usertools: fix adding devices of same class Date: Thu, 4 May 2017 16:18:49 +0530 Message-ID: <20170504104850.7404-1-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: thomas@monjalon.net, Guduri Prathyusha To: dev@dpdk.org Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0083.outbound.protection.outlook.com [104.47.37.83]) by dpdk.org (Postfix) with ESMTP id 213C17C95 for ; Thu, 4 May 2017 12:49:21 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Guduri Prathyusha 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 --- 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