From patchwork Wed May 24 15:27:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "De Lara Guarch, Pablo" X-Patchwork-Id: 24539 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 297A39131; Wed, 24 May 2017 17:27:16 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 52ACC7D02; Wed, 24 May 2017 17:27:02 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2017 08:26:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,386,1491289200"; d="scan'208";a="265893642" Received: from silpixa00381631.ir.intel.com (HELO silpixa00381631.ger.corp.intel.com) ([10.237.222.122]) by fmsmga004.fm.intel.com with ESMTP; 24 May 2017 08:26:58 -0700 From: Pablo de Lara To: declan.doherty@intel.com, thomas@monjalon.net Cc: dev@dpdk.org, Pablo de Lara , stable@dpdk.org Date: Wed, 24 May 2017 16:27:05 +0100 Message-Id: <1495639634-74846-4-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1495639634-74846-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1495639634-74846-1-git-send-email-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH 03/12] cryptodev: rename device retrieval argument X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" rte_cryptodev_devices_get() function was parsing a crypto device name as an argument, but the function actually returns device identifiers of devices that share the same crypto driver, so the argument should be driver name, instead. Fixes: 38227c0e3ad2 ("cryptodev: retrieve device info") CC: stable@dpdk.org Signed-off-by: Pablo de Lara --- lib/librte_cryptodev/rte_cryptodev.c | 2 +- lib/librte_cryptodev/rte_cryptodev.h | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index a5a5c36..6880661 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -523,7 +523,7 @@ rte_cryptodev_count_devtype(enum rte_cryptodev_type type) } uint8_t -rte_cryptodev_devices_get(const char *dev_name, uint8_t *devices, +rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices, uint8_t nb_devices) { uint8_t i, count = 0; diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index f307b3b..89093f6 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -464,9 +464,10 @@ extern uint8_t rte_cryptodev_count_devtype(enum rte_cryptodev_type type); /** - * Get number and identifiers of attached crypto device. + * Get number and identifiers of attached crypto devices that + * use the same crypto driver. * - * @param dev_name device name. + * @param driver_name driver name. * @param devices output devices identifiers. * @param nb_devices maximal number of devices. * @@ -474,7 +475,7 @@ rte_cryptodev_count_devtype(enum rte_cryptodev_type type); * Returns number of attached crypto device. */ uint8_t -rte_cryptodev_devices_get(const char *dev_name, uint8_t *devices, +rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices, uint8_t nb_devices); /* * Return the NUMA socket to which a device is connected