From patchwork Thu Sep 30 14:50:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 100106 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 D7576A0C41; Thu, 30 Sep 2021 16:50:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9611B410E5; Thu, 30 Sep 2021 16:50:51 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 8431240DDA for ; Thu, 30 Sep 2021 16:50:50 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18UDg6ko025491; Thu, 30 Sep 2021 07:50:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=aW9jj5sT+OmCiNAIbpJs2oWWKQEwwlELCeEMZiO5JSo=; b=kj5glxqKbQXwThs0FFBkkyZa46dbxKurnXgt7wZayLI3Gaw36H0ABVcdJDJOp/ioTXJn spIlZhC7oLko9BQ4TLN3MQoBTAbrG1SaZyERd2Q+HoPLhaFILGjy8jpaeZmmgh7EjBgL n1Ntq/52pWeTGDR61F3HUi2pVTIdS5WZ1+85OJxJu6QMiqkok65mVXSiKPEg/pl0aU7r yeyXHNIArsEqi+EBUQYp0hKXoj538nntObv3FI3yRDLO2+/3Vzm3t0FQDwBQHA/qS0XS PUFQFWIzUbBDxX1Pv0DB5IGjlR7Zr1heL8ohMgyuX+m0zvymnrxWlInT3NhcuMWY2ojm 0Q== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3bdebtg9p3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 30 Sep 2021 07:50:43 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 30 Sep 2021 07:50:41 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Thu, 30 Sep 2021 07:50:41 -0700 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id 00D5D5C692A; Thu, 30 Sep 2021 07:50:28 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , , , , , , , , , , Akhil Goyal Date: Thu, 30 Sep 2021 20:20:11 +0530 Message-ID: <20210930145014.2476799-1-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: bBcjA-q5fZFcB7ZzCBR01WSrPr9X3ydp X-Proofpoint-GUID: bBcjA-q5fZFcB7ZzCBR01WSrPr9X3ydp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-30_05,2021-09-30_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH 0/3] crypto/security session framework rework 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 Sender: "dev" As discussed in last release deprecation notice, crypto and security session framework are reworked to reduce the need of two mempool objects and remove the requirement to expose the rte_security_session and rte_cryptodev_sym_session structures. Similar work will need to be done for asymmetric sessions as well. Design methodology is explained in the patch description. Please review this and help in filling the missing parts for all the affected PMDs. The patches are compilable and tested with dpdk-test app on CN9k platform. Akhil Goyal (3): security: rework session framework drivers/net: temporary disable ixgbe and txgbe cryptodev: rework session framework app/test-crypto-perf/cperf.h | 1 - app/test-crypto-perf/cperf_ops.c | 41 ++-- app/test-crypto-perf/cperf_ops.h | 6 +- app/test-crypto-perf/cperf_test_latency.c | 5 +- app/test-crypto-perf/cperf_test_latency.h | 1 - .../cperf_test_pmd_cyclecount.c | 7 +- .../cperf_test_pmd_cyclecount.h | 1 - app/test-crypto-perf/cperf_test_throughput.c | 5 +- app/test-crypto-perf/cperf_test_throughput.h | 1 - app/test-crypto-perf/cperf_test_verify.c | 5 +- app/test-crypto-perf/cperf_test_verify.h | 1 - app/test-crypto-perf/main.c | 29 +-- app/test/test_cryptodev.c | 147 +++-------- app/test/test_cryptodev.h | 1 - app/test/test_cryptodev_asym.c | 1 - app/test/test_cryptodev_blockcipher.c | 6 +- app/test/test_event_crypto_adapter.c | 28 +-- app/test/test_ipsec.c | 33 +-- app/test/test_security.c | 229 ++++++++---------- drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 33 +-- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 5 +- .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 64 +---- drivers/crypto/armv8/rte_armv8_pmd_ops.c | 34 +-- drivers/crypto/bcmfs/bcmfs_sym_session.c | 36 +-- drivers/crypto/bcmfs/bcmfs_sym_session.h | 6 +- drivers/crypto/caam_jr/caam_jr.c | 64 ++--- drivers/crypto/ccp/ccp_pmd_ops.c | 32 +-- drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 22 +- drivers/crypto/cnxk/cn10k_ipsec.c | 53 +--- drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 20 +- drivers/crypto/cnxk/cn9k_ipsec.c | 50 +--- drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 61 ++--- drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 13 +- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 68 ++---- drivers/crypto/dpaa_sec/dpaa_sec.c | 69 ++---- drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 34 +-- drivers/crypto/mlx5/mlx5_crypto.c | 24 +- drivers/crypto/mvsam/rte_mrvl_pmd.c | 3 +- drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 47 +--- drivers/crypto/nitrox/nitrox_sym.c | 31 +-- drivers/crypto/null/null_crypto_pmd_ops.c | 34 +-- .../crypto/octeontx/otx_cryptodev_hw_access.h | 1 - drivers/crypto/octeontx/otx_cryptodev_ops.c | 60 ++--- drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 54 ++--- .../octeontx2/otx2_cryptodev_ops_helper.h | 16 +- drivers/crypto/octeontx2/otx2_cryptodev_sec.c | 54 +---- drivers/crypto/openssl/rte_openssl_pmd_ops.c | 35 +-- drivers/crypto/qat/qat_sym.c | 3 +- drivers/crypto/qat/qat_sym.h | 8 +- drivers/crypto/qat/qat_sym_session.c | 50 +--- drivers/crypto/qat/qat_sym_session.h | 10 +- drivers/crypto/scheduler/scheduler_pmd_ops.c | 9 +- drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 34 +-- drivers/crypto/virtio/virtio_cryptodev.c | 31 +-- drivers/crypto/zuc/rte_zuc_pmd_ops.c | 35 +-- .../octeontx2/otx2_evdev_crypto_adptr_rx.h | 3 +- drivers/net/ixgbe/ixgbe_ipsec.c | 36 +-- drivers/net/meson.build | 4 +- drivers/net/octeontx2/otx2_ethdev_sec.c | 51 +--- drivers/net/octeontx2/otx2_ethdev_sec_tx.h | 2 +- drivers/net/txgbe/txgbe_ipsec.c | 36 +-- examples/fips_validation/fips_dev_self_test.c | 32 +-- examples/fips_validation/main.c | 20 +- examples/ipsec-secgw/ipsec-secgw.c | 72 +++--- examples/ipsec-secgw/ipsec.c | 12 +- examples/ipsec-secgw/ipsec.h | 1 - examples/ipsec-secgw/ipsec_worker.c | 4 - examples/l2fwd-crypto/main.c | 41 +--- examples/vhost_crypto/main.c | 16 +- lib/cryptodev/cryptodev_pmd.h | 7 +- lib/cryptodev/rte_crypto.h | 2 +- lib/cryptodev/rte_crypto_sym.h | 2 +- lib/cryptodev/rte_cryptodev.c | 73 ++++-- lib/cryptodev/rte_cryptodev.h | 23 +- lib/cryptodev/rte_cryptodev_trace.h | 5 +- lib/pipeline/rte_table_action.c | 8 +- lib/pipeline/rte_table_action.h | 2 +- lib/security/rte_security.c | 28 ++- lib/security/rte_security.h | 41 ++-- lib/security/rte_security_driver.h | 16 +- lib/vhost/rte_vhost_crypto.h | 3 - lib/vhost/vhost_crypto.c | 7 +- 82 files changed, 665 insertions(+), 1633 deletions(-)