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. Design methodology is explained in the patch description.
Similar work will need to be done for asymmetric sessions as well. Asymmetric session need another rework and is postponed to next release. Since it is still in experimental stage, we can modify the APIs in next release as well. The patches are compilable with all affected PMDs and tested with dpdk-test and ipsec-secgw app on CN9k platform. Changes in v2: - Added new parameter iova in PMD session configure APIs for session priv pointer to be used in QAT/CNXK/etc PMDs. - Hide rte_cryptodev_sym_session and rte_security_session structs. - Added compilation workaround for net PMDs(ixgbe/txgbe) for inline ipsec. Patches with actual fix is beynd the scope of this patchset. - Added inline APIs to access the opaque data and fast metadata. - Remove commented code. TODO - Release notes/deprecation notice removal. - Documentation updates. - Asym APIs - postponed for next release. Akhil Goyal (7): security: rework session framework security: hide security session struct net/cnxk: rework security session framework security: pass session iova in PMD sess create cryptodev: rework session framework cryptodev: hide sym session structure cryptodev: pass session iova in configure session app/test-crypto-perf/cperf.h | 1 - app/test-crypto-perf/cperf_ops.c | 46 ++-- 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 | 34 +-- app/test/test_ipsec_perf.c | 4 +- app/test/test_security.c | 196 ++++-------------- 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 | 65 ++---- 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 | 65 ++---- drivers/crypto/ccp/ccp_pmd_ops.c | 32 +-- drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 24 +-- drivers/crypto/cnxk/cn10k_ipsec.c | 53 +---- drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 20 +- drivers/crypto/cnxk/cn9k_ipsec.c | 75 +++---- drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 61 ++---- drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 14 +- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 69 ++---- drivers/crypto/dpaa_sec/dpaa_sec.c | 67 ++---- drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 34 +-- drivers/crypto/mlx5/mlx5_crypto.c | 25 +-- drivers/crypto/mvsam/rte_mrvl_pmd.c | 3 +- drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 48 +---- drivers/crypto/nitrox/nitrox_sym.c | 33 +-- drivers/crypto/null/null_crypto_pmd_ops.c | 34 +-- .../crypto/octeontx/otx_cryptodev_hw_access.h | 1 - drivers/crypto/octeontx/otx_cryptodev_ops.c | 68 +++--- drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 63 +++--- .../octeontx2/otx2_cryptodev_ops_helper.h | 16 +- drivers/crypto/octeontx2/otx2_cryptodev_sec.c | 77 +++---- 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 | 66 ++---- drivers/crypto/qat/qat_sym_session.h | 14 +- drivers/crypto/scheduler/scheduler_pmd_ops.c | 10 +- drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 34 +-- drivers/crypto/virtio/virtio_cryptodev.c | 32 +-- drivers/crypto/zuc/rte_zuc_pmd_ops.c | 35 +--- .../octeontx2/otx2_evdev_crypto_adptr_rx.h | 3 +- drivers/net/cnxk/cn10k_ethdev_sec.c | 64 +++--- drivers/net/cnxk/cn9k_ethdev_sec.c | 59 ++---- drivers/net/cnxk/cnxk_ethdev.c | 6 +- drivers/net/cnxk/cnxk_ethdev.h | 6 - drivers/net/cnxk/cnxk_ethdev_sec.c | 21 -- drivers/net/ixgbe/ixgbe_ipsec.c | 38 +--- drivers/net/octeontx2/otx2_ethdev_sec.c | 52 ++--- drivers/net/octeontx2/otx2_ethdev_sec_tx.h | 2 +- drivers/net/txgbe/txgbe_ipsec.c | 38 +--- examples/fips_validation/fips_dev_self_test.c | 32 +-- examples/fips_validation/main.c | 20 +- examples/ipsec-secgw/ipsec-secgw.c | 40 ---- 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 | 33 ++- lib/cryptodev/rte_crypto.h | 2 +- lib/cryptodev/rte_crypto_sym.h | 2 +- lib/cryptodev/rte_cryptodev.c | 88 +++++--- lib/cryptodev/rte_cryptodev.h | 70 +++---- lib/cryptodev/rte_cryptodev_trace.h | 16 +- lib/ipsec/rte_ipsec.h | 4 +- lib/ipsec/rte_ipsec_group.h | 13 +- lib/ipsec/ses.c | 6 +- lib/pipeline/rte_table_action.c | 8 +- lib/pipeline/rte_table_action.h | 2 +- lib/security/rte_security.c | 32 +-- lib/security/rte_security.h | 85 +++++--- lib/security/rte_security_driver.h | 31 ++- lib/vhost/rte_vhost_crypto.h | 3 - lib/vhost/vhost_crypto.c | 7 +- 90 files changed, 816 insertions(+), 1864 deletions(-) -- 2.25.1