From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E2927A00BE; Thu, 10 Feb 2022 16:54:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A78B426EE; Thu, 10 Feb 2022 16:54:11 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 08C75426ED for ; Thu, 10 Feb 2022 16:54:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644508450; x=1676044450; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NI49oNTQA3r+AfKaLE2ioUbEZlet23Vl7TKe8kuYBx8=; b=Sj+HGwXHMRXZF5YKmN90XbQ+OJnY75sqZpkM7dajhnNJrtuILHnH7Czn 7LwxD5P1GGeN9rv63xYoO43LYb62lU30/8tSGjwC++M7GG9MA4Mk1p52T rItKb/SqqHXlaJ0+NjymhT4n+5Ny3/n4XjQq4sf+13KqgZ5eTs5D1vnc+ FIm9c5duJGi9TdEcM3IFffDy6u64bmCcuGvZDiWSlT/7KUz6ddDLtDddk +5BmIqoqDltJvhNXHh7QD9S/ITMtYwA+KBrlP91r6kAD9ltsSTn1Uq1Tt nyyyKRhiu9PLyyvEJUxeO8+xK8OnlDj5rwjasB2Dnb8D3/9KvswgXGk7J w==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="229486775" X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="229486775" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 07:54:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="541658554" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.222.49]) by orsmga008.jf.intel.com with ESMTP; 10 Feb 2022 07:54:06 -0800 From: Ciara Power To: dev@dpdk.org Cc: roy.fan.zhang@intel.com, gakhil@marvell.com, anoobj@marvell.com, mdr@ashroe.eu, Ciara Power Subject: [PATCH v6 0/5] crypto: improve asym session usage Date: Thu, 10 Feb 2022 15:53:59 +0000 Message-Id: <20220210155404.3598576-1-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220209153854.2740455-1-ciara.power@intel.com> References: <20220209153854.2740455-1-ciara.power@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 This patchset includes improvements for the asymmetric session. The main change is to the session structure, which is now a single mempool object, rather than having pointers to private data elsewhere. This session structure is now hidden in an internal header, so the app will never use it directly. Some other changes include adding a user data API, and modifying the return value for the create session function. This create session function now also initialises the session, and subsequently the clear/free functions have been merged into one. Sample code in the programmer's guide that showed basic steps for using Asymmetric crypto in DPDK has been replaced with literal includes in the first patch of this patchset. This ensures all subsequent code changes in the patchset are automatically reflected in the documentation. v6: - Reordered variable declarations to follow cnxk file format. - Added fix for crypto perf app asymmetric modex operation, there is no longer a need for private mempool, and the rte_cryptodev_asym_session_pool_create API should be used. v5: - Modified which patch the sess parameter is passed to session create trace function. - Reworded create session function description. - Removed get API for session private data, can be accessed directly. - Modified test application to create a session mempool for TEST_NUM_SESSIONS rather than TEST_NUM_SESSIONS * 2. v4: - Added new patch to add literal includes usage in programmer's guide. - Merged asym crypto session clear and free functions. - Reordered some function parameters. - Updated trace function for asym crypto session create. - Fixed cnxk clear, the PMD no longer needs to put private data back into a mempool. - Renamed struct field for max private session size. - Replaced __extension__ with RTE_STD_C11. - Moved some parameter validity checks to before functional code. - Reworded release note. - Removed mempool parameter from session configure function. - Removed docs code additions, these are included due to patch 1 changing sample doc to use literal includes. - Initialised session variables as NULL. - Added possible error return values in user data API comment. v3: - Added documentation in relevant patches. - Fixed setting user data size. - Fixed hiding structure, it should not be hidden from PMDs. - Fixed some other small formatting issues. - Increased size of max_priv_session_sz to uint16_t. - Removed trace for asym session init function that was previously removed. Ciara Power (5): doc: replace asym crypto code with literal includes crypto: use single buffer for asymmetric session crypto: hide asym session structure crypto: add asym session user data API crypto: modify return value for asym session create app/test-crypto-perf/cperf_ops.c | 22 +- app/test-crypto-perf/cperf_test_throughput.c | 8 +- app/test-crypto-perf/main.c | 26 +- app/test/test_cryptodev_asym.c | 380 ++++++------------- app/test/test_cryptodev_mod_test_vectors.h | 4 + doc/guides/prog_guide/cryptodev_lib.rst | 212 +++-------- doc/guides/rel_notes/release_22_03.rst | 14 + drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 8 +- drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 8 +- drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 22 +- drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 3 +- drivers/crypto/octeontx/otx_cryptodev_ops.c | 32 +- drivers/crypto/openssl/rte_openssl_pmd.c | 4 +- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 24 +- drivers/crypto/qat/qat_asym.c | 54 +-- drivers/crypto/qat/qat_asym.h | 5 +- lib/cryptodev/cryptodev_pmd.h | 36 +- lib/cryptodev/cryptodev_trace_points.c | 9 +- lib/cryptodev/rte_cryptodev.c | 258 ++++++++----- lib/cryptodev/rte_cryptodev.h | 136 ++++--- lib/cryptodev/rte_cryptodev_trace.h | 38 +- lib/cryptodev/version.map | 9 +- 22 files changed, 526 insertions(+), 786 deletions(-) -- 2.25.1