[0/3] cryptodev: sym session framework rework
Message ID | 20220829160645.378406-1-roy.fan.zhang@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> 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 18E79A0542; Mon, 29 Aug 2022 18:11:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1944A4280E; Mon, 29 Aug 2022 18:11:25 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 91F524069D for <dev@dpdk.org>; Mon, 29 Aug 2022 18:11:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661789481; x=1693325481; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=gRXepALZd1bk/W4bPe8sN9QLLTKMloyZFVbxoJnVUXM=; b=A0rsmQ5Amq5jqqq6KMuxupDAann/BEITUeC3f5qp7BauKKib86O0POQf o5eoHBsIeiNZDPCv8ogpik2jvUe234XM161Xc5LtXlGhEJlN5vtFLlyuI zTNiWKdBtn5FAd6kfS9bH4cqed9CNOOq5UkDR/WH2ST3EzbebHkmKJN2j RFBolR46XSMgiUNfIKii11E1Vf5me/e9QqmAmzmBN1b+gQQj3p1/Ou/8V UW97pxNVG0SniMgz8kifUZIAu6lWauooEoLpv5K+1q6TIYz4RYrQPvzGU gGhThhjSmg6As+zOyOi5ZyCUIrzzsef/ZZdabzHG9zT/B2RQ9Y2duV9ke g==; X-IronPort-AV: E=McAfee;i="6500,9779,10454"; a="358896789" X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="358896789" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Aug 2022 09:07:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,272,1654585200"; d="scan'208";a="588211677" Received: from silpixa00400885.ir.intel.com ([10.243.22.192]) by orsmga006.jf.intel.com with ESMTP; 29 Aug 2022 09:06:51 -0700 From: Fan Zhang <roy.fan.zhang@intel.com> To: dev@dpdk.org Cc: gakhil@marvell.com, maxime.coquelin@redhat.com, chandu@amd.com, ruifeng.wang@arm.com, ajit.khaparde@broadcom.com, anoobj@marvell.com, pablo.de.lara.guarch@intel.com, matan@nvidia.com, g.singh@nxp.com, jianjay.zhou@huawei.com, Fan Zhang <roy.fan.zhang@intel.com> Subject: [PATCH 0/3] cryptodev: sym session framework rework Date: Mon, 29 Aug 2022 16:06:42 +0000 Message-Id: <20220829160645.378406-1-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.34.1 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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Message
Fan Zhang
Aug. 29, 2022, 4:06 p.m. UTC
This patchset reworks the symmetric crypto session data structure to use a single virtual/physical contiguous buffer for symmetric crypto session and driver private data. In addition the session data structure is now private. The session is represented as an opaque pointer in the application. With the change the session is no longer supported to be accessed by multiple device drivers. For the same reason rte_cryptodev_sym_session_init/clear APIs are deprecated as rte_cryptodev_sym_session_create/free will initialize and clear the driver specific data field. Fan Zhang (3): cryptodev: rework session framework crypto/scheduler: use unified session cryptodev: hide sym session structure app/test-crypto-perf/cperf_ops.c | 21 +- app/test-crypto-perf/cperf_test_latency.c | 6 +- .../cperf_test_pmd_cyclecount.c | 5 +- app/test-crypto-perf/cperf_test_throughput.c | 6 +- app/test-crypto-perf/cperf_test_verify.c | 6 +- app/test-crypto-perf/main.c | 29 +- app/test-eventdev/test_perf_common.c | 35 +- app/test-eventdev/test_perf_common.h | 1 - app/test/test_cryptodev.c | 302 +++++------------- app/test/test_cryptodev_blockcipher.c | 16 +- app/test/test_event_crypto_adapter.c | 35 +- app/test/test_ipsec.c | 42 +-- app/test/test_ipsec_perf.c | 4 +- doc/guides/prog_guide/cryptodev_lib.rst | 16 +- doc/guides/rel_notes/deprecation.rst | 9 + doc/guides/rel_notes/release_22_11.rst | 7 + drivers/crypto/armv8/rte_armv8_pmd.c | 21 +- drivers/crypto/armv8/rte_armv8_pmd_ops.c | 32 +- drivers/crypto/bcmfs/bcmfs_sym_session.c | 38 +-- drivers/crypto/bcmfs/bcmfs_sym_session.h | 3 +- drivers/crypto/caam_jr/caam_jr.c | 28 +- drivers/crypto/ccp/ccp_crypto.c | 58 +--- drivers/crypto/ccp/ccp_pmd_ops.c | 32 +- drivers/crypto/ccp/ccp_pmd_private.h | 2 - drivers/crypto/ccp/rte_ccp_pmd.c | 29 +- drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 36 +-- drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 31 +- drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 54 +--- drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 14 +- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 31 +- drivers/crypto/dpaa2_sec/dpaa2_sec_raw_dp.c | 3 +- drivers/crypto/dpaa_sec/dpaa_sec.c | 37 +-- drivers/crypto/dpaa_sec/dpaa_sec_raw_dp.c | 4 +- drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 34 +- drivers/crypto/ipsec_mb/ipsec_mb_private.h | 41 ++- drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 48 +-- drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 26 +- drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 4 - drivers/crypto/ipsec_mb/pmd_kasumi.c | 10 +- drivers/crypto/ipsec_mb/pmd_snow3g.c | 9 +- drivers/crypto/ipsec_mb/pmd_zuc.c | 4 - drivers/crypto/mlx5/mlx5_crypto.c | 26 +- drivers/crypto/mvsam/rte_mrvl_pmd.c | 8 +- drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 21 +- drivers/crypto/nitrox/nitrox_sym.c | 39 +-- drivers/crypto/null/null_crypto_pmd.c | 19 +- drivers/crypto/null/null_crypto_pmd_ops.c | 33 +- drivers/crypto/null/null_crypto_pmd_private.h | 2 - .../crypto/octeontx/otx_cryptodev_hw_access.h | 1 - drivers/crypto/octeontx/otx_cryptodev_ops.c | 67 +--- drivers/crypto/openssl/openssl_pmd_private.h | 2 - drivers/crypto/openssl/rte_openssl_pmd.c | 24 +- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 29 +- drivers/crypto/qat/qat_sym.c | 10 +- drivers/crypto/qat/qat_sym.h | 4 +- drivers/crypto/qat/qat_sym_session.c | 40 +-- drivers/crypto/qat/qat_sym_session.h | 6 +- drivers/crypto/scheduler/scheduler_failover.c | 19 +- .../crypto/scheduler/scheduler_multicore.c | 17 + .../scheduler/scheduler_pkt_size_distr.c | 84 +++-- drivers/crypto/scheduler/scheduler_pmd_ops.c | 87 ++++- .../crypto/scheduler/scheduler_pmd_private.h | 120 ++++++- .../crypto/scheduler/scheduler_roundrobin.c | 11 +- drivers/crypto/virtio/virtio_cryptodev.c | 40 +-- drivers/crypto/virtio/virtio_rxtx.c | 3 +- examples/fips_validation/fips_dev_self_test.c | 30 +- examples/fips_validation/main.c | 35 +- examples/ipsec-secgw/ipsec-secgw.c | 10 +- examples/ipsec-secgw/ipsec.c | 7 +- examples/l2fwd-crypto/main.c | 54 +--- examples/vhost_crypto/main.c | 16 +- lib/cryptodev/cryptodev_pmd.h | 59 ++-- lib/cryptodev/cryptodev_trace_points.c | 6 - lib/cryptodev/rte_cryptodev.c | 280 ++++++---------- lib/cryptodev/rte_cryptodev.h | 153 +++------ lib/cryptodev/rte_cryptodev_trace.h | 35 +- lib/cryptodev/version.map | 6 - lib/ipsec/rte_ipsec_group.h | 5 +- lib/ipsec/ses.c | 3 +- lib/pipeline/rte_table_action.c | 10 +- lib/vhost/rte_vhost_crypto.h | 3 - lib/vhost/vhost_crypto.c | 28 +- 82 files changed, 910 insertions(+), 1711 deletions(-)