From patchwork Thu Dec 1 06:46:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ganapati Kundapura X-Patchwork-Id: 120404 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 D73A0A00C5; Thu, 1 Dec 2022 07:46:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 718B042D14; Thu, 1 Dec 2022 07:46:58 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id E7DF842D0D for ; Thu, 1 Dec 2022 07:46:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669877217; x=1701413217; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cm3Rjpo70l4rGkhm4tU/DZn3QJ/SB9Pegh0L0gAYRtE=; b=Ygrhd+O2nvMZS4P36A60yUoVKnW/Px4JThvMfDDWLw97kgq0jN/1t4NU sGJ048lVEfMejpE+wPiqJMj51v8h9x5kW6tBRerYu6eGd6AqJDPio61Uw 9soypj3Gq6DY3IeWikLG5CCkWGqZ9dS3mFy6wYi+wd1f/Oxodr8yy1OGr 5EW9pkEQTlvb4SBHnkixf+UtmmYkRcNcEf94ux/VjEjujTT4em6YZyTjI 9mqK2q81Uf6bQzGgTbklyrs/ij/sUwvIm0vMmbOgNeuY74rpwLguIWhar uPR+d0/nnJsTYqT+Ueyr1CIv4PZR0GWOH3nxkiWaykx+Cs+ZYt9PslM36 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="314304297" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="314304297" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2022 22:46:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="594950424" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="594950424" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by orsmga003.jf.intel.com with ESMTP; 30 Nov 2022 22:46:54 -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 v2 1/5] eventdev/event_crypto: process event port's impl rel cap Date: Thu, 1 Dec 2022 00:46:48 -0600 Message-Id: <20221201064652.1885734-1-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20221130171014.1723899-1-ganapati.kundapura@intel.com> References: <20221130171014.1723899-1-ganapati.kundapura@intel.com> 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 In the current implementation adapter queries event device's capability for implicit release support. This information is used to decide whether events are enqueued back as NEW or FWD events. This patch updates the adapter to query the port caps for implicit release to decide on events enqueuing back as NEW/FWD events. Signed-off-by: Ganapati Kundapura Acked-by: Volodymyr Fialko --- v2: * Updated subject line in commit message diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c index 3c585d7..1c0a22b 100644 --- a/lib/eventdev/rte_event_crypto_adapter.c +++ b/lib/eventdev/rte_event_crypto_adapter.c @@ -53,7 +53,7 @@ struct event_crypto_adapter { uint8_t eventdev_id; /* Event port identifier */ uint8_t event_port_id; - /* Store event device's implicit release capability */ + /* Store event port's implicit release capability */ uint8_t implicit_release_disabled; /* Flag to indicate backpressure at cryptodev * Stop further dequeuing events from eventdev @@ -320,7 +320,6 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id, { struct event_crypto_adapter *adapter; char mem_name[CRYPTO_ADAPTER_NAME_LEN]; - struct rte_event_dev_info dev_info; int socket_id; uint8_t i; int ret; @@ -361,17 +360,6 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id, return -ENOMEM; } - ret = rte_event_dev_info_get(dev_id, &dev_info); - if (ret < 0) { - RTE_EDEV_LOG_ERR("Failed to get info for eventdev %d: %s!", - dev_id, dev_info.driver_name); - eca_circular_buffer_free(&adapter->ebuf); - rte_free(adapter); - return ret; - } - - adapter->implicit_release_disabled = (dev_info.event_dev_cap & - RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE); adapter->eventdev_id = dev_id; adapter->socket_id = socket_id; adapter->conf_cb = conf_cb; @@ -837,6 +825,7 @@ eca_init_service(struct event_crypto_adapter *adapter, uint8_t id) struct rte_event_crypto_adapter_conf adapter_conf; struct rte_service_spec service; int ret; + uint32_t impl_rel; if (adapter->service_inited) return 0; @@ -866,6 +855,17 @@ eca_init_service(struct event_crypto_adapter *adapter, uint8_t id) adapter->max_nb = adapter_conf.max_nb; adapter->event_port_id = adapter_conf.event_port_id; + + if (rte_event_port_attr_get(adapter->eventdev_id, + adapter->event_port_id, + RTE_EVENT_PORT_ATTR_IMPLICIT_RELEASE_DISABLE, + &impl_rel)) { + RTE_EDEV_LOG_ERR("Failed to get port info for eventdev %" PRId32, + adapter->eventdev_id); + return -EINVAL; + } + + adapter->implicit_release_disabled = (uint8_t)impl_rel; adapter->service_inited = 1; return ret; From patchwork Thu Dec 1 06:46:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ganapati Kundapura X-Patchwork-Id: 120405 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 D1181A00C5; Thu, 1 Dec 2022 07:47:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5292042D1C; Thu, 1 Dec 2022 07:46:59 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 9153C42D0D for ; Thu, 1 Dec 2022 07:46:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669877217; x=1701413217; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eqXFwdZM+BnRWPbvsp+xEM9jgbFumWeE7SZLeA6VQZI=; b=gCd0GhvLFWuLWfEXRsbV7tahYBQx0/LKVZ+MayZqLOiA1RoHQmV7ogYz HIQOg6uqgSTTmkVh0R2MxGlmYQ9nBbjgm+WCzplY2w997c5fLW6UOb5jl SG1ACN+RoQWmXER2dTfMuDtLShTOodFLT1VNRYEQfIAhTp13XhduXCBYW XvH50uSxyvb8tZEPjR9x5YNnq8S2Ehu6FDPaUMAHHyHYFPSlG4Hx+Hw6d dKXIUponHajfX7U3xh0TDYslY8xVSA4dH/QyrO15RX49yBpfPd93awHki 471Qb1jJa5aTICL6ImTq3mNZhsw3NXG8B7Fa874h/DRYSjZ5UYchi7u8E Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="314304298" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="314304298" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2022 22:46:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="594950428" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="594950428" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by orsmga003.jf.intel.com with ESMTP; 30 Nov 2022 22:46:55 -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 v2 2/5] eventdev/crypto: fix wrong crypto enqueue count stats Date: Thu, 1 Dec 2022 00:46:49 -0600 Message-Id: <20221201064652.1885734-2-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20221201064652.1885734-1-ganapati.kundapura@intel.com> References: <20221130171014.1723899-1-ganapati.kundapura@intel.com> <20221201064652.1885734-1-ganapati.kundapura@intel.com> 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. Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") Signed-off-by: Ganapati Kundapura Acked-by: Volodymyr Fialko Acked-by: Abhinandan Gujjar --- v2: * Updated subject line in commit message diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c index 1c0a22b..ef3dbe9 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; From patchwork Thu Dec 1 06:46:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ganapati Kundapura X-Patchwork-Id: 120406 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 7249EA00C5; Thu, 1 Dec 2022 07:47:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37CA542D20; Thu, 1 Dec 2022 07:47:00 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 3344142D0D for ; Thu, 1 Dec 2022 07:46:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669877218; x=1701413218; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xlIMYgzDmtEYr5aEiuAIjiSflxM1ffjtxrUEWKQOP5E=; b=GSsJ0D6YWFff8MTxaAlSTu/fn/nni43oKXrRAvc3fBTBTZBFvQjNk/Oq 5NFrBSAgGJYMzbQBZywg1PRnMQ/+paAdfiIPknPbQoKc7fhxCvwFjdMwS bGd9PgLkQU2f6g6zZYoqzrWNt3R9H2eKD7wvRrKbpOxKM0HWujukpv/e7 THEYmL3sXZo3ASADQqVcSgpZOtwHQdrdXQjjU73DCQlsyxqqPNhZsVnJ3 XHOZ84+iDBWfoGNN1cw6v/4Gas5i64G1UC0x/8YPzqnC1zjebUT2eByWI W+lQZvzrC1ZxrGslBFjkQZGGq/k0s7Uf6qKtQayXZf0jyH7SGjOg9khQ7 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="314304302" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="314304302" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2022 22:46:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="594950431" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="594950431" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by orsmga003.jf.intel.com with ESMTP; 30 Nov 2022 22:46:56 -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 v2 3/5] eventdev/crypto: fix wrong offset used while flushing events Date: Thu, 1 Dec 2022 00:46:50 -0600 Message-Id: <20221201064652.1885734-3-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20221201064652.1885734-1-ganapati.kundapura@intel.com> References: <20221130171014.1723899-1-ganapati.kundapura@intel.com> <20221201064652.1885734-1-ganapati.kundapura@intel.com> 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 Events enqueued to eventdev from the beginning of the circular buffer. This leads to invalid or already freed events getting enqueued to eventdev from the circular buffer. Fixed by enqueuing the events to eventdev from the head pointer of circular buffer. Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") Signed-off-by: Ganapati Kundapura Acked-by: Volodymyr Fialko Acked-by: Abhinandan Gujjar --- v2: * Updated subject line in commit message diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c index ef3dbe9..72deedd 100644 --- a/lib/eventdev/rte_event_crypto_adapter.c +++ b/lib/eventdev/rte_event_crypto_adapter.c @@ -669,7 +669,7 @@ eca_circular_buffer_flush_to_evdev(struct event_crypto_adapter *adapter, else return 0; /* buffer empty */ - nb_ops_flushed = eca_ops_enqueue_burst(adapter, ops, n); + nb_ops_flushed = eca_ops_enqueue_burst(adapter, &ops[*headp], n); bufp->count -= nb_ops_flushed; if (!bufp->count) { *headp = 0; From patchwork Thu Dec 1 06:46:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ganapati Kundapura X-Patchwork-Id: 120407 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 66ACCA00C5; Thu, 1 Dec 2022 07:47:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C6C242D27; Thu, 1 Dec 2022 07:47:01 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D331142D0D for ; Thu, 1 Dec 2022 07:46:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669877219; x=1701413219; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Jk6rm1nQVoOnUGdSFMm3gJmVvl1oadw0zsv0ITSH3DA=; b=HR2AbtmnC8OnOh3WncrQL+WOLkVKafzFF2sx9PESLmXc3gdrQ69CRIWb fi2PWD5BvWaD8iHHIQlTx3A1XlEBYN+lMxhmYU0GxM09JStwZl2ClMM9L C2lg8v1ws4q3K69E/vX6gWl89ZmE1Je2IqmbQF+ZmLSZKxg9KqrSCI85a hy4b4gCfS/u1xnPRLtaMxwUKHodn7QuKnL2g53AsDKMZz60UqlHVPsOcG vZsX63//cQkKnfdNaRhyo8yInug/OBHvG1rz78UzUChxJBCQbIdgnV6Ig YLnZnF3g0DVLrbDmc4V+xx2W8/PRJpa7eYxLW6OxLmGw2FG1VZUIuGi3h A==; X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="314304305" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="314304305" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2022 22:46:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="594950435" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="594950435" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by orsmga003.jf.intel.com with ESMTP; 30 Nov 2022 22:46:56 -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 v2 4/5] eventdev/crypto: fix overflow in circular buffer Date: Thu, 1 Dec 2022 00:46:51 -0600 Message-Id: <20221201064652.1885734-4-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20221201064652.1885734-1-ganapati.kundapura@intel.com> References: <20221130171014.1723899-1-ganapati.kundapura@intel.com> <20221201064652.1885734-1-ganapati.kundapura@intel.com> 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 adapter checks CPM backpressure once in enq_run() This leads to buffer overflow if some ops failed to flush to cryptodev. Checked CPM backpressure for every iteration in enq_run() Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") Signed-off-by: Ganapati Kundapura Acked-by: Volodymyr Fialko --- v2: * Updated subject line in commit message diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c index 72deedd..1d39c5b 100644 --- a/lib/eventdev/rte_event_crypto_adapter.c +++ b/lib/eventdev/rte_event_crypto_adapter.c @@ -573,14 +573,15 @@ eca_crypto_adapter_enq_run(struct event_crypto_adapter *adapter, if (adapter->mode == RTE_EVENT_CRYPTO_ADAPTER_OP_NEW) return 0; - if (unlikely(adapter->stop_enq_to_cryptodev)) { - nb_enqueued += eca_crypto_enq_flush(adapter); + for (nb_enq = 0; nb_enq < max_enq; nb_enq += n) { - if (unlikely(adapter->stop_enq_to_cryptodev)) - goto skip_event_dequeue_burst; - } + if (unlikely(adapter->stop_enq_to_cryptodev)) { + nb_enqueued += eca_crypto_enq_flush(adapter); + + if (unlikely(adapter->stop_enq_to_cryptodev)) + break; + } - for (nb_enq = 0; nb_enq < max_enq; nb_enq += n) { stats->event_poll_count++; n = rte_event_dequeue_burst(event_dev_id, event_port_id, ev, BATCH_SIZE, 0); @@ -591,8 +592,6 @@ eca_crypto_adapter_enq_run(struct event_crypto_adapter *adapter, nb_enqueued += eca_enq_to_cryptodev(adapter, ev, n); } -skip_event_dequeue_burst: - if ((++adapter->transmit_loop_count & (CRYPTO_ENQ_FLUSH_THRESHOLD - 1)) == 0) { nb_enqueued += eca_crypto_enq_flush(adapter); From patchwork Thu Dec 1 06:46:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ganapati Kundapura X-Patchwork-Id: 120408 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 E96D4A00C5; Thu, 1 Dec 2022 07:47:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9EBB42D2B; Thu, 1 Dec 2022 07:47:01 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 4DECE42D1A for ; Thu, 1 Dec 2022 07:46:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669877219; x=1701413219; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kPulGfOq4Vt1Vb5B9S4xM+N7qM+QGw3QtY0xSCrUGtw=; b=kz4MA0M66eI/KH6M0+BYOfx8khOS3keR/sFlNLYEcWxVCmE2GgZh/540 3IPTNh9HPtnm33n5Edtc5ie8TqEA9mlsAe1P4EkMXrklTJvFKf/4HxOrS 6tBdV1RJn/LkzPvaXOLZYNsLmkXQvWHDUqGZsqDFKMRxc1z6V9aNc6jkF 20Rh2pqFAOK3ZxY47p6yOEP/5Jg+TFrR951jaN8oeEr7EH6c94Q0IPvJA r/xqtWh4rEKWXDVXTv2N2rpnDdwPAVhqHFc/Xc6VTRbid5Xp/hrcPkU2a RvENHCoDKmyFEPMxSCuYgREnPvT9oQhU3cUMIx4zTLsyhRAwtE9CE9Zj6 w==; X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="314304307" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="314304307" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2022 22:46:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10547"; a="594950438" X-IronPort-AV: E=Sophos;i="5.96,207,1665471600"; d="scan'208";a="594950438" Received: from txandevlnx322.an.intel.com ([10.123.117.44]) by orsmga003.jf.intel.com with ESMTP; 30 Nov 2022 22:46:57 -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 v2 5/5] eventdev/crypto: add all failed events to circular buffer Date: Thu, 1 Dec 2022 00:46:52 -0600 Message-Id: <20221201064652.1885734-5-ganapati.kundapura@intel.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20221201064652.1885734-1-ganapati.kundapura@intel.com> References: <20221130171014.1723899-1-ganapati.kundapura@intel.com> <20221201064652.1885734-1-ganapati.kundapura@intel.com> 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 When many ops are failed to enqueue to eventdev, crypto adapter stores one event in buffer for later processing. Add all failed ops to buffer for later processing. Signed-off-by: Ganapati Kundapura Acked-by: Volodymyr Fialko --- v2: * Updated subject line commit message diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c index 1d39c5b..1a18530 100644 --- a/lib/eventdev/rte_event_crypto_adapter.c +++ b/lib/eventdev/rte_event_crypto_adapter.c @@ -753,7 +753,7 @@ eca_crypto_adapter_deq_run(struct event_crypto_adapter *adapter, for (i = nb_enqueued; i < n; i++) eca_circular_buffer_add( &adapter->ebuf, - ops[nb_enqueued]); + ops[i]); check: nb_deq += n;