From patchwork Thu Jul 27 16:05:30 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: 27242 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 0F0899121; Thu, 27 Jul 2017 18:05:19 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E05D29117; Thu, 27 Jul 2017 18:05:16 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jul 2017 09:05:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,421,1496127600"; d="scan'208";a="292280868" Received: from silpixa00381631.ir.intel.com (HELO silpixa00381631.ger.corp.intel.com) ([10.237.222.122]) by fmsmga004.fm.intel.com with ESMTP; 27 Jul 2017 09:05:09 -0700 From: Pablo de Lara To: fiona.trahe@intel.com, declan.doherty@intel.com Cc: dev@dpdk.org, Pablo de Lara , stable@dpdk.org Date: Thu, 27 Jul 2017 17:05:30 +0100 Message-Id: <20170727160530.34001-1-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170726042712.8355-1-pablo.de.lara.guarch@intel.com> References: <20170726042712.8355-1-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH v2] cryptodev: fix crypto op bulk alloc Doxygen 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" When calling rte_crypto_op_bulk_alloc, the function may return either a 0, if not enough objects are available in the mempool or the number of operations requested, it there are enough available. However, the Doxygen comments were not matching these two cases. Fixes: c0f87eb5252b ("cryptodev: change burst API to be crypto op oriented") Cc: stable@dpdk.org Signed-off-by: Pablo de Lara Acked-by: Fiona Trahe --- Changes in v2: - Reworded Doxygen comment for more clarification. lib/librte_cryptodev/rte_crypto.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h index 0908368..10fe080 100644 --- a/lib/librte_cryptodev/rte_crypto.h +++ b/lib/librte_cryptodev/rte_crypto.h @@ -266,8 +266,9 @@ rte_crypto_op_alloc(struct rte_mempool *mempool, enum rte_crypto_op_type type) * @param nb_ops Number of crypto operations to allocate * * @returns - * - On success returns a valid rte_crypto_op structure - * - On failure returns NULL + * - nb_ops if the number of operations requested were allocated. + * - 0 if the requested number of ops are not available. + * None are allocated in this case. */ static inline unsigned