From patchwork Wed Nov 30 15:11:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ganapati Kundapura X-Patchwork-Id: 120354 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1AA03A00C2; Wed, 30 Nov 2022 16:12:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD48E40395; Wed, 30 Nov 2022 16:12:07 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id E39B740151 for ; Wed, 30 Nov 2022 16:12:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669821126; x=1701357126; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OpW657jh/mHaULiIk15OMfsvBdFSjxsILeSZLz6A58M=; b=KmS32tCVUc6xFUJgK7ESxERPjJ/7KkFXOOw0EaVzAkvMB6KEnXdXyLOm ErLtCPw4BkUDLDLfFu2uYwXp8ymxWSJGpWSZd45XABT+jkVYkIFospaIV bYybrOLQ7yztUJWJ2J4wFObz0oB12VdOdDqdEPh+NHx6M0TsSF6lS3SMk ty4PitsdCe0U54x1EKhGrN1bFWXb2hVY89WwxtHw5KzYNLKZgVrmfgWOm JBr53Gce9BcmZ/VxnBMs/RphRU8iYvyp/g+pa61z56fEbS/ynrHXkOlpt eH+nPMqSGRGb7WrmjI4+iOCkQlM3ZMmZsRzdNYtmyR4F3McpNRnS7JdRI A==; X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="303019510" X-IronPort-AV: E=Sophos;i="5.96,206,1665471600"; d="scan'208";a="303019510" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2022 07:12:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="973134373" X-IronPort-AV: E=Sophos;i="5.96,206,1665471600"; d="scan'208";a="973134373" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by fmsmga005.fm.intel.com with ESMTP; 30 Nov 2022 07:12:01 -0800 From: Ganapati Kundapura To: dev@dpdk.org, jerinj@marvell.com, s.v.naga.harish.k@intel.com, abhinandan.gujjar@intel.com Cc: jay.jayatheerthan@intel.com Subject: [PATCH v1] eventdev/crypto: wrong crypto enqueue count stats Date: Wed, 30 Nov 2022 09:11:59 -0600 Message-Id: <20221130151159.1678917-1-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org crypto_enq_count is updated on failure to enqueue ops to cryptodev. Updated crypto_enq_count on successful enqueue of ops to cryptodev. Signed-off-by: Ganapati Kundapura Acked-by: Fan Zhang diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c index c293a62..e1a0367 100644 --- a/lib/eventdev/rte_event_crypto_adapter.c +++ b/lib/eventdev/rte_event_crypto_adapter.c @@ -485,6 +485,9 @@ eca_enq_to_cryptodev(struct event_crypto_adapter *adapter, struct rte_event *ev, cdev_id, qp_id, &nb_enqueued); + stats->crypto_enq_count += nb_enqueued; + n += nb_enqueued; + /** * If some crypto ops failed to flush to cdev and * space for another batch is not available, stop @@ -495,9 +498,6 @@ eca_enq_to_cryptodev(struct event_crypto_adapter *adapter, struct rte_event *ev, &qp_info->cbuf))) adapter->stop_enq_to_cryptodev = true; } - - stats->crypto_enq_count += nb_enqueued; - n += nb_enqueued; } return n;