From patchwork Wed Apr 19 14:47:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fan Zhang X-Patchwork-Id: 23744 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 65D8B37B2; Wed, 19 Apr 2017 16:45:16 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D0B3F37A2 for ; Wed, 19 Apr 2017 16:45:14 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP; 19 Apr 2017 07:45:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,221,1488873600"; d="scan'208";a="76287204" Received: from silpixa00381633.ir.intel.com (HELO silpixa00381633.ger.corp.intel.com) ([10.237.222.114]) by orsmga002.jf.intel.com with ESMTP; 19 Apr 2017 07:45:11 -0700 From: Fan Zhang To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com Date: Wed, 19 Apr 2017 15:47:02 +0100 Message-Id: <1492613222-60184-1-git-send-email-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] crypto/scheduler: change ordering ring dequeue 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" Commit ("ring: return remaining entry count when dequeuing") changed the return of rte_ring_sc_dequeue_bulk, this patch updates the scheduler to comply with this change. Signed-off-by: Fan Zhang --- drivers/crypto/scheduler/scheduler_pmd_private.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/scheduler/scheduler_pmd_private.h b/drivers/crypto/scheduler/scheduler_pmd_private.h index 33edd1d..421dae3 100644 --- a/drivers/crypto/scheduler/scheduler_pmd_private.h +++ b/drivers/crypto/scheduler/scheduler_pmd_private.h @@ -132,7 +132,7 @@ scheduler_order_drain(struct rte_ring *order_ring, struct rte_crypto_op *op; uint32_t nb_objs = rte_ring_count(order_ring); uint32_t nb_ops_to_deq = 0; - int status = -1; + uint32_t nb_ops_deqd = 0; if (nb_objs > nb_ops) nb_objs = nb_ops; @@ -145,10 +145,10 @@ scheduler_order_drain(struct rte_ring *order_ring, } if (nb_ops_to_deq) - status = rte_ring_sc_dequeue_bulk(order_ring, (void **)ops, - nb_ops_to_deq, NULL); + nb_ops_deqd = rte_ring_sc_dequeue_bulk(order_ring, + (void **)ops, nb_ops_to_deq, NULL); - return (status == 0) ? nb_ops_to_deq : 0; + return nb_ops_deqd; } /** device specific operations function pointer structure */ extern struct rte_cryptodev_ops *rte_crypto_scheduler_pmd_ops;