From patchwork Mon Oct 26 23:09:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gujjar, Abhinandan S" X-Patchwork-Id: 82535 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 016C3A04DD; Wed, 28 Oct 2020 09:16:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0C47DBC8C; Wed, 28 Oct 2020 09:16:39 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id EE65072EE for ; Wed, 28 Oct 2020 09:16:36 +0100 (CET) IronPort-SDR: 98nsbKLXvN7rYQcz47kZ4UFXyWbomV3S5m2C2xcSae4gx53hsTSOCKyH0/V7CpVEX8LVIeREuo jcyErCFM6/pg== X-IronPort-AV: E=McAfee;i="6000,8403,9787"; a="167443467" X-IronPort-AV: E=Sophos;i="5.77,425,1596524400"; d="scan'208";a="167443467" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2020 01:16:35 -0700 IronPort-SDR: 6amdmtB0F8di7+rz1MVeC/0H4JkWb2GeHDMJIxcY6RBY5x9mLUDbBB+hgJEV3M9x3xhYoZfG2c 8iT27MRKF0Aw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,425,1596524400"; d="scan'208";a="361048698" Received: from unknown (HELO localhost.localdomain) ([10.190.210.98]) by FMSMGA003.fm.intel.com with ESMTP; 28 Oct 2020 01:16:30 -0700 From: Abhinandan Gujjar To: dev@dpdk.org, declan.doherty@intel.com, akhil.goyal@nxp.com, Honnappa.Nagarahalli@arm.com, konstantin.ananyev@intel.com Cc: narender.vangati@intel.com, jerinj@marvell.com, abhinandan.gujjar@intel.com Date: Tue, 27 Oct 2020 04:39:25 +0530 Message-Id: <1603753767-79295-1-git-send-email-abhinandan.gujjar@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [v5 0/2] support enqueue & dequeue callbacks on cryptodev 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" In an eventdev world, multiple workers (with ordered queue) will be working on IPsec ESP processing. The ESP header's sequence number is unique and has to be sequentially incremented in an orderly manner. This rises a need for incrementing sequence number in crypto stage especially in event crypto adapter. By adding a user callback to cryptodev at enqueue burst, the user callback will get executed in the context of event crypto adapter. This helps the application to increment the ESP sequence number atomically and orderly manner. The user callback at the dequeue burst helps IPsec application to take care of ARW processing. v4->v5: -Added dequeue callback APIs -Updated documentation -Updated errno and return values -Updated cleanup function v3->v4: -Move callback init and cleanup under dev_configure -Update with memory ordering -Removed extra level of indirection -Add documentation v2->v3: -Moved RCU under the cryptodev APIs -RCU is maintained per queue-pair -Changed name of few variables -Updated callback test with negative cases -Updated with required changes for meson v1->v2: -Moved callback related members to the end of cryptodev struct -Added support for RCU Abhinandan Gujjar (2): cryptodev: support enqueue & dequeue callback functions test: add testcase for crypto enqueue callback app/test/test_cryptodev.c | 135 +++++++- config/rte_config.h | 1 + doc/guides/prog_guide/cryptodev_lib.rst | 47 +++ doc/guides/rel_notes/release_20_11.rst | 6 + lib/librte_cryptodev/meson.build | 2 +- lib/librte_cryptodev/rte_cryptodev.c | 419 ++++++++++++++++++++++++- lib/librte_cryptodev/rte_cryptodev.h | 260 ++++++++++++++- lib/librte_cryptodev/rte_cryptodev_version.map | 4 + 8 files changed, 869 insertions(+), 5 deletions(-)