crypto/ipsec_mb: introduce ipsec_mb framework
Subsystems (2)
cover crypto/ipsec_mb: introduce ipsec_mb framework
This set of patches introduces the new framework making all common code of SW crypto PMDs implementations build on top of intel-ipsec-mb library sharable, also helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementations specific details into single file located in crypto/ipsec_mb folder.
pbronowx (6):
crypto/ipsec_mb: move aesni-mb PMD to ipsec_mb framework crypto/ipsec_mb: move aesni-gcm PMD to ipsec_mb framework crypto/ipsec_mb: move kasumi PMD to ipsec_mb framework crypto/ipsec_mb: move snow3g PMD to ipsec_mb framework crypto/snow3g: add support for digest appended ops crypto/ipsec_mb: move zuc PMD to ipsec_mb framework
pibr (1):
crypto/ipsec_mb: introduce ipsec_mb framework
doc/guides/cryptodevs/features/snow3g.ini | 1 +
drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 104 -
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 978 ---------
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 333 ----
.../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 123 --
drivers/crypto/aesni_gcm/meson.build | 24 -
.../crypto/aesni_mb/aesni_mb_pmd_private.h | 337 ----
drivers/crypto/aesni_mb/meson.build | 25 -
.../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 1126 -----------
drivers/crypto/aesni_mb/version.map | 3 -
drivers/crypto/ipsec_mb/meson.build | 32 +
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 1015 ++++++++++
.../pmd_aesni_mb.c} | 1762 ++++++++++++-----
drivers/crypto/ipsec_mb/pmd_kasumi.c | 557 ++++++
drivers/crypto/ipsec_mb/pmd_snow3g.c | 705 +++++++
.../{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} | 456 ++---
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c | 178 ++
.../crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c | 289 +++
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 463 +++++
.../{aesni_gcm => ipsec_mb}/version.map | 0
drivers/crypto/kasumi/kasumi_pmd_private.h | 81 -
drivers/crypto/kasumi/meson.build | 24 -
drivers/crypto/kasumi/rte_kasumi_pmd.c | 642 ------
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 316 ---
drivers/crypto/kasumi/version.map | 3 -
drivers/crypto/meson.build | 6 +-
drivers/crypto/snow3g/meson.build | 24 -
drivers/crypto/snow3g/rte_snow3g_pmd.c | 656 ------
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 323 ---
drivers/crypto/snow3g/snow3g_pmd_private.h | 84 -
drivers/crypto/snow3g/version.map | 3 -
drivers/crypto/zuc/meson.build | 24 -
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 322 ---
drivers/crypto/zuc/version.map | 3 -
drivers/crypto/zuc/zuc_pmd_private.h | 83 -
35 files changed, 4722 insertions(+), 6383 deletions(-)
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
delete mode 100644 drivers/crypto/aesni_gcm/meson.build
delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
delete mode 100644 drivers/crypto/aesni_mb/meson.build
delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
delete mode 100644 drivers/crypto/aesni_mb/version.map
create mode 100644 drivers/crypto/ipsec_mb/meson.build
create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd.c => ipsec_mb/pmd_aesni_mb.c} (60%)
create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi.c
create mode 100644 drivers/crypto/ipsec_mb/pmd_snow3g.c
rename drivers/crypto/{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} (52%)
create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c
create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c
create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h
rename drivers/crypto/{aesni_gcm => ipsec_mb}/version.map (100%)
delete mode 100644 drivers/crypto/kasumi/kasumi_pmd_private.h
delete mode 100644 drivers/crypto/kasumi/meson.build
delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd.c
delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
delete mode 100644 drivers/crypto/kasumi/version.map
delete mode 100644 drivers/crypto/snow3g/meson.build
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd.c
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
delete mode 100644 drivers/crypto/snow3g/snow3g_pmd_private.h
delete mode 100644 drivers/crypto/snow3g/version.map
delete mode 100644 drivers/crypto/zuc/meson.build
delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd_ops.c
delete mode 100644 drivers/crypto/zuc/version.map
delete mode 100644 drivers/crypto/zuc/zuc_pmd_private.hSignature · 13 lines
2.25.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
RFC 1/7 crypto/ipsec_mb: introduce ipsec_mb framework
This patch introduces the new framework making
all common code of SW crypto PMDs implementations built on top of intel-ipsec-mb library shareable, also helps to reduce future effort on the code maintenance and feature updates.
--- drivers/crypto/ipsec_mb/meson.build | 27 ++ drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c | 175 +++++++++++ .../crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c | 289 +++++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 292 ++++++++++++++++++ drivers/crypto/ipsec_mb/version.map | 3 + drivers/crypto/meson.build | 1 + 6 files changed, 787 insertions(+) create mode 100644 drivers/crypto/ipsec_mb/meson.build create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h create mode 100644 drivers/crypto/ipsec_mb/version.map
drivers/crypto/ipsec_mb/meson.build new file +27 -0
@@ -0,0 +1,27 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 - 2021 Intel Corporation + +IMB_required_ver = '0.52.0' +lib = cc.find_library('IPSec_MB', required: false) +if not lib.found() + build = false + reason = 'missing dependency, "libIPSec_MB"' +else + ext_deps += lib + + # version comes with quotes, so we split based on " and take the middle + imb_ver = cc.get_define('IMB_VERSION_STR', + prefix : '#include<intel-ipsec-mb.h>').split('"')[1] + + if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) + reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( + IMB_required_ver, imb_ver) + build = false + endif + +endif + +sources = files('rte_ipsec_mb_pmd.c', + 'rte_ipsec_mb_pmd_ops.c', + ) +deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c new file +175 -0
175 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c new file +289 -0
289 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h new file +292 -0
292 lines not on this page · raw message
drivers/crypto/ipsec_mb/version.map new file +3 -0
@@ -0,0 +1,3 @@ +DPDK_21 { + local: *; +};
drivers/crypto/meson.build +1 -0
@@ -6,6 +6,7 @@ if is_windows endif drivers = [ + 'ipsec_mb', 'aesni_gcm', 'aesni_mb', 'armv8',
Signature · 13 lines
2.25.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
RFC 2/7 crypto/ipsec_mb: move aesni-mb PMD to ipsec_mb framework
In reply to pbronowxThis patch removes crypto/aesni_mb folder and gathers all aesni-mb PMD implementation specific details into single file pmd_aesni_mb.c in crypto/ipsec_mb.
---
.../crypto/aesni_mb/aesni_mb_pmd_private.h | 337 ----
drivers/crypto/aesni_mb/meson.build | 25 -
.../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 1126 -----------
drivers/crypto/aesni_mb/version.map | 3 -
drivers/crypto/ipsec_mb/meson.build | 1 +
.../pmd_aesni_mb.c} | 1762 ++++++++++++-----
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c | 7 +-
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 145 +-
drivers/crypto/meson.build | 1 -
9 files changed, 1442 insertions(+), 1965 deletions(-)
delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
delete mode 100644 drivers/crypto/aesni_mb/meson.build
delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
delete mode 100644 drivers/crypto/aesni_mb/version.map
rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd.c => ipsec_mb/pmd_aesni_mb.c} (60%)drivers/crypto/aesni_mb/aesni_mb_pmd_private.h deleted +0 -337
@@ -1,337 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2015-2016 Intel Corporation -*/ - -#ifndef _AESNI_MB_PMD_PRIVATE_H_ -#define _AESNI_MB_PMD_PRIVATE_H_ - -#include <intel-ipsec-mb.h> - -#if defined(RTE_LIB_SECURITY ) && (IMB_VERSION_NUM ) >=IMB_VERSION (0 ,54 ,0 ) -#define AESNI_MB_DOCSIS_SEC_ENABLED 1 -#include <rte_security.h> -#include <rte_security_driver.h> -#endif - -enum aesni_mb_vector_mode { -RTE_AESNI_MB_NOT_SUPPORTED =0 , -RTE_AESNI_MB_SSE , -RTE_AESNI_MB_AVX , -RTE_AESNI_MB_AVX2 , -RTE_AESNI_MB_AVX512 -}; - -#define CRYPTODEV_NAME_AESNI_MB_PMD crypto_aesni_mb -/**< AES-NI Multi buffer PMD device name */ - -/** AESNI_MB PMD LOGTYPE DRIVER */ -extern int aesni_mb_logtype_driver; - -#define AESNI_MB_LOG (level, fmt, ...) \ - rte_log(RTE_LOG_ ## level, aesni_mb_logtype_driver, \ - "%s() line %u: " fmt "\n", __func__, __LINE__, \ - ## __VA_ARGS__) - - -#define HMAC_IPAD_VALUE (0x36) -#define HMAC_OPAD_VALUE (0x5C) - -/* Maximum length for digest */ -#define DIGEST_LENGTH_MAX 64 -static const unsigned auth_blocksize[] = { - [NULL_HASH ] =0 , - [MD5 ] =64 , - [SHA1 ] =64 , - [SHA_224 ] =64 , - [SHA_256 ] =64 , - [SHA_384 ] =128 , - [SHA_512 ] =128 , - [AES_XCBC ] =16 , - [AES_CCM ] =16 , - [AES_CMAC ] =16 , - [AES_GMAC ] =16 , - [PLAIN_SHA1 ] =64 , - [PLAIN_SHA_224 ] =64 , - [PLAIN_SHA_256 ] =64 , - [PLAIN_SHA_384 ] =128 , - [PLAIN_SHA_512 ] =128 , -#if IMB_VERSION(0, 53, 3) <= IMB_VERSION_NUM - [IMB_AUTH_ZUC_EIA3_BITLEN ] =16 , - [IMB_AUTH_SNOW3G_UIA2_BITLEN ] =16 , - [IMB_AUTH_KASUMI_UIA1 ] =16 -#endif -}; - -/** -* Get the blocksize in bytes for a specified authentication algorithm -* -* @Note: this function will not return a valid value for a non-valid -* authentication algorithm -*/ -static inline unsigned -get_auth_algo_blocksize (JOB_HASH_ALG algo) -{ -return auth_blocksize[algo]; -} - -static const unsigned auth_truncated_digest_byte_lengths[] = { - [MD5 ] =12 , - [SHA1 ] =12 , - [SHA_224 ] =14 , - [SHA_256 ] =16 , - [SHA_384 ] =24 , - [SHA_512 ] =32 , - [AES_XCBC ] =12 , - [AES_CMAC ] =12 , - [AES_CCM ] =8 , - [NULL_HASH ] =0 , - [AES_GMAC ] =12 , - [PLAIN_SHA1 ] =20 , - [PLAIN_SHA_224 ] =28 , - [PLAIN_SHA_256 ] =32 , - [PLAIN_SHA_384 ] =48 , - [PLAIN_SHA_512 ] =64 , -#if IMB_VERSION(0, 53, 3) <= IMB_VERSION_NUM - [IMB_AUTH_ZUC_EIA3_BITLEN ] =4 , - [IMB_AUTH_SNOW3G_UIA2_BITLEN ] =4 , - [IMB_AUTH_KASUMI_UIA1 ] =4 -#endif -}; - -/** -* Get the IPsec specified truncated length in bytes of the HMAC digest for a -* specified authentication algorithm -* -* @Note: this function will not return a valid value for a non-valid -* authentication algorithm -*/ -static inline unsigned -get_truncated_digest_byte_length (JOB_HASH_ALG algo) -{ -return auth_truncated_digest_byte_lengths[algo]; -} - -static const unsigned auth_digest_byte_lengths[] = { - [MD5 ] =16 , - [SHA1 ] =20 , - [SHA_224 ] =28 , - [SHA_256 ] =32 , - [SHA_384 ] =48 , - [SHA_512 ] =64 , - [AES_XCBC ] =16 , - [AES_CMAC ] =16 , - [AES_CCM ] =16 , - [AES_GMAC ] =16 , - [NULL_HASH ] =0 , - [PLAIN_SHA1 ] =20 , - [PLAIN_SHA_224 ] =28 , - [PLAIN_SHA_256 ] =32 , - [PLAIN_SHA_384 ] =48 , - [PLAIN_SHA_512 ] =64 , -#if IMB_VERSION(0, 53, 3) <= IMB_VERSION_NUM - [IMB_AUTH_ZUC_EIA3_BITLEN ] =4 , - [IMB_AUTH_SNOW3G_UIA2_BITLEN ] =4 , - [IMB_AUTH_KASUMI_UIA1 ] =4 -#endif -/**< Vector mode dependent pointer table of the multi-buffer APIs */ - -}; - -/** -* Get the full digest size in bytes for a specified authentication algorithm -* (if available in the Multi-buffer library) -* -* @Note: this function will not return a valid value for a non-valid -* authentication algorithm -*/ -static inline unsigned -get_digest_byte_length (JOB_HASH_ALG algo) -{ -return auth_digest_byte_lengths[algo]; -} - -enum aesni_mb_operation { -AESNI_MB_OP_HASH_CIPHER , -AESNI_MB_OP_CIPHER_HASH , -AESNI_MB_OP_HASH_ONLY , -AESNI_MB_OP_CIPHER_ONLY , -AESNI_MB_OP_AEAD_HASH_CIPHER , -AESNI_MB_OP_AEAD_CIPHER_HASH , -AESNI_MB_OP_NOT_SUPPORTED -}; - -/** private data structure for each virtual AESNI device */ -struct aesni_mb_private { -enum aesni_mb_vector_mode vector_mode; -/**< CPU vector instruction set mode */ -unsigned max_nb_queue_pairs; -/**< Max number of queue pairs supported by device */ -MB_MGR *mb_mgr; -/**< Multi-buffer instance */ -}; - -/** AESNI Multi buffer queue pair */ -struct aesni_mb_qp { -uint16_t id; -/**< Queue Pair Identifier */ -char name[RTE_CRYPTODEV_NAME_MAX_LEN ]; -/**< Unique Queue Pair Name */ -MB_MGR *mb_mgr; -/**< Multi-buffer instance */ -struct rte_ring *ingress_queue; -/**< Ring for placing operations ready for processing */ -struct rte_mempool *sess_mp; -/**< Session Mempool */ -struct rte_mempool *sess_mp_priv; -/**< Session Private Data Mempool */ -struct rte_cryptodev_stats stats; -/**< Queue pair statistics */ -uint8_t digest_idx; -/**< Index of the next slot to be used in temp_digests, -* to store the digest for a given operation -*/ -uint8_t temp_digests[MAX_JOBS ][DIGEST_LENGTH_MAX ]; -/**< Buffers used to store the digest generated -* by the driver when verifying a digest provided -* by the user (using authentication verify operation) -*/ -} __rte_cache_aligned; - -/** AES-NI multi-buffer private session structure */ -struct aesni_mb_session { -JOB_CHAIN_ORDER chain_order; -struct { -uint16_t length; -uint16_t offset; - } iv; -struct { -uint16_t length; -uint16_t offset; - } auth_iv; -/**< IV parameters */ - -/** Cipher Parameters */ const struct aesni_mb_op_fns *op_fns; -/**< Vector mode dependent pointer table of the multi-buffer APIs */ - -struct { -/** Cipher direction - encrypt / decrypt */ -JOB_CIPHER_DIRECTION direction; -/** Cipher mode - CBC / Counter */ -JOB_CIPHER_MODE mode; - -uint64_t key_length_in_bytes; - -union { -struct { - uint32_t encode[60] __rte_aligned(16); -/**< encode key */ - uint32_t decode[60] __rte_aligned(16); -/**< decode key */ - } expanded_aes_keys; -/**< Expanded AES keys - Allocating space to -* contain the maximum expanded key size which -* is 240 bytes for 256 bit AES, calculate by: -* ((key size (bytes)) * -* ((number of rounds) + 1)) -*/ -struct { -const void *ks_ptr[3 ]; -uint64_t key[3 ][16 ]; - } exp_3des_keys; -/**< Expanded 3DES keys */ - -struct gcm_key_data gcm_key; -/**< Expanded GCM key */ -uint8_t zuc_cipher_key[16 ]; -/**< ZUC cipher key */ -#if IMB_VERSION (0 ,53 ,3 ) <=IMB_VERSION_NUM -snow3g_key_schedule_t pKeySched_snow3g_cipher; -/**< SNOW3G scheduled cipher key */ -kasumi_key_sched_t pKeySched_kasumi_cipher; -/**< KASUMI scheduled cipher key */ -#endif - }; - } cipher; - -/** Authentication Parameters */ -struct { -JOB_HASH_ALG algo;/**< Authentication Algorithm */ -enum rte_crypto_auth_operation operation; -/**< auth operation generate or verify */ -union { -struct { - uint8_t inner[128] __rte_aligned(16); -/**< inner pad */ - uint8_t outer[128] __rte_aligned(16); -/**< outer pad */ - } pads; -/**< HMAC Authentication pads - -* allocating space for the maximum pad -* size supported which is 128 bytes for -* SHA512 -*/ - -struct { - uint32_t k1_expanded[44] __rte_aligned(16); -/**< k1 (expanded key). */ - uint8_t k2[16] __rte_aligned(16); -/**< k2. */ - uint8_t k3[16] __rte_aligned(16); -/**< k3. */ - } xcbc; - -struct { - uint32_t expkey[60] __rte_aligned(16); -/**< k1 (expanded key). */ - uint32_t skey1[4] __rte_aligned(16); -/**< k2. */ - uint32_t skey2[4] __rte_aligned(16); -/**< k3. */ - } cmac; -/**< Expanded XCBC authentication keys */ -uint8_t zuc_auth_key[16 ]; -/**< ZUC authentication key */ -#if IMB_VERSION (0 ,53 ,3 ) <=IMB_VERSION_NUM -snow3g_key_schedule_t pKeySched_snow3g_auth; -/**< SNOW3G scheduled authentication key */ -kasumi_key_sched_t pKeySched_kasumi_auth; -/**< KASUMI scheduled authentication key */ -#endif - }; -/** Generated digest size by the Multi-buffer library */ -uint16_t gen_digest_len; -/** Requested digest size from Cryptodev */ -uint16_t req_digest_len; - - } auth; -struct { -/** AAD data length */ -uint16_t aad_len; - } aead; -} __rte_cache_aligned; - -extern int -aesni_mb_set_session_parameters (const MB_MGR *mb_mgr, -struct aesni_mb_session *sess, -const struct rte_crypto_sym_xform *xform); - -#ifdef AESNI_MB_DOCSIS_SEC_ENABLED -extern int -aesni_mb_set_docsis_sec_session_parameters ( - __rte_unused struct rte_cryptodev *dev, -struct rte_security_session_conf *conf, -void *sess); -#endif - -/** device specific operations function pointer structures */ -extern struct rte_cryptodev_ops *rte_aesni_mb_pmd_ops; -#ifdef AESNI_MB_DOCSIS_SEC_ENABLED -extern struct rte_security_ops *rte_aesni_mb_pmd_sec_ops; -#endif - -extern uint32_t -aesni_mb_cpu_crypto_process_bulk (struct rte_cryptodev *dev, -struct rte_cryptodev_sym_session *sess,union rte_crypto_sym_ofs sofs, -struct rte_crypto_sym_vec *vec); - -#endif /* _AESNI_MB_PMD_PRIVATE_H_ */
drivers/crypto/aesni_mb/meson.build deleted +0 -25
@@ -1,25 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018 Intel Corporation - -IMB_required_ver = '0.52.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - ext_deps += lib - - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -sources = files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c') -deps += ['bus_vdev', 'net', 'security']
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c deleted +0 -1126
1,126 lines not on this page · raw message
drivers/crypto/aesni_mb/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_21 { - local: *; -};
drivers/crypto/ipsec_mb/meson.build +1 -0
@@ -23,5 +23,6 @@ endif sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', + 'pmd_aesni_mb.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_aesni_mb.c renamed from drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +1292 -470
1,503 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c +5 -2
Lines of this file are not shown. View the raw message.
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +144 -1
145 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 13 lines
2.25.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Part of the diff is not shown here. View the raw message.
RFC 3/7 crypto/ipsec_mb: move aesni-gcm PMD to ipsec_mb framework
In reply to pbronowxThis patch removes crypto/aesni_gcm folder and gathers all aesni-gcm PMD implementation specific details into single file pmd_aesni_gcm.c in crypto/ipsec_mb folder.
--- drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 104 -- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 978 ---------------- drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 333 ------ .../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 123 -- drivers/crypto/aesni_gcm/meson.build | 24 - drivers/crypto/aesni_gcm/version.map | 3 - drivers/crypto/ipsec_mb/meson.build | 3 +- drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 1015 +++++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 + drivers/crypto/meson.build | 1 - 10 files changed, 1024 insertions(+), 1567 deletions(-) delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h delete mode 100644 drivers/crypto/aesni_gcm/meson.build delete mode 100644 drivers/crypto/aesni_gcm/version.map create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
drivers/crypto/aesni_gcm/aesni_gcm_ops.h deleted +0 -104
@@ -1,104 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause -* Copyright(c) 2016-2020 Intel Corporation -*/ - -#ifndef _AESNI_GCM_OPS_H_ -#define _AESNI_GCM_OPS_H_ - -#ifndef LINUX -#define LINUX -#endif - -#include <intel-ipsec-mb.h> - -/** Supported vector modes */ -enum aesni_gcm_vector_mode { -RTE_AESNI_GCM_NOT_SUPPORTED =0 , -RTE_AESNI_GCM_SSE , -RTE_AESNI_GCM_AVX , -RTE_AESNI_GCM_AVX2 , -RTE_AESNI_GCM_AVX512 , -RTE_AESNI_GCM_VECTOR_NUM -}; - -enum aesni_gcm_key { -GCM_KEY_128 =0 , -GCM_KEY_192 , -GCM_KEY_256 , -GCM_KEY_NUM -}; - -typedef void (*aesni_gcm_t )(const struct gcm_key_data *gcm_key_data, -struct gcm_context_data *gcm_ctx_data,uint8_t *out, -const uint8_t *in,uint64_t plaintext_len,const uint8_t *iv, -const uint8_t *aad,uint64_t aad_len, -uint8_t *auth_tag,uint64_t auth_tag_len); - -typedef void (*aesni_gcm_pre_t )(const void *key,struct gcm_key_data *gcm_data); - -typedef void (*aesni_gcm_init_t )(const struct gcm_key_data *gcm_key_data, -struct gcm_context_data *gcm_ctx_data, -const uint8_t *iv, -uint8_t const *aad, -uint64_t aad_len); - -typedef void (*aesni_gcm_update_t )(const struct gcm_key_data *gcm_key_data, -struct gcm_context_data *gcm_ctx_data, -uint8_t *out, -const uint8_t *in, -uint64_t plaintext_len); - -typedef void (*aesni_gcm_finalize_t )(const struct gcm_key_data *gcm_key_data, -struct gcm_context_data *gcm_ctx_data, -uint8_t *auth_tag, -uint64_t auth_tag_len); - -#if IMB_VERSION (0 ,54 ,0 ) <IMB_VERSION_NUM -typedef void (*aesni_gmac_init_t )(const struct gcm_key_data *gcm_key_data, -struct gcm_context_data *gcm_ctx_data, -const uint8_t *iv, -const uint64_t iv_len); - -typedef void (*aesni_gmac_update_t )(const struct gcm_key_data *gcm_key_data, -struct gcm_context_data *gcm_ctx_data, -const uint8_t *in, -const uint64_t plaintext_len); - -typedef void (*aesni_gmac_finalize_t )(const struct gcm_key_data *gcm_key_data, -struct gcm_context_data *gcm_ctx_data, -uint8_t *auth_tag, -const uint64_t auth_tag_len); -#endif - -/** GCM library function pointer table */ -struct aesni_gcm_ops { -aesni_gcm_t enc;/**< GCM encode function pointer */ -aesni_gcm_t dec;/**< GCM decode function pointer */ -aesni_gcm_pre_t pre;/**< GCM pre-compute */ -aesni_gcm_init_t init; -aesni_gcm_update_t update_enc; -aesni_gcm_update_t update_dec; -aesni_gcm_finalize_t finalize_enc; -aesni_gcm_finalize_t finalize_dec; -#if IMB_VERSION (0 ,54 ,0 ) <IMB_VERSION_NUM -aesni_gmac_init_t gmac_init; -aesni_gmac_update_t gmac_update; -aesni_gmac_finalize_t gmac_finalize; -#endif -}; - -/** GCM per-session operation handlers */ -struct aesni_gcm_session_ops { -aesni_gcm_t cipher; -aesni_gcm_pre_t pre; -aesni_gcm_init_t init; -aesni_gcm_update_t update; -aesni_gcm_finalize_t finalize; -#if IMB_VERSION (0 ,54 ,0 ) <IMB_VERSION_NUM -aesni_gmac_init_t gmac_init; -aesni_gmac_update_t gmac_update; -aesni_gmac_finalize_t gmac_finalize; -#endif -}; - -#endif /* _AESNI_GCM_OPS_H_ */
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c deleted +0 -978
978 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c deleted +0 -333
333 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h deleted +0 -123
123 lines not on this page · raw message
drivers/crypto/aesni_gcm/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018 Intel Corporation - -IMB_required_ver = '0.52.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - ext_deps += lib - - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif -endif - -sources = files('aesni_gcm_pmd.c', 'aesni_gcm_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/aesni_gcm/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_21 { - local: *; -};
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -23,6 +23,7 @@ endif sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', - 'pmd_aesni_mb.c' + 'pmd_aesni_mb.c', + 'pmd_aesni_gcm.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c new file +1015 -0
1,015 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -34,6 +34,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_AESNI_MB_PMD crypto_aesni_mb/**< IPSEC Multi buffer aesni_mb PMD device name */ +#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm +/**< IPSEC Multi buffer PMD aesni_gcm device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -43,6 +46,7 @@ extern int ipsec_mb_logtype_driver;/** All supported device types */ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 , +IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_N_PMD_TYPES };
@@ -62,6 +66,7 @@ enum ipsec_mb_operation { };extern uint8_t pmd_driver_id_aesni_mb; +extern uint8_t pmd_driver_id_aesni_gcm;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -70,6 +75,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)switch (pmd_type) {case IPSEC_MB_PMD_TYPE_AESNI_MB :return pmd_driver_id_aesni_mb; +case IPSEC_MB_PMD_TYPE_AESNI_GCM : +return pmd_driver_id_aesni_gcm;default :break ; }
drivers/crypto/meson.build +0 -1
@@ -7,7 +7,6 @@ endif drivers = [ 'ipsec_mb', - 'aesni_gcm', 'armv8', 'bcmfs', 'caam_jr',
Signature · 13 lines
2.25.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
RFC 4/7 crypto/ipsec_mb: move kasumi PMD to ipsec_mb framework
In reply to pbronowxThis patch removes crypto/kasumi folder and gathers all kasumi PMD implementation specific details into single file pmd_kasumi.c in crypto/ipsec_mb folder.
--- drivers/crypto/ipsec_mb/meson.build | 3 +- drivers/crypto/ipsec_mb/pmd_kasumi.c | 557 +++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 + drivers/crypto/kasumi/kasumi_pmd_private.h | 81 --- drivers/crypto/kasumi/meson.build | 24 - drivers/crypto/kasumi/rte_kasumi_pmd.c | 642 ------------------ drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 316 --------- drivers/crypto/kasumi/version.map | 3 - drivers/crypto/meson.build | 1 - 9 files changed, 566 insertions(+), 1068 deletions(-) create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi.c delete mode 100644 drivers/crypto/kasumi/kasumi_pmd_private.h delete mode 100644 drivers/crypto/kasumi/meson.build delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd.c delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c delete mode 100644 drivers/crypto/kasumi/version.map
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -24,6 +24,7 @@ endif sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', 'pmd_aesni_mb.c', - 'pmd_aesni_gcm.c' + 'pmd_aesni_gcm.c', + 'pmd_kasumi.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_kasumi.c new file +557 -0
557 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -37,6 +37,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm/**< IPSEC Multi buffer PMD aesni_gcm device name */ +#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi +/**< IPSEC Multi buffer PMD kasumi device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -47,6 +50,7 @@ extern int ipsec_mb_logtype_driver;enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 ,IPSEC_MB_PMD_TYPE_AESNI_GCM , +IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_N_PMD_TYPES };
@@ -67,6 +71,7 @@ enum ipsec_mb_operation {extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm; +extern uint8_t pmd_driver_id_kasumi;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -77,6 +82,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_aesni_mb;case IPSEC_MB_PMD_TYPE_AESNI_GCM :return pmd_driver_id_aesni_gcm; +case IPSEC_MB_PMD_TYPE_KASUMI : +return pmd_driver_id_kasumi;default :break ; }
drivers/crypto/kasumi/kasumi_pmd_private.h deleted +0 -81
81 lines not on this page · raw message
drivers/crypto/kasumi/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_kasumi_pmd.c', 'rte_kasumi_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/kasumi/rte_kasumi_pmd.c deleted +0 -642
642 lines not on this page · raw message
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c deleted +0 -316
316 lines not on this page · raw message
drivers/crypto/kasumi/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_21 { - local: *; -};
drivers/crypto/meson.build +0 -1
@@ -13,7 +13,6 @@ drivers = [ 'ccp', 'dpaa_sec', 'dpaa2_sec', - 'kasumi', 'mvsam', 'nitrox', 'null',
Signature · 13 lines
2.25.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
RFC 5/7 crypto/ipsec_mb: move snow3g PMD to ipsec_mb framework
In reply to pbronowxThis patch removes crypto/snow3g folder and gathers all snow3g PMD implementation specific details into single file pmd_snow3g.c in crypto/ipsec_mb folder.
---
drivers/crypto/ipsec_mb/meson.build | 3 +-
.../pmd_snow3g.c} | 465 ++++++++----------
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 +
drivers/crypto/meson.build | 1 -
drivers/crypto/snow3g/meson.build | 24 -
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 323 ------------
drivers/crypto/snow3g/snow3g_pmd_private.h | 84 ----
drivers/crypto/snow3g/version.map | 3 -
8 files changed, 209 insertions(+), 701 deletions(-)
rename drivers/crypto/{snow3g/rte_snow3g_pmd.c => ipsec_mb/pmd_snow3g.c} (57%)
delete mode 100644 drivers/crypto/snow3g/meson.build
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
delete mode 100644 drivers/crypto/snow3g/snow3g_pmd_private.h
delete mode 100644 drivers/crypto/snow3g/version.mapdrivers/crypto/ipsec_mb/meson.build +2 -1
@@ -25,6 +25,7 @@ sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', - 'pmd_kasumi.c' + 'pmd_kasumi.c', + 'pmd_snow3g.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_snow3g.c renamed from drivers/crypto/snow3g/rte_snow3g_pmd.c +200 -265
693 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -40,6 +40,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi/**< IPSEC Multi buffer PMD kasumi device name */ +#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g +/**< IPSEC Multi buffer PMD snow3g device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -51,6 +54,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 ,IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_PMD_TYPE_KASUMI , +IPSEC_MB_PMD_TYPE_SNOW3G , IPSEC_MB_N_PMD_TYPES };
@@ -72,6 +76,7 @@ enum ipsec_mb_operation {extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi; +extern uint8_t pmd_driver_id_snow3g;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -84,6 +89,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_aesni_gcm;case IPSEC_MB_PMD_TYPE_KASUMI :return pmd_driver_id_kasumi; +case IPSEC_MB_PMD_TYPE_SNOW3G : +return pmd_driver_id_snow3g;default :break ; }
drivers/crypto/meson.build +0 -1
@@ -20,7 +20,6 @@ drivers = [ 'octeontx2', 'openssl', 'scheduler', - 'snow3g', 'virtio', 'zuc', ]
drivers/crypto/snow3g/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2019-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_snow3g_pmd.c', 'rte_snow3g_pmd_ops.c') -deps += ['bus_vdev', 'cryptodev']
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c deleted +0 -323
323 lines not on this page · raw message
drivers/crypto/snow3g/snow3g_pmd_private.h deleted +0 -84
84 lines not on this page · raw message
drivers/crypto/snow3g/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_21 { - local: *; -};
Signature · 13 lines
2.25.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
pbronowx
AppliedRFC 6/7 crypto/snow3g: add support for digest appended ops
In reply to pbronowxThis patch enable out-of-place auth-cipher operations where digest should be encrypted among with the rest of raw data. It also adds support for partially encrypted digest when using auth-cipher operations.
Merged to ipsec_mb framework.
--- doc/guides/cryptodevs/features/snow3g.ini | 1 + drivers/crypto/ipsec_mb/pmd_snow3g.c | 140 ++++++++++++++++++++-- 2 files changed, 128 insertions(+), 13 deletions(-)
doc/guides/cryptodevs/features/snow3g.ini +1 -0
@@ -8,6 +8,7 @@ Symmetric crypto = Y Sym operation chaining = Y Symmetric sessionless = Y Non-Byte aligned data = Y +Digest encrypted = Y OOP LB In LB Out = Y ;
drivers/crypto/ipsec_mb/pmd_snow3g.c +127 -13
213 lines not on this page · raw message
Signature · 13 lines
2.25.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
RFC 7/7 crypto/ipsec_mb: move zuc PMD to ipsec_mb framework
In reply to pbronowxThis patch removes crypto/zuc folder and gathers all zuc PMD implementation specific details into single file pmd_zuc.c in crypto/ipsec_mb folder.
---
drivers/crypto/ipsec_mb/meson.build | 3 +-
.../{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} | 456 ++++++++----------
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 +
drivers/crypto/meson.build | 1 -
drivers/crypto/zuc/meson.build | 24 -
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 322 -------------
drivers/crypto/zuc/version.map | 3 -
drivers/crypto/zuc/zuc_pmd_private.h | 83 ----
8 files changed, 198 insertions(+), 701 deletions(-)
rename drivers/crypto/{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} (52%)
delete mode 100644 drivers/crypto/zuc/meson.build
delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd_ops.c
delete mode 100644 drivers/crypto/zuc/version.map
delete mode 100644 drivers/crypto/zuc/zuc_pmd_private.hdrivers/crypto/ipsec_mb/meson.build +2 -1
@@ -26,6 +26,7 @@ sources = files('rte_ipsec_mb_pmd.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', 'pmd_kasumi.c', - 'pmd_snow3g.c' + 'pmd_snow3g.c', + 'pmd_zuc.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_zuc.c renamed from drivers/crypto/zuc/rte_zuc_pmd.c +189 -267
617 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -43,6 +43,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g/**< IPSEC Multi buffer PMD snow3g device name */ +#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc +/**< IPSEC Multi buffer PMD zuc device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -55,6 +58,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_PMD_TYPE_SNOW3G , +IPSEC_MB_PMD_TYPE_ZUC , IPSEC_MB_N_PMD_TYPES };
@@ -77,6 +81,7 @@ extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi;extern uint8_t pmd_driver_id_snow3g; +extern uint8_t pmd_driver_id_zuc;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -91,6 +96,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_kasumi;case IPSEC_MB_PMD_TYPE_SNOW3G :return pmd_driver_id_snow3g; +case IPSEC_MB_PMD_TYPE_ZUC : +return pmd_driver_id_zuc;default :break ; }
drivers/crypto/meson.build +0 -1
@@ -21,7 +21,6 @@ drivers = [ 'openssl', 'scheduler', 'virtio', - 'zuc', ] std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
drivers/crypto/zuc/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_zuc_pmd.c', 'rte_zuc_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/zuc/rte_zuc_pmd_ops.c deleted +0 -322
322 lines not on this page · raw message
drivers/crypto/zuc/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_21 { - local: *; -};
drivers/crypto/zuc/zuc_pmd_private.h deleted +0 -83
83 lines not on this page · raw message
Signature · 13 lines
2.25.1 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Hello,
Quoted 6 lines · pbronowx
This set of patches introduces the new framework making all common code of SW crypto PMDs implementations build on top of intel-ipsec-mb library sharable, also helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementations specific details into single file located in
crypto/ipsec_mbfolder.
As you described it, this framework should go to drivers/common/.
Quoted 11 lines
pbronowx (6):
crypto/ipsec_mb: move aesni-mb PMD toipsec_mbframeworkcrypto/ipsec_mb: move aesni-gcm PMD toipsec_mbframeworkcrypto/ipsec_mb: move kasumi PMD toipsec_mbframeworkcrypto/ipsec_mb: move snow3g PMD toipsec_mbframeworkcrypto/snow3g: add support for digest appended opscrypto/ipsec_mb: move zuc PMD toipsec_mbframeworkpibr (1):
crypto/ipsec_mb: introduceipsec_mbframework
Please use full names.
Quoted 81 lines
doc/guides/cryptodevs/features/snow3g.ini | 1 + drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 104 - drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 978 --------- drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 333 ---- .../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 123 -- drivers/crypto/aesni_gcm/meson.build | 24 - .../crypto/aesni_mb/aesni_mb_pmd_private.h | 337 ---- drivers/crypto/aesni_mb/meson.build | 25 - .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 1126 ----------- drivers/crypto/aesni_mb/version.map | 3 - drivers/crypto/ipsec_mb/meson.build | 32 + drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 1015 ++++++++++ .../pmd_aesni_mb.c} | 1762 ++++++++++++----- drivers/crypto/ipsec_mb/pmd_kasumi.c | 557 ++++++ drivers/crypto/ipsec_mb/pmd_snow3g.c | 705 +++++++ .../{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} | 456 ++--- drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c | 178 ++ .../crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c | 289 +++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 463 +++++ .../{aesni_gcm => ipsec_mb}/version.map | 0 drivers/crypto/kasumi/kasumi_pmd_private.h | 81 - drivers/crypto/kasumi/meson.build | 24 - drivers/crypto/kasumi/rte_kasumi_pmd.c | 642 ------ drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 316 --- drivers/crypto/kasumi/version.map | 3 - drivers/crypto/meson.build | 6 +- drivers/crypto/snow3g/meson.build | 24 - drivers/crypto/snow3g/rte_snow3g_pmd.c | 656 ------ drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 323 --- drivers/crypto/snow3g/snow3g_pmd_private.h | 84 - drivers/crypto/snow3g/version.map | 3 - drivers/crypto/zuc/meson.build | 24 - drivers/crypto/zuc/rte_zuc_pmd_ops.c | 322 --- drivers/crypto/zuc/version.map | 3 - drivers/crypto/zuc/zuc_pmd_private.h | 83 - 35 files changed, 4722 insertions(+), 6383 deletions(-) delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h delete mode 100644 drivers/crypto/aesni_gcm/meson.build delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h delete mode 100644 drivers/crypto/aesni_mb/meson.build delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c delete mode 100644 drivers/crypto/aesni_mb/version.map create mode 100644 drivers/crypto/ipsec_mb/meson.build create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm.c rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd.c => ipsec_mb/pmd_aesni_mb.c} (60%) create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi.c create mode 100644 drivers/crypto/ipsec_mb/pmd_snow3g.c rename drivers/crypto/{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} (52%) create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h rename drivers/crypto/{aesni_gcm => ipsec_mb}/version.map (100%) delete mode 100644 drivers/crypto/kasumi/kasumi_pmd_private.h delete mode 100644 drivers/crypto/kasumi/meson.build delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd.c delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c delete mode 100644 drivers/crypto/kasumi/version.map delete mode 100644 drivers/crypto/snow3g/meson.build delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd.c delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c delete mode 100644 drivers/crypto/snow3g/snow3g_pmd_private.h delete mode 100644 drivers/crypto/snow3g/version.map delete mode 100644 drivers/crypto/zuc/meson.build delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd_ops.c delete mode 100644 drivers/crypto/zuc/version.map delete mode 100644 drivers/crypto/zuc/zuc_pmd_private.h--
2.25.1--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263
Quoted 4 lines
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
Please ask your IT to get this trailer removed.
Signature · 1 line
David Marchand
Hi David,
Quoted 5 lines
Hello,
Quoted 1 line · pbronowx
Quoted 8 lines
Quoted 1 line
This set of patches introduces the new framework making all common code
of
Quoted 4 lines
SW crypto PMDs implementations build on top of intel-ipsec-mb library sharable, also helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementations specific details into single file located in
crypto/ipsec_mbfolder.As you described it, this framework should go to
drivers/common/.
This patch set is moving a lot of SW crypto drivers into a single driver In drivers/crypto/ipsec_mb.
This should be part of drivers/crypto only.
But this patchset is a bit late as V1 deadline is already crossed for 21.08.
Regards,
Akhil
Hi Akhil,
We targeted this patchset for 21.11. Just want to know everybody's thoughts before submitting V1.
Regards,
Fan
Quoted 35 lines
-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Friday, June 18, 2021 5:05 PM
To: David Marchand <[email protected]>; Bronowski, PiotrX <[email protected]>
Cc: dev <[email protected]>; Zhang, Roy Fan <[email protected]>; Thomas Monjalon <[email protected]>; Yigit, Ferruh <[email protected]>; Doherty, Declan <[email protected]>
Subject: RE: [EXT] Re: [dpdk-dev] [RFC 0/7]crypto/ipsec_mb: introduceipsec_mbframeworkHi David,
Quoted 6 lines
Hello,
Quoted 2 lines · pbronowx
This set of patches introduces the new framework making all common
code
Quoted 4 lines
of
Quoted 3 lines
SW crypto PMDs implementations build on top of intel-ipsec-mb library sharable, also helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementations specific
details
Quoted 3 lines
Quoted 1 line
into single file located in
crypto/ipsec_mbfolder.As you described it, this framework should go to
drivers/common/.This patch set is moving a lot of SW crypto drivers into a single driver In
drivers/crypto/ipsec_mb.
This should be part ofdrivers/cryptoonly.
But this patchset is a bit late as V1 deadline is already crossed for 21.08.Regards,
Akhil
cover drivers/crypto: introduce ipsec_mb framework
In reply to pbronowxThis set of patches introduces a new framework, making all common code of SW crypto PMD implementations built on top of intel-ipsec-mb library sharable. This helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementation specific details into single files located in the crypto/ipsec_mb folder.
A chacha20-poly1305 SW PMD is added based on this framework. The minimum intel-ipsec-mb version required is bumped to 1.0.
Fan Zhang (1):
drivers/crypto: introduce IPsec-mb framework
Kai Ji (1):
crypto/ipsec_mb: add chacha20-poly1305 PMD to framework
pbronowx (6):
drivers/crypto: move aesni-mb PMD to IPsec-mb framework drivers/crypto: move aesni-gcm PMD to IPsec-mb framework drivers/crypto: move kasumi PMD to IPsec-mb framework drivers/crypto: move snow3g PMD to IPsec-mb framework crypto/ipsec_mb: add snow3g digest appended ops support drivers/crypto: move zuc PMD to IPsec-mb framework
app/test/test_cryptodev.c | 22 +
app/test/test_cryptodev.h | 1 +
app/test/test_cryptodev_aead_test_vectors.h | 114 ++
doc/guides/cryptodevs/aesni_gcm.rst | 4 +-
doc/guides/cryptodevs/aesni_mb.rst | 4 +-
doc/guides/cryptodevs/features/snow3g.ini | 1 +
doc/guides/cryptodevs/kasumi.rst | 3 +-
doc/guides/cryptodevs/snow3g.rst | 3 +-
doc/guides/cryptodevs/zuc.rst | 3 +-
drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 104 -
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 984 ---------
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 333 ----
.../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 123 --
drivers/crypto/aesni_gcm/meson.build | 24 -
.../crypto/aesni_mb/aesni_mb_pmd_private.h | 337 ----
drivers/crypto/aesni_mb/meson.build | 25 -
.../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 1126 -----------
drivers/crypto/aesni_mb/version.map | 3 -
drivers/crypto/ipsec_mb/meson.build | 33 +
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 956 +++++++++
.../pmd_aesni_mb.c} | 1767 ++++++++++++-----
drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 529 +++++
drivers/crypto/ipsec_mb/pmd_kasumi.c | 557 ++++++
drivers/crypto/ipsec_mb/pmd_snow3g.c | 705 +++++++
.../{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} | 462 ++---
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c | 173 ++
.../crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c | 289 +++
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 470 +++++
.../{aesni_gcm => ipsec_mb}/version.map | 2 +-
drivers/crypto/kasumi/kasumi_pmd_private.h | 81 -
drivers/crypto/kasumi/meson.build | 24 -
drivers/crypto/kasumi/rte_kasumi_pmd.c | 642 ------
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 316 ---
drivers/crypto/kasumi/version.map | 3 -
drivers/crypto/meson.build | 6 +-
drivers/crypto/snow3g/meson.build | 24 -
drivers/crypto/snow3g/rte_snow3g_pmd.c | 656 ------
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 323 ---
drivers/crypto/snow3g/snow3g_pmd_private.h | 84 -
drivers/crypto/snow3g/version.map | 3 -
drivers/crypto/zuc/meson.build | 24 -
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 322 ---
drivers/crypto/zuc/version.map | 3 -
drivers/crypto/zuc/zuc_pmd_private.h | 83 -
44 files changed, 5319 insertions(+), 6432 deletions(-)
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
delete mode 100644 drivers/crypto/aesni_gcm/meson.build
delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
delete mode 100644 drivers/crypto/aesni_mb/meson.build
delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
delete mode 100644 drivers/crypto/aesni_mb/version.map
create mode 100644 drivers/crypto/ipsec_mb/meson.build
create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd.c => ipsec_mb/pmd_aesni_mb.c} (60%)
create mode 100644 drivers/crypto/ipsec_mb/pmd_chacha_poly.c
create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi.c
create mode 100644 drivers/crypto/ipsec_mb/pmd_snow3g.c
rename drivers/crypto/{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} (50%)
create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c
create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c
create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h
rename drivers/crypto/{aesni_gcm => ipsec_mb}/version.map (58%)
delete mode 100644 drivers/crypto/kasumi/kasumi_pmd_private.h
delete mode 100644 drivers/crypto/kasumi/meson.build
delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd.c
delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
delete mode 100644 drivers/crypto/kasumi/version.map
delete mode 100644 drivers/crypto/snow3g/meson.build
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd.c
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
delete mode 100644 drivers/crypto/snow3g/snow3g_pmd_private.h
delete mode 100644 drivers/crypto/snow3g/version.map
delete mode 100644 drivers/crypto/zuc/meson.build
delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd_ops.c
delete mode 100644 drivers/crypto/zuc/version.map
delete mode 100644 drivers/crypto/zuc/zuc_pmd_private.hSignature · 1 line
2.25.1
PATCH 1/8 drivers/crypto: introduce IPsec-mb framework
From: Fan Zhang <[email protected]>
This patch introduces the new framework making
all common code of SW crypto PMDs implementations built on top of intel-ipsec-mb library shareable, also helps to reduce future effort on the code maintenance and feature updates.
--- drivers/crypto/ipsec_mb/meson.build | 27 ++ drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c | 170 ++++++++++ .../crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c | 289 +++++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 292 ++++++++++++++++++ drivers/crypto/ipsec_mb/version.map | 3 + drivers/crypto/meson.build | 1 + 6 files changed, 782 insertions(+) create mode 100644 drivers/crypto/ipsec_mb/meson.build create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h create mode 100644 drivers/crypto/ipsec_mb/version.map
drivers/crypto/ipsec_mb/meson.build new file +27 -0
@@ -0,0 +1,27 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 - 2021 Intel Corporation + +IMB_required_ver = '1.0.0' +lib = cc.find_library('IPSec_MB', required: false) +if not lib.found() + build = false + reason = 'missing dependency, "libIPSec_MB"' +else + ext_deps += lib + + # version comes with quotes, so we split based on " and take the middle + imb_ver = cc.get_define('IMB_VERSION_STR', + prefix : '#include<intel-ipsec-mb.h>').split('"')[1] + + if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) + reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( + IMB_required_ver, imb_ver) + build = false + endif + +endif + +sources = files('rte_ipsec_mb_pmd.c', + 'rte_ipsec_mb_pmd_ops.c', + ) +deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c new file +170 -0
170 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c new file +289 -0
289 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h new file +292 -0
292 lines not on this page · raw message
drivers/crypto/ipsec_mb/version.map new file +3 -0
@@ -0,0 +1,3 @@ +DPDK_21 { + local: *; +};
drivers/crypto/meson.build +1 -0
@@ -6,6 +6,7 @@ if is_windows endif drivers = [ + 'ipsec_mb', 'aesni_gcm', 'aesni_mb', 'armv8',
Signature · 1 line
2.25.1
PATCH 2/8 drivers/crypto: move aesni-mb PMD to IPsec-mb framework
In reply to Ciara PowerFrom: pbronowx <[email protected]>
This patch removes the crypto/aesni_mb folder and gathers all aesni-mb PMD implementation specific details into a single file, pmd_aesni_mb.c in crypto/ipsec_mb.
---
doc/guides/cryptodevs/aesni_mb.rst | 4 +-
.../crypto/aesni_mb/aesni_mb_pmd_private.h | 337 ----
drivers/crypto/aesni_mb/meson.build | 25 -
.../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 1126 -----------
drivers/crypto/aesni_mb/version.map | 3 -
drivers/crypto/ipsec_mb/meson.build | 1 +
.../pmd_aesni_mb.c} | 1767 ++++++++++++-----
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c | 7 +-
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 145 +-
drivers/crypto/meson.build | 1 -
10 files changed, 1419 insertions(+), 1997 deletions(-)
delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
delete mode 100644 drivers/crypto/aesni_mb/meson.build
delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
delete mode 100644 drivers/crypto/aesni_mb/version.map
rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd.c => ipsec_mb/pmd_aesni_mb.c} (60%)doc/guides/cryptodevs/aesni_mb.rst +3 -1
@@ -130,7 +130,9 @@ and the Multi-Buffer library version supported by them: 18.02 0.48 18.05 - 19.02 0.49 - 0.52 19.05 - 19.08 0.52 - 19.11+ 0.52 - 1.0* + 19.11 - 20.08 0.52 - 0.55 + 20.11 - 21.08 0.53 - 1.0* + 21.11+ 1.0* ============== ============================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
drivers/crypto/aesni_mb/aesni_mb_pmd_private.h deleted +0 -337
337 lines not on this page · raw message
drivers/crypto/aesni_mb/meson.build deleted +0 -25
@@ -1,25 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018 Intel Corporation - -IMB_required_ver = '0.52.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - ext_deps += lib - - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -sources = files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c') -deps += ['bus_vdev', 'net', 'security']
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c deleted +0 -1126
1,126 lines not on this page · raw message
drivers/crypto/aesni_mb/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/ipsec_mb/meson.build +1 -0
@@ -23,5 +23,6 @@ endif sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', + 'pmd_aesni_mb.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_aesni_mb.c renamed from drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +1266 -501
1,493 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c +5 -2
Lines of this file are not shown. View the raw message.
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +144 -1
145 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
PATCH 3/8 drivers/crypto: move aesni-gcm PMD to IPsec-mb framework
In reply to Ciara PowerFrom: pbronowx <[email protected]>
This patch removes the crypto/aesni_gcm folder and gathers all aesni-gcm PMD implementation specific details into a single file, pmd_aesni_gcm.c in the crypto/ipsec_mb folder.
A redundant check for iv length is removed.
--- doc/guides/cryptodevs/aesni_gcm.rst | 4 +- drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 104 -- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 984 ------------------ drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 333 ------ .../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 123 --- drivers/crypto/aesni_gcm/meson.build | 24 - drivers/crypto/aesni_gcm/version.map | 3 - drivers/crypto/ipsec_mb/meson.build | 3 +- drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 956 +++++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 + drivers/crypto/meson.build | 1 - 11 files changed, 968 insertions(+), 1574 deletions(-) delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h delete mode 100644 drivers/crypto/aesni_gcm/meson.build delete mode 100644 drivers/crypto/aesni_gcm/version.map create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
doc/guides/cryptodevs/aesni_gcm.rst +3 -1
@@ -83,7 +83,9 @@ and the external crypto libraries supported by them: 17.02 - 17.05 ISA-L Crypto v2.18 17.08 - 18.02 Multi-buffer library 0.46 - 0.48 18.05 - 19.02 Multi-buffer library 0.49 - 0.52 - 19.05+ Multi-buffer library 0.52 - 1.0* + 19.05 - 20.08 Multi-buffer library 0.52 - 0.55 + 20.11 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
drivers/crypto/aesni_gcm/aesni_gcm_ops.h deleted +0 -104
104 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c deleted +0 -984
984 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c deleted +0 -333
333 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h deleted +0 -123
123 lines not on this page · raw message
drivers/crypto/aesni_gcm/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018 Intel Corporation - -IMB_required_ver = '0.52.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - ext_deps += lib - - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif -endif - -sources = files('aesni_gcm_pmd.c', 'aesni_gcm_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/aesni_gcm/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -23,6 +23,7 @@ endif sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', - 'pmd_aesni_mb.c' + 'pmd_aesni_mb.c', + 'pmd_aesni_gcm.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c new file +956 -0
956 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -34,6 +34,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_AESNI_MB_PMD crypto_aesni_mb/**< IPSEC Multi buffer aesni_mb PMD device name */ +#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm +/**< IPSEC Multi buffer PMD aesni_gcm device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -43,6 +46,7 @@ extern int ipsec_mb_logtype_driver;/** All supported device types */ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 , +IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_N_PMD_TYPES };
@@ -62,6 +66,7 @@ enum ipsec_mb_operation { };extern uint8_t pmd_driver_id_aesni_mb; +extern uint8_t pmd_driver_id_aesni_gcm;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -70,6 +75,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)switch (pmd_type) {case IPSEC_MB_PMD_TYPE_AESNI_MB :return pmd_driver_id_aesni_mb; +case IPSEC_MB_PMD_TYPE_AESNI_GCM : +return pmd_driver_id_aesni_gcm;default :break ; }
drivers/crypto/meson.build +0 -1
@@ -7,7 +7,6 @@ endif drivers = [ 'ipsec_mb', - 'aesni_gcm', 'armv8', 'bcmfs', 'caam_jr',
Signature · 1 line
2.25.1
PATCH 4/8 drivers/crypto: move kasumi PMD to IPsec-mb framework
In reply to Ciara PowerFrom: pbronowx <[email protected]>
This patch removes the crypto/kasumi folder and gathers all kasumi PMD implementation specific details into a single file, pmd_kasumi.c in the crypto/ipsec_mb folder.
--- doc/guides/cryptodevs/kasumi.rst | 3 +- drivers/crypto/ipsec_mb/meson.build | 3 +- drivers/crypto/ipsec_mb/pmd_kasumi.c | 557 +++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 + drivers/crypto/kasumi/kasumi_pmd_private.h | 81 --- drivers/crypto/kasumi/meson.build | 24 - drivers/crypto/kasumi/rte_kasumi_pmd.c | 642 ------------------ drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 316 --------- drivers/crypto/kasumi/version.map | 3 - drivers/crypto/meson.build | 1 - 10 files changed, 568 insertions(+), 1069 deletions(-) create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi.c delete mode 100644 drivers/crypto/kasumi/kasumi_pmd_private.h delete mode 100644 drivers/crypto/kasumi/meson.build delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd.c delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c delete mode 100644 drivers/crypto/kasumi/version.map
doc/guides/cryptodevs/kasumi.rst +2 -1
@@ -78,7 +78,8 @@ and the external crypto libraries supported by them: DPDK version Crypto library version ============= ================================ 16.11 - 19.11 LibSSO KASUMI - 20.02+ Multi-buffer library 0.53 - 1.0* + 20.02 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -24,6 +24,7 @@ endif sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', 'pmd_aesni_mb.c', - 'pmd_aesni_gcm.c' + 'pmd_aesni_gcm.c', + 'pmd_kasumi.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_kasumi.c new file +557 -0
557 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -37,6 +37,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm/**< IPSEC Multi buffer PMD aesni_gcm device name */ +#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi +/**< IPSEC Multi buffer PMD kasumi device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -47,6 +50,7 @@ extern int ipsec_mb_logtype_driver;enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 ,IPSEC_MB_PMD_TYPE_AESNI_GCM , +IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_N_PMD_TYPES };
@@ -67,6 +71,7 @@ enum ipsec_mb_operation {extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm; +extern uint8_t pmd_driver_id_kasumi;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -77,6 +82,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_aesni_mb;case IPSEC_MB_PMD_TYPE_AESNI_GCM :return pmd_driver_id_aesni_gcm; +case IPSEC_MB_PMD_TYPE_KASUMI : +return pmd_driver_id_kasumi;default :break ; }
drivers/crypto/kasumi/kasumi_pmd_private.h deleted +0 -81
81 lines not on this page · raw message
drivers/crypto/kasumi/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_kasumi_pmd.c', 'rte_kasumi_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/kasumi/rte_kasumi_pmd.c deleted +0 -642
642 lines not on this page · raw message
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c deleted +0 -316
316 lines not on this page · raw message
drivers/crypto/kasumi/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/meson.build +0 -1
@@ -14,7 +14,6 @@ drivers = [ 'cnxk', 'dpaa_sec', 'dpaa2_sec', - 'kasumi', 'mlx5', 'mvsam', 'nitrox',
Signature · 1 line
2.25.1
PATCH 5/8 drivers/crypto: move snow3g PMD to IPsec-mb framework
In reply to Ciara PowerFrom: pbronowx <[email protected]>
This patch removes the crypto/snow3g folder and gathers all snow3g PMD implementation specific details into a single file, pmd_snow3g.c in the crypto/ipsec_mb folder.
---
doc/guides/cryptodevs/snow3g.rst | 3 +-
drivers/crypto/ipsec_mb/meson.build | 3 +-
.../pmd_snow3g.c} | 465 ++++++++----------
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 +
drivers/crypto/meson.build | 1 -
drivers/crypto/snow3g/meson.build | 24 -
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 323 ------------
drivers/crypto/snow3g/snow3g_pmd_private.h | 84 ----
drivers/crypto/snow3g/version.map | 3 -
9 files changed, 211 insertions(+), 702 deletions(-)
rename drivers/crypto/{snow3g/rte_snow3g_pmd.c => ipsec_mb/pmd_snow3g.c} (57%)
delete mode 100644 drivers/crypto/snow3g/meson.build
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
delete mode 100644 drivers/crypto/snow3g/snow3g_pmd_private.h
delete mode 100644 drivers/crypto/snow3g/version.mapdoc/guides/cryptodevs/snow3g.rst +2 -1
@@ -77,7 +77,8 @@ and the external crypto libraries supported by them: DPDK version Crypto library version ============= ================================ 16.04 - 19.11 LibSSO SNOW3G - 20.02+ Multi-buffer library 0.53 - 1.0* + 20.02 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -25,6 +25,7 @@ sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', - 'pmd_kasumi.c' + 'pmd_kasumi.c', + 'pmd_snow3g.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_snow3g.c renamed from drivers/crypto/snow3g/rte_snow3g_pmd.c +200 -265
693 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -40,6 +40,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi/**< IPSEC Multi buffer PMD kasumi device name */ +#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g +/**< IPSEC Multi buffer PMD snow3g device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -51,6 +54,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 ,IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_PMD_TYPE_KASUMI , +IPSEC_MB_PMD_TYPE_SNOW3G , IPSEC_MB_N_PMD_TYPES };
@@ -72,6 +76,7 @@ enum ipsec_mb_operation {extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi; +extern uint8_t pmd_driver_id_snow3g;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -84,6 +89,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_aesni_gcm;case IPSEC_MB_PMD_TYPE_KASUMI :return pmd_driver_id_kasumi; +case IPSEC_MB_PMD_TYPE_SNOW3G : +return pmd_driver_id_snow3g;default :break ; }
drivers/crypto/meson.build +0 -1
@@ -22,7 +22,6 @@ drivers = [ 'octeontx2', 'openssl', 'scheduler', - 'snow3g', 'virtio', 'zuc', ]
drivers/crypto/snow3g/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2019-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_snow3g_pmd.c', 'rte_snow3g_pmd_ops.c') -deps += ['bus_vdev', 'cryptodev']
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c deleted +0 -323
323 lines not on this page · raw message
drivers/crypto/snow3g/snow3g_pmd_private.h deleted +0 -84
84 lines not on this page · raw message
drivers/crypto/snow3g/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
Signature · 1 line
2.25.1
PATCH 6/8 crypto/ipsec_mb: add snow3g digest appended ops support
In reply to Ciara PowerFrom: pbronowx <[email protected]>
This patch enables out-of-place auth-cipher operations where digest should be encrypted along with the rest of raw data. It also adds support for partially encrypted digest when using auth-cipher operations.
--- doc/guides/cryptodevs/features/snow3g.ini | 1 + drivers/crypto/ipsec_mb/pmd_snow3g.c | 148 +++++++++++++++++++--- 2 files changed, 132 insertions(+), 17 deletions(-)
doc/guides/cryptodevs/features/snow3g.ini +1 -0
@@ -8,6 +8,7 @@ Symmetric crypto = Y Sym operation chaining = Y Symmetric sessionless = Y Non-Byte aligned data = Y +Digest encrypted = Y OOP LB In LB Out = Y ;
drivers/crypto/ipsec_mb/pmd_snow3g.c +131 -17
219 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 7/8 drivers/crypto: move zuc PMD to IPsec-mb framework
In reply to Ciara PowerFrom: pbronowx <[email protected]>
This patch removes the crypto/zuc folder and gathers all zuc PMD implementation specific details into a single file, pmd_zuc.c in the crypto/ipsec_mb folder.
---
doc/guides/cryptodevs/zuc.rst | 3 +-
drivers/crypto/ipsec_mb/meson.build | 3 +-
.../{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} | 462 +++++++-----------
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 +
drivers/crypto/meson.build | 1 -
drivers/crypto/zuc/meson.build | 24 -
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 322 ------------
drivers/crypto/zuc/version.map | 3 -
drivers/crypto/zuc/zuc_pmd_private.h | 83 ----
9 files changed, 200 insertions(+), 708 deletions(-)
rename drivers/crypto/{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} (50%)
delete mode 100644 drivers/crypto/zuc/meson.build
delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd_ops.c
delete mode 100644 drivers/crypto/zuc/version.map
delete mode 100644 drivers/crypto/zuc/zuc_pmd_private.hdoc/guides/cryptodevs/zuc.rst +2 -1
@@ -77,7 +77,8 @@ and the external crypto libraries supported by them: DPDK version Crypto library version ============= ================================ 16.11 - 19.11 LibSSO ZUC - 20.02+ Multi-buffer library 0.53 - 1.0* + 20.02 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -26,6 +26,7 @@ sources = files('rte_ipsec_mb_pmd.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', 'pmd_kasumi.c', - 'pmd_snow3g.c' + 'pmd_snow3g.c', + 'pmd_zuc.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_zuc.c renamed from drivers/crypto/zuc/rte_zuc_pmd.c +189 -273
632 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -43,6 +43,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g/**< IPSEC Multi buffer PMD snow3g device name */ +#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc +/**< IPSEC Multi buffer PMD zuc device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -55,6 +58,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_PMD_TYPE_SNOW3G , +IPSEC_MB_PMD_TYPE_ZUC , IPSEC_MB_N_PMD_TYPES };
@@ -77,6 +81,7 @@ extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi;extern uint8_t pmd_driver_id_snow3g; +extern uint8_t pmd_driver_id_zuc;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -91,6 +96,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_kasumi;case IPSEC_MB_PMD_TYPE_SNOW3G :return pmd_driver_id_snow3g; +case IPSEC_MB_PMD_TYPE_ZUC : +return pmd_driver_id_zuc;default :break ; }
drivers/crypto/meson.build +0 -1
@@ -23,7 +23,6 @@ drivers = [ 'openssl', 'scheduler', 'virtio', - 'zuc', ] std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
drivers/crypto/zuc/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_zuc_pmd.c', 'rte_zuc_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/zuc/rte_zuc_pmd_ops.c deleted +0 -322
322 lines not on this page · raw message
drivers/crypto/zuc/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/zuc/zuc_pmd_private.h deleted +0 -83
83 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 8/8 crypto/ipsec_mb: add chacha20-poly1305 PMD to framework
In reply to Ciara PowerFrom: Kai Ji <[email protected]>
Add in new chacha20_poly1305 support in ipsec_mb. Add in new chacha20_poly1305 test vector for SGL test.
--- app/test/test_cryptodev.c | 22 + app/test/test_cryptodev.h | 1 + app/test/test_cryptodev_aead_test_vectors.h | 114 ++++ drivers/crypto/ipsec_mb/meson.build | 1 + drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 529 ++++++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 + 6 files changed, 674 insertions(+) create mode 100644 drivers/crypto/ipsec_mb/pmd_chacha_poly.c
app/test/test_cryptodev.c +22 -0
@@ -13412,6 +13412,13 @@ test_chacha20_poly1305_decrypt_test_case_rfc8439(void)return test_authenticated_decryption (&chacha20_poly1305_case_rfc8439); } +static int +test_chacha20_poly1305_encrypt_SGL_out_of_place (void ) +{ +return test_authenticated_encryption_SGL ( + &chacha20_poly1305_case_2,OUT_OF_PLACE ,32 ,265 ); +} +#ifdef RTE_CRYPTO_SCHEDULER /* global AESNI worker IDs for the scheduler test */
@@ -14019,6 +14026,8 @@ static struct unit_test_suite cryptodev_chacha20_poly1305_testsuite = { test_chacha20_poly1305_encrypt_test_case_rfc8439),TEST_CASE_ST (ut_setup, ut_teardown, test_chacha20_poly1305_decrypt_test_case_rfc8439), +TEST_CASE_ST (ut_setup, ut_teardown, + test_chacha20_poly1305_encrypt_SGL_out_of_place), TEST_CASES_END() } };
@@ -14581,6 +14590,17 @@ test_cryptodev_cpu_aesni_mb(void)return rc; } +static int +test_cryptodev_chacha_poly_mb (void ) +{ +int32_t rc; +enum rte_security_session_action_type at = gbl_action_type; + rc =run_cryptodev_testsuite ( +RTE_STR (CRYPTODEV_NAME_CHACHA20_POLY1305_PMD )); + gbl_action_type = at; +return rc; +} +static int test_cryptodev_openssl (void ) {
@@ -14840,6 +14860,8 @@ REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat);REGISTER_TEST_COMMAND (cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);REGISTER_TEST_COMMAND (cryptodev_cpu_aesni_mb_autotest, test_cryptodev_cpu_aesni_mb); +REGISTER_TEST_COMMAND (cryptodev_chacha_poly_mb_autotest, + test_cryptodev_chacha_poly_mb);REGISTER_TEST_COMMAND (cryptodev_openssl_autotest, test_cryptodev_openssl);REGISTER_TEST_COMMAND (cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm); REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_gcm_autotest,
app/test/test_cryptodev.h +1 -0
@@ -59,6 +59,7 @@#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc +#define CRYPTODEV_NAME_CHACHA20_POLY1305_PMD crypto_chacha20_poly1305#define CRYPTODEV_NAME_ARMV8_PMD crypto_armv8#define CRYPTODEV_NAME_DPAA_SEC_PMD crypto_dpaa_sec#define CRYPTODEV_NAME_DPAA2_SEC_PMD crypto_dpaa2_sec
app/test/test_cryptodev_aead_test_vectors.h +114 -0
118 lines not on this page · raw message
drivers/crypto/ipsec_mb/meson.build +1 -0
@@ -25,6 +25,7 @@ sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', + 'pmd_chacha_poly.c', 'pmd_kasumi.c', 'pmd_snow3g.c', 'pmd_zuc.c'
drivers/crypto/ipsec_mb/pmd_chacha_poly.c new file +529 -0
529 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -46,6 +46,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc/**< IPSEC Multi buffer PMD zuc device name */ +#define CRYPTODEV_NAME_CHACHA20_POLY1305_PMD crypto_chacha20_poly1305 +/**< IPSEC Multi buffer PMD chacha20_poly1305 device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -59,6 +62,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_PMD_TYPE_SNOW3G ,IPSEC_MB_PMD_TYPE_ZUC , +IPSEC_MB_PMD_TYPE_CHACHA20_POLY1305 , IPSEC_MB_N_PMD_TYPES };
@@ -82,6 +86,7 @@ extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi;extern uint8_t pmd_driver_id_snow3g;extern uint8_t pmd_driver_id_zuc; +extern uint8_t pmd_driver_id_chacha20_poly1305;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -98,6 +103,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_snow3g;case IPSEC_MB_PMD_TYPE_ZUC :return pmd_driver_id_zuc; +case IPSEC_MB_PMD_TYPE_CHACHA20_POLY1305 : +return pmd_driver_id_chacha20_poly1305;default :break ; }
Signature · 1 line
2.25.1
v2 cover drivers/crypto: introduce ipsec_mb framework
In reply to pbronowxThis set of patches introduces a new framework, making all common code of SW crypto PMD implementations built on top of intel-ipsec-mb library sharable. This helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementation specific details into single files located in the crypto/ipsec_mb folder.
A chacha20-poly1305 SW PMD is added based on this framework. The minimum intel-ipsec-mb version required is bumped to 1.0.
v2:
- Added qp NULL check in get stats function.
- Updated maintainers file.
- Replaced use of strlcpy with rte_strlcpy.
- Fixed enum for GCM key length.
- Updated release notes.
- Added Chacha20_poly1305 PMD documentation.
Ciara Power (1):
doc/rel_notes: added note for SW Crypto PMD change
Fan Zhang (1):
drivers/crypto: introduce IPsec-mb framework
Kai Ji (1):
crypto/ipsec_mb: add chacha20-poly1305 PMD to framework
Piotr Bronowski (6):
drivers/crypto: move aesni-mb PMD to IPsec-mb framework drivers/crypto: move aesni-gcm PMD to IPsec-mb framework drivers/crypto: move kasumi PMD to IPsec-mb framework drivers/crypto: move snow3g PMD to IPsec-mb framework crypto/ipsec_mb: add snow3g digest appended ops support drivers/crypto: move zuc PMD to IPsec-mb framework
MAINTAINERS | 39 +-
app/test/test_cryptodev.c | 23 +
app/test/test_cryptodev.h | 1 +
app/test/test_cryptodev_aead_test_vectors.h | 114 ++
doc/guides/cryptodevs/aesni_gcm.rst | 4 +-
doc/guides/cryptodevs/aesni_mb.rst | 4 +-
doc/guides/cryptodevs/chacha20_poly1305.rst | 99 +
.../cryptodevs/features/chacha20_poly1305.ini | 35 +
doc/guides/cryptodevs/features/snow3g.ini | 1 +
doc/guides/cryptodevs/index.rst | 1 +
doc/guides/cryptodevs/kasumi.rst | 3 +-
doc/guides/cryptodevs/snow3g.rst | 3 +-
doc/guides/cryptodevs/zuc.rst | 3 +-
doc/guides/rel_notes/release_21_11.rst | 25 +
drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 104 -
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 984 ---------
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 333 ----
.../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 123 --
drivers/crypto/aesni_gcm/meson.build | 24 -
.../crypto/aesni_mb/aesni_mb_pmd_private.h | 337 ----
drivers/crypto/aesni_mb/meson.build | 25 -
.../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 1126 -----------
drivers/crypto/aesni_mb/version.map | 3 -
drivers/crypto/ipsec_mb/meson.build | 33 +
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 955 +++++++++
.../pmd_aesni_mb.c} | 1767 ++++++++++++-----
drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 528 +++++
drivers/crypto/ipsec_mb/pmd_kasumi.c | 556 ++++++
drivers/crypto/ipsec_mb/pmd_snow3g.c | 705 +++++++
.../{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} | 462 ++---
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c | 172 ++
.../crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c | 292 +++
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 470 +++++
.../{aesni_gcm => ipsec_mb}/version.map | 2 +-
drivers/crypto/kasumi/kasumi_pmd_private.h | 81 -
drivers/crypto/kasumi/meson.build | 24 -
drivers/crypto/kasumi/rte_kasumi_pmd.c | 642 ------
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 316 ---
drivers/crypto/kasumi/version.map | 3 -
drivers/crypto/meson.build | 6 +-
drivers/crypto/snow3g/meson.build | 24 -
drivers/crypto/snow3g/rte_snow3g_pmd.c | 656 ------
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 323 ---
drivers/crypto/snow3g/snow3g_pmd_private.h | 84 -
drivers/crypto/snow3g/version.map | 3 -
drivers/crypto/zuc/meson.build | 24 -
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 322 ---
drivers/crypto/zuc/version.map | 3 -
drivers/crypto/zuc/zuc_pmd_private.h | 83 -
49 files changed, 5490 insertions(+), 6460 deletions(-)
create mode 100644 doc/guides/cryptodevs/chacha20_poly1305.rst
create mode 100644 doc/guides/cryptodevs/features/chacha20_poly1305.ini
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
delete mode 100644 drivers/crypto/aesni_gcm/meson.build
delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
delete mode 100644 drivers/crypto/aesni_mb/meson.build
delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
delete mode 100644 drivers/crypto/aesni_mb/version.map
create mode 100644 drivers/crypto/ipsec_mb/meson.build
create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd.c => ipsec_mb/pmd_aesni_mb.c} (60%)
create mode 100644 drivers/crypto/ipsec_mb/pmd_chacha_poly.c
create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi.c
create mode 100644 drivers/crypto/ipsec_mb/pmd_snow3g.c
rename drivers/crypto/{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} (50%)
create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c
create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c
create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h
rename drivers/crypto/{aesni_gcm => ipsec_mb}/version.map (58%)
delete mode 100644 drivers/crypto/kasumi/kasumi_pmd_private.h
delete mode 100644 drivers/crypto/kasumi/meson.build
delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd.c
delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
delete mode 100644 drivers/crypto/kasumi/version.map
delete mode 100644 drivers/crypto/snow3g/meson.build
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd.c
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
delete mode 100644 drivers/crypto/snow3g/snow3g_pmd_private.h
delete mode 100644 drivers/crypto/snow3g/version.map
delete mode 100644 drivers/crypto/zuc/meson.build
delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd_ops.c
delete mode 100644 drivers/crypto/zuc/version.map
delete mode 100644 drivers/crypto/zuc/zuc_pmd_private.hSignature · 1 line
2.25.1
PATCH v2 1/9 drivers/crypto: introduce IPsec-mb framework
From: Fan Zhang <[email protected]>
This patch introduces the new framework making
all common code of SW crypto PMDs implementations built on top of intel-ipsec-mb library shareable, also helps to reduce future effort on the code maintenance and feature updates.
---
v2:
- Added qp NULL check in get stats function.
- Added maintainers file entry.
- Replaced strlcpy with rte_strlcpy.
--- MAINTAINERS | 4 + drivers/crypto/ipsec_mb/meson.build | 27 ++ drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c | 169 ++++++++++ .../crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c | 292 ++++++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 292 ++++++++++++++++++ drivers/crypto/ipsec_mb/version.map | 3 + drivers/crypto/meson.build | 1 + 7 files changed, 788 insertions(+) create mode 100644 drivers/crypto/ipsec_mb/meson.build create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c create mode 100644 drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h create mode 100644 drivers/crypto/ipsec_mb/version.map
MAINTAINERS +4 -0
@@ -1065,6 +1065,10 @@ F: drivers/common/qat/ F: doc/guides/cryptodevs/qat.rst F: doc/guides/cryptodevs/features/qat.ini +IPsec MB +M: Fan Zhang <[email protected]> +F: drivers/crypto/ipsec_mb/ + KASUMI M: Pablo de Lara <[email protected]> F: drivers/crypto/kasumi/
drivers/crypto/ipsec_mb/meson.build new file +27 -0
@@ -0,0 +1,27 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2018 - 2021 Intel Corporation + +IMB_required_ver = '1.0.0' +lib = cc.find_library('IPSec_MB', required: false) +if not lib.found() + build = false + reason = 'missing dependency, "libIPSec_MB"' +else + ext_deps += lib + + # version comes with quotes, so we split based on " and take the middle + imb_ver = cc.get_define('IMB_VERSION_STR', + prefix : '#include<intel-ipsec-mb.h>').split('"')[1] + + if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) + reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( + IMB_required_ver, imb_ver) + build = false + endif + +endif + +sources = files('rte_ipsec_mb_pmd.c', + 'rte_ipsec_mb_pmd_ops.c', + ) +deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c new file +169 -0
169 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_ops.c new file +292 -0
292 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h new file +292 -0
292 lines not on this page · raw message
drivers/crypto/ipsec_mb/version.map new file +3 -0
@@ -0,0 +1,3 @@ +DPDK_21 { + local: *; +};
drivers/crypto/meson.build +1 -0
@@ -6,6 +6,7 @@ if is_windows endif drivers = [ + 'ipsec_mb', 'aesni_gcm', 'aesni_mb', 'armv8',
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v2 1/9] drivers/crypto: introduce IPsec-mb framework
23/09/2021 17:28, Ciara Power:
Quoted 6 lines
From: Fan Zhang <[email protected]>
This patch introduces the new framework making
all common code of SW crypto PMDs implementations built on top of intel-ipsec-mb library shareable, also helps to reduce future effort on the code maintenance and feature updates.
Which PMD is it supposed to replace?
I guess it runs only on x86?
Please be more specific in the description above, thanks.
Re: [dpdk-dev] [PATCH v2 1/9] drivers/crypto: introduce IPsec-mb framework
Hi Thomas,
Quoted 13 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Thursday 23 September 2021 16:46
To: Power, Ciara <[email protected]>; Zhang, Roy Fan <[email protected]>
Cc: [email protected]; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; Ray Kinsella <[email protected]>
Subject: Re: [PATCH v2 1/9]drivers/crypto: introduce IPsec-mb framework23/09/2021 17:28, Ciara Power:
Quoted 2 lines
From: Fan Zhang <[email protected]>
Quoted 9 lines
Quoted 4 lines
This patch introduces the new framework making all common code of SW crypto PMDs implementations built on top of intel-ipsec-mb library shareable, also helps to reduce future effort on the code maintenance and feature updates.
Which PMD is it supposed to replace?
I guess it runs only on x86?
Please be more specific in the description above, thanks.
The 5 crypto PMDs that are combined into this IPsec-mb PMD in subsequent patches are:
- AESNI_MB
- AESNI_GCM
- KASUMI
- SNOW3G
- ZUC
There is no change from the user point of view for these PMDs, they still run on x86 as before and use the same EAL arguments. I can add more detail in the v3 of this patch.
Thanks,
Ciara
PATCH v2 2/9 drivers/crypto: move aesni-mb PMD to IPsec-mb framework
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch removes the crypto/aesni_mb folder and gathers all aesni-mb PMD implementation specific details into a single file, pmd_aesni_mb.c in crypto/ipsec_mb.
---
v2: Updated maintainers file.
---
MAINTAINERS | 10 +-
doc/guides/cryptodevs/aesni_mb.rst | 4 +-
.../crypto/aesni_mb/aesni_mb_pmd_private.h | 337 ----
drivers/crypto/aesni_mb/meson.build | 25 -
.../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c | 1126 -----------
drivers/crypto/aesni_mb/version.map | 3 -
drivers/crypto/ipsec_mb/meson.build | 1 +
.../pmd_aesni_mb.c} | 1767 ++++++++++++-----
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c | 7 +-
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 145 +-
drivers/crypto/meson.build | 1 -
11 files changed, 1422 insertions(+), 2004 deletions(-)
delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
delete mode 100644 drivers/crypto/aesni_mb/meson.build
delete mode 100644 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
delete mode 100644 drivers/crypto/aesni_mb/version.map
rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd.c => ipsec_mb/pmd_aesni_mb.c} (60%)MAINTAINERS +3 -7
@@ -1049,13 +1049,6 @@ F: drivers/crypto/aesni_gcm/ F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/features/aesni_gcm.ini -Intel AES-NI Multi-Buffer -M: Declan Doherty <[email protected]> -M: Pablo de Lara <[email protected]> -F: drivers/crypto/aesni_mb/ -F: doc/guides/cryptodevs/aesni_mb.rst -F: doc/guides/cryptodevs/features/aesni_mb.ini - Intel QuickAssist M: John Griffin <[email protected]> M: Fiona Trahe <[email protected]>
@@ -1067,7 +1060,10 @@ F: doc/guides/cryptodevs/features/qat.ini IPsec MB M: Fan Zhang <[email protected]> +M: Pablo de Lara <[email protected]> F: drivers/crypto/ipsec_mb/ +F: doc/guides/cryptodevs/aesni_mb.rst +F: doc/guides/cryptodevs/features/aesni_mb.ini KASUMI M: Pablo de Lara <[email protected]>
doc/guides/cryptodevs/aesni_mb.rst +3 -1
@@ -130,7 +130,9 @@ and the Multi-Buffer library version supported by them: 18.02 0.48 18.05 - 19.02 0.49 - 0.52 19.05 - 19.08 0.52 - 19.11+ 0.52 - 1.0* + 19.11 - 20.08 0.52 - 0.55 + 20.11 - 21.08 0.53 - 1.0* + 21.11+ 1.0* ============== ============================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
drivers/crypto/aesni_mb/aesni_mb_pmd_private.h deleted +0 -337
337 lines not on this page · raw message
drivers/crypto/aesni_mb/meson.build deleted +0 -25
@@ -1,25 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018 Intel Corporation - -IMB_required_ver = '0.52.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - ext_deps += lib - - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -sources = files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c') -deps += ['bus_vdev', 'net', 'security']
drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c deleted +0 -1126
1,126 lines not on this page · raw message
drivers/crypto/aesni_mb/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/ipsec_mb/meson.build +1 -0
@@ -23,5 +23,6 @@ endif sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', + 'pmd_aesni_mb.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_aesni_mb.c renamed from drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +1266 -501
1,470 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd.c +5 -2
Lines of this file are not shown. View the raw message.
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +144 -1
145 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
PATCH v2 3/9 drivers/crypto: move aesni-gcm PMD to IPsec-mb framework
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch removes the crypto/aesni_gcm folder and gathers all aesni-gcm PMD implementation specific details into a single file, pmd_aesni_gcm.c in the crypto/ipsec_mb folder.
A redundant check for iv length is removed.
---
v2:
- Fixed enum for GCM key length.
- Updated maintainers file.
--- MAINTAINERS | 9 +- doc/guides/cryptodevs/aesni_gcm.rst | 4 +- drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 104 -- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 984 ------------------ drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 333 ------ .../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 123 --- drivers/crypto/aesni_gcm/meson.build | 24 - drivers/crypto/aesni_gcm/version.map | 3 - drivers/crypto/ipsec_mb/meson.build | 3 +- drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 955 +++++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 + drivers/crypto/meson.build | 1 - 12 files changed, 969 insertions(+), 1581 deletions(-) delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h delete mode 100644 drivers/crypto/aesni_gcm/meson.build delete mode 100644 drivers/crypto/aesni_gcm/version.map create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
MAINTAINERS +2 -7
@@ -1042,13 +1042,6 @@ M: Fan Zhang <[email protected]> F: drivers/crypto/scheduler/ F: doc/guides/cryptodevs/scheduler.rst -Intel AES-NI GCM -M: Declan Doherty <[email protected]> -M: Pablo de Lara <[email protected]> -F: drivers/crypto/aesni_gcm/ -F: doc/guides/cryptodevs/aesni_gcm.rst -F: doc/guides/cryptodevs/features/aesni_gcm.ini - Intel QuickAssist M: John Griffin <[email protected]> M: Fiona Trahe <[email protected]>
@@ -1062,7 +1055,9 @@ IPsec MB M: Fan Zhang <[email protected]> M: Pablo de Lara <[email protected]> F: drivers/crypto/ipsec_mb/ +F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/aesni_mb.rst +F: doc/guides/cryptodevs/features/aesni_gcm.ini F: doc/guides/cryptodevs/features/aesni_mb.ini KASUMI
doc/guides/cryptodevs/aesni_gcm.rst +3 -1
@@ -83,7 +83,9 @@ and the external crypto libraries supported by them: 17.02 - 17.05 ISA-L Crypto v2.18 17.08 - 18.02 Multi-buffer library 0.46 - 0.48 18.05 - 19.02 Multi-buffer library 0.49 - 0.52 - 19.05+ Multi-buffer library 0.52 - 1.0* + 19.05 - 20.08 Multi-buffer library 0.52 - 0.55 + 20.11 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
drivers/crypto/aesni_gcm/aesni_gcm_ops.h deleted +0 -104
104 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c deleted +0 -984
984 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c deleted +0 -333
333 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h deleted +0 -123
123 lines not on this page · raw message
drivers/crypto/aesni_gcm/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018 Intel Corporation - -IMB_required_ver = '0.52.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - ext_deps += lib - - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif -endif - -sources = files('aesni_gcm_pmd.c', 'aesni_gcm_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/aesni_gcm/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -23,6 +23,7 @@ endif sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', - 'pmd_aesni_mb.c' + 'pmd_aesni_mb.c', + 'pmd_aesni_gcm.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c new file +955 -0
955 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -34,6 +34,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_AESNI_MB_PMD crypto_aesni_mb/**< IPSEC Multi buffer aesni_mb PMD device name */ +#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm +/**< IPSEC Multi buffer PMD aesni_gcm device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -43,6 +46,7 @@ extern int ipsec_mb_logtype_driver;/** All supported device types */ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 , +IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_N_PMD_TYPES };
@@ -62,6 +66,7 @@ enum ipsec_mb_operation { };extern uint8_t pmd_driver_id_aesni_mb; +extern uint8_t pmd_driver_id_aesni_gcm;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -70,6 +75,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)switch (pmd_type) {case IPSEC_MB_PMD_TYPE_AESNI_MB :return pmd_driver_id_aesni_mb; +case IPSEC_MB_PMD_TYPE_AESNI_GCM : +return pmd_driver_id_aesni_gcm;default :break ; }
drivers/crypto/meson.build +0 -1
@@ -7,7 +7,6 @@ endif drivers = [ 'ipsec_mb', - 'aesni_gcm', 'armv8', 'bcmfs', 'caam_jr',
Signature · 1 line
2.25.1
PATCH v2 4/9 drivers/crypto: move kasumi PMD to IPsec-mb framework
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch removes the crypto/kasumi folder and gathers all kasumi PMD implementation specific details into a single file, pmd_kasumi.c in the crypto/ipsec_mb folder.
---
v2: Updated maintainers file.
--- MAINTAINERS | 6 +- doc/guides/cryptodevs/kasumi.rst | 3 +- drivers/crypto/ipsec_mb/meson.build | 3 +- drivers/crypto/ipsec_mb/pmd_kasumi.c | 556 +++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 + drivers/crypto/kasumi/kasumi_pmd_private.h | 81 --- drivers/crypto/kasumi/meson.build | 24 - drivers/crypto/kasumi/rte_kasumi_pmd.c | 642 ------------------ drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 316 --------- drivers/crypto/kasumi/version.map | 3 - drivers/crypto/meson.build | 1 - 11 files changed, 568 insertions(+), 1074 deletions(-) create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi.c delete mode 100644 drivers/crypto/kasumi/kasumi_pmd_private.h delete mode 100644 drivers/crypto/kasumi/meson.build delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd.c delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c delete mode 100644 drivers/crypto/kasumi/version.map
MAINTAINERS +1 -5
@@ -1057,13 +1057,9 @@ M: Pablo de Lara <[email protected]> F: drivers/crypto/ipsec_mb/ F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/aesni_mb.rst +F: doc/guides/cryptodevs/kasumi.rst F: doc/guides/cryptodevs/features/aesni_gcm.ini F: doc/guides/cryptodevs/features/aesni_mb.ini - -KASUMI -M: Pablo de Lara <[email protected]> -F: drivers/crypto/kasumi/ -F: doc/guides/cryptodevs/kasumi.rst F: doc/guides/cryptodevs/features/kasumi.ini Marvell cnxk crypto
doc/guides/cryptodevs/kasumi.rst +2 -1
@@ -78,7 +78,8 @@ and the external crypto libraries supported by them: DPDK version Crypto library version ============= ================================ 16.11 - 19.11 LibSSO KASUMI - 20.02+ Multi-buffer library 0.53 - 1.0* + 20.02 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -24,6 +24,7 @@ endif sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', 'pmd_aesni_mb.c', - 'pmd_aesni_gcm.c' + 'pmd_aesni_gcm.c', + 'pmd_kasumi.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_kasumi.c new file +556 -0
556 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -37,6 +37,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm/**< IPSEC Multi buffer PMD aesni_gcm device name */ +#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi +/**< IPSEC Multi buffer PMD kasumi device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -47,6 +50,7 @@ extern int ipsec_mb_logtype_driver;enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 ,IPSEC_MB_PMD_TYPE_AESNI_GCM , +IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_N_PMD_TYPES };
@@ -67,6 +71,7 @@ enum ipsec_mb_operation {extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm; +extern uint8_t pmd_driver_id_kasumi;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -77,6 +82,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_aesni_mb;case IPSEC_MB_PMD_TYPE_AESNI_GCM :return pmd_driver_id_aesni_gcm; +case IPSEC_MB_PMD_TYPE_KASUMI : +return pmd_driver_id_kasumi;default :break ; }
drivers/crypto/kasumi/kasumi_pmd_private.h deleted +0 -81
81 lines not on this page · raw message
drivers/crypto/kasumi/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_kasumi_pmd.c', 'rte_kasumi_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/kasumi/rte_kasumi_pmd.c deleted +0 -642
642 lines not on this page · raw message
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c deleted +0 -316
316 lines not on this page · raw message
drivers/crypto/kasumi/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/meson.build +0 -1
@@ -14,7 +14,6 @@ drivers = [ 'cnxk', 'dpaa_sec', 'dpaa2_sec', - 'kasumi', 'mlx5', 'mvsam', 'nitrox',
Signature · 1 line
2.25.1
PATCH v2 5/9 drivers/crypto: move snow3g PMD to IPsec-mb framework
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch removes the crypto/snow3g folder and gathers all snow3g PMD implementation specific details into a single file, pmd_snow3g.c in the crypto/ipsec_mb folder.
---
v2: Updated maintainers file.
---
MAINTAINERS | 8 +-
doc/guides/cryptodevs/snow3g.rst | 3 +-
drivers/crypto/ipsec_mb/meson.build | 3 +-
.../pmd_snow3g.c} | 465 ++++++++----------
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 +
drivers/crypto/meson.build | 1 -
drivers/crypto/snow3g/meson.build | 24 -
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 323 ------------
drivers/crypto/snow3g/snow3g_pmd_private.h | 84 ----
drivers/crypto/snow3g/version.map | 3 -
10 files changed, 213 insertions(+), 708 deletions(-)
rename drivers/crypto/{snow3g/rte_snow3g_pmd.c => ipsec_mb/pmd_snow3g.c} (57%)
delete mode 100644 drivers/crypto/snow3g/meson.build
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
delete mode 100644 drivers/crypto/snow3g/snow3g_pmd_private.h
delete mode 100644 drivers/crypto/snow3g/version.mapMAINTAINERS +2 -6
@@ -1058,9 +1058,11 @@ F: drivers/crypto/ipsec_mb/ F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/aesni_mb.rst F: doc/guides/cryptodevs/kasumi.rst +F: doc/guides/cryptodevs/snow3g.rst F: doc/guides/cryptodevs/features/aesni_gcm.ini F: doc/guides/cryptodevs/features/aesni_mb.ini F: doc/guides/cryptodevs/features/kasumi.ini +F: doc/guides/cryptodevs/features/snow3g.ini Marvell cnxk crypto M: Ankur Dwivedi <[email protected]>
@@ -1131,12 +1133,6 @@ F: drivers/crypto/openssl/ F: doc/guides/cryptodevs/openssl.rst F: doc/guides/cryptodevs/features/openssl.ini -SNOW 3G -M: Pablo de Lara <[email protected]> -F: drivers/crypto/snow3g/ -F: doc/guides/cryptodevs/snow3g.rst -F: doc/guides/cryptodevs/features/snow3g.ini - Virtio M: Jay Zhou <[email protected]> F: drivers/crypto/virtio/
doc/guides/cryptodevs/snow3g.rst +2 -1
@@ -77,7 +77,8 @@ and the external crypto libraries supported by them: DPDK version Crypto library version ============= ================================ 16.04 - 19.11 LibSSO SNOW3G - 20.02+ Multi-buffer library 0.53 - 1.0* + 20.02 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -25,6 +25,7 @@ sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', - 'pmd_kasumi.c' + 'pmd_kasumi.c', + 'pmd_snow3g.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_snow3g.c renamed from drivers/crypto/snow3g/rte_snow3g_pmd.c +200 -265
693 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -40,6 +40,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi/**< IPSEC Multi buffer PMD kasumi device name */ +#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g +/**< IPSEC Multi buffer PMD snow3g device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -51,6 +54,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 ,IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_PMD_TYPE_KASUMI , +IPSEC_MB_PMD_TYPE_SNOW3G , IPSEC_MB_N_PMD_TYPES };
@@ -72,6 +76,7 @@ enum ipsec_mb_operation {extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi; +extern uint8_t pmd_driver_id_snow3g;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -84,6 +89,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_aesni_gcm;case IPSEC_MB_PMD_TYPE_KASUMI :return pmd_driver_id_kasumi; +case IPSEC_MB_PMD_TYPE_SNOW3G : +return pmd_driver_id_snow3g;default :break ; }
drivers/crypto/meson.build +0 -1
@@ -22,7 +22,6 @@ drivers = [ 'octeontx2', 'openssl', 'scheduler', - 'snow3g', 'virtio', 'zuc', ]
drivers/crypto/snow3g/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2019-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_snow3g_pmd.c', 'rte_snow3g_pmd_ops.c') -deps += ['bus_vdev', 'cryptodev']
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c deleted +0 -323
323 lines not on this page · raw message
drivers/crypto/snow3g/snow3g_pmd_private.h deleted +0 -84
84 lines not on this page · raw message
drivers/crypto/snow3g/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
Signature · 1 line
2.25.1
PATCH v2 6/9 crypto/ipsec_mb: add snow3g digest appended ops support
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch enables out-of-place auth-cipher operations where digest should be encrypted along with the rest of raw data. It also adds support for partially encrypted digest when using auth-cipher operations.
---
v2: Added release note.
--- doc/guides/cryptodevs/features/snow3g.ini | 1 + doc/guides/rel_notes/release_21_11.rst | 7 + drivers/crypto/ipsec_mb/pmd_snow3g.c | 148 +++++++++++++++++++--- 3 files changed, 139 insertions(+), 17 deletions(-)
doc/guides/cryptodevs/features/snow3g.ini +1 -0
@@ -8,6 +8,7 @@ Symmetric crypto = Y Sym operation chaining = Y Symmetric sessionless = Y Non-Byte aligned data = Y +Digest encrypted = Y OOP LB In LB Out = Y ;
doc/guides/rel_notes/release_21_11.rst +7 -0
@@ -62,6 +62,13 @@ New Features * Added bus-level parsing of the devargs syntax. * Kept compatibility with the legacy syntax as parsing fallback. +* **Added digest appended ops support for Snow3G PMD.** + + * Added support for out-of-place auth-cipher operations that encrypt + the digest along with the rest of the raw data. + * Added support for partially encrypted digest when using auth-cipher + operations. + * **Updated Marvell cnxk crypto PMD.** * Added AES-CBC SHA1-HMAC support in lookaside protocol (IPsec) for CN10K.
drivers/crypto/ipsec_mb/pmd_snow3g.c +131 -17
219 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v2 7/9 drivers/crypto: move zuc PMD to IPsec-mb framework
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch removes the crypto/zuc folder and gathers all zuc PMD implementation specific details into a single file, pmd_zuc.c in the crypto/ipsec_mb folder.
---
v2: Updated maintainers file.
---
MAINTAINERS | 8 +-
doc/guides/cryptodevs/zuc.rst | 3 +-
drivers/crypto/ipsec_mb/meson.build | 3 +-
.../{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} | 462 +++++++-----------
.../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 +
drivers/crypto/meson.build | 1 -
drivers/crypto/zuc/meson.build | 24 -
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 322 ------------
drivers/crypto/zuc/version.map | 3 -
drivers/crypto/zuc/zuc_pmd_private.h | 83 ----
10 files changed, 202 insertions(+), 714 deletions(-)
rename drivers/crypto/{zuc/rte_zuc_pmd.c => ipsec_mb/pmd_zuc.c} (50%)
delete mode 100644 drivers/crypto/zuc/meson.build
delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd_ops.c
delete mode 100644 drivers/crypto/zuc/version.map
delete mode 100644 drivers/crypto/zuc/zuc_pmd_private.hMAINTAINERS +2 -6
@@ -1059,10 +1059,12 @@ F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/aesni_mb.rst F: doc/guides/cryptodevs/kasumi.rst F: doc/guides/cryptodevs/snow3g.rst +F: doc/guides/cryptodevs/zuc.rst F: doc/guides/cryptodevs/features/aesni_gcm.ini F: doc/guides/cryptodevs/features/aesni_mb.ini F: doc/guides/cryptodevs/features/kasumi.ini F: doc/guides/cryptodevs/features/snow3g.ini +F: doc/guides/cryptodevs/features/zuc.ini Marvell cnxk crypto M: Ankur Dwivedi <[email protected]>
@@ -1139,12 +1141,6 @@ F: drivers/crypto/virtio/ F: doc/guides/cryptodevs/virtio.rst F: doc/guides/cryptodevs/features/virtio.ini -ZUC -M: Pablo de Lara <[email protected]> -F: drivers/crypto/zuc/ -F: doc/guides/cryptodevs/zuc.rst -F: doc/guides/cryptodevs/features/zuc.ini - Compression Drivers -------------------
doc/guides/cryptodevs/zuc.rst +2 -1
@@ -77,7 +77,8 @@ and the external crypto libraries supported by them: DPDK version Crypto library version ============= ================================ 16.11 - 19.11 LibSSO ZUC - 20.02+ Multi-buffer library 0.53 - 1.0* + 20.02 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -26,6 +26,7 @@ sources = files('rte_ipsec_mb_pmd.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', 'pmd_kasumi.c', - 'pmd_snow3g.c' + 'pmd_snow3g.c', + 'pmd_zuc.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_zuc.c renamed from drivers/crypto/zuc/rte_zuc_pmd.c +189 -273
632 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -43,6 +43,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g/**< IPSEC Multi buffer PMD snow3g device name */ +#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc +/**< IPSEC Multi buffer PMD zuc device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -55,6 +58,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_PMD_TYPE_SNOW3G , +IPSEC_MB_PMD_TYPE_ZUC , IPSEC_MB_N_PMD_TYPES };
@@ -77,6 +81,7 @@ extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi;extern uint8_t pmd_driver_id_snow3g; +extern uint8_t pmd_driver_id_zuc;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -91,6 +96,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_kasumi;case IPSEC_MB_PMD_TYPE_SNOW3G :return pmd_driver_id_snow3g; +case IPSEC_MB_PMD_TYPE_ZUC : +return pmd_driver_id_zuc;default :break ; }
drivers/crypto/meson.build +0 -1
@@ -23,7 +23,6 @@ drivers = [ 'openssl', 'scheduler', 'virtio', - 'zuc', ] std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
drivers/crypto/zuc/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_zuc_pmd.c', 'rte_zuc_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/zuc/rte_zuc_pmd_ops.c deleted +0 -322
322 lines not on this page · raw message
drivers/crypto/zuc/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/zuc/zuc_pmd_private.h deleted +0 -83
83 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v2 8/9 crypto/ipsec_mb: add chacha20-poly1305 PMD to framework
In reply to Ciara PowerFrom: Kai Ji <[email protected]>
Add in new chacha20_poly1305 support in ipsec_mb. Add in new chacha20_poly1305 test vector for SGL test.
---
v2:
- Added unused tag to session configure parameter.
- Added release note.
- Added documentation for PMD.
--- app/test/test_cryptodev.c | 23 + app/test/test_cryptodev.h | 1 + app/test/test_cryptodev_aead_test_vectors.h | 114 ++++ doc/guides/cryptodevs/chacha20_poly1305.rst | 99 ++++ .../cryptodevs/features/chacha20_poly1305.ini | 35 ++ doc/guides/cryptodevs/index.rst | 1 + doc/guides/rel_notes/release_21_11.rst | 5 + drivers/crypto/ipsec_mb/meson.build | 1 + drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 528 ++++++++++++++++++ .../ipsec_mb/rte_ipsec_mb_pmd_private.h | 7 + 10 files changed, 814 insertions(+) create mode 100644 doc/guides/cryptodevs/chacha20_poly1305.rst create mode 100644 doc/guides/cryptodevs/features/chacha20_poly1305.ini create mode 100644 drivers/crypto/ipsec_mb/pmd_chacha_poly.c
app/test/test_cryptodev.c +23 -0
@@ -13455,6 +13455,14 @@ test_chacha20_poly1305_decrypt_test_case_rfc8439(void)return test_authenticated_decryption (&chacha20_poly1305_case_rfc8439); } +static int +test_chacha20_poly1305_encrypt_SGL_out_of_place (void ) +{ +return test_authenticated_encryption_SGL ( + &chacha20_poly1305_case_2,OUT_OF_PLACE ,32 , + chacha20_poly1305_case_2.plaintext.len); +} +#ifdef RTE_CRYPTO_SCHEDULER /* global AESNI worker IDs for the scheduler test */
@@ -14063,6 +14071,8 @@ static struct unit_test_suite cryptodev_chacha20_poly1305_testsuite = { test_chacha20_poly1305_encrypt_test_case_rfc8439),TEST_CASE_ST (ut_setup, ut_teardown, test_chacha20_poly1305_decrypt_test_case_rfc8439), +TEST_CASE_ST (ut_setup, ut_teardown, + test_chacha20_poly1305_encrypt_SGL_out_of_place), TEST_CASES_END() } };
@@ -14629,6 +14639,17 @@ test_cryptodev_cpu_aesni_mb(void)return rc; } +static int +test_cryptodev_chacha_poly_mb (void ) +{ +int32_t rc; +enum rte_security_session_action_type at = gbl_action_type; + rc =run_cryptodev_testsuite ( +RTE_STR (CRYPTODEV_NAME_CHACHA20_POLY1305_PMD )); + gbl_action_type = at; +return rc; +} +static int test_cryptodev_openssl (void ) {
@@ -14888,6 +14909,8 @@ REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat);REGISTER_TEST_COMMAND (cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);REGISTER_TEST_COMMAND (cryptodev_cpu_aesni_mb_autotest, test_cryptodev_cpu_aesni_mb); +REGISTER_TEST_COMMAND (cryptodev_chacha_poly_mb_autotest, + test_cryptodev_chacha_poly_mb);REGISTER_TEST_COMMAND (cryptodev_openssl_autotest, test_cryptodev_openssl);REGISTER_TEST_COMMAND (cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm); REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_gcm_autotest,
app/test/test_cryptodev.h +1 -0
@@ -59,6 +59,7 @@#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc +#define CRYPTODEV_NAME_CHACHA20_POLY1305_PMD crypto_chacha20_poly1305#define CRYPTODEV_NAME_ARMV8_PMD crypto_armv8#define CRYPTODEV_NAME_DPAA_SEC_PMD crypto_dpaa_sec#define CRYPTODEV_NAME_DPAA2_SEC_PMD crypto_dpaa2_sec
app/test/test_cryptodev_aead_test_vectors.h +114 -0
118 lines not on this page · raw message
doc/guides/cryptodevs/chacha20_poly1305.rst new file +99 -0
99 lines not on this page · raw message
doc/guides/cryptodevs/features/chacha20_poly1305.ini new file +35 -0
@@ -0,0 +1,35 @@ +; +; Supported features of the 'chacha20_poly1305' crypto driver. +; +; Refer to default.ini for the full list of available PMD features. +; +[Features] +Symmetric crypto = Y +Sym operation chaining = Y +Symmetric sessionless = Y +Non-Byte aligned data = Y +In Place SGL = Y +OOP SGL In LB Out = Y +OOP LB In LB Out = Y +CPU crypto = Y + +; +; Supported crypto algorithms of the 'chacha20_poly1305' crypto driver. +; +[Cipher] + +; +; Supported authentication algorithms of the 'chacha20_poly1305' crypto driver. +; +[Auth] + +; +; Supported AEAD algorithms of the 'chacha20_poly1305' crypto driver. +; +[AEAD] +CHACHA20-POLY1305 = Y + +; +; Supported Asymmetric algorithms of the 'chacha20_poly1305' crypto driver. +; +[Asymmetric]
doc/guides/cryptodevs/index.rst +1 -0
@@ -16,6 +16,7 @@ Crypto Device Drivers bcmfs caam_jr ccp + chacha20_poly1305 cnxk dpaa2_sec dpaa_sec
doc/guides/rel_notes/release_21_11.rst +5 -0
@@ -69,6 +69,11 @@ New Features * Added support for partially encrypted digest when using auth-cipher operations. +* **Added Chacha20-poly1305 Crypto PMD.** + + * Added PMD to support chacha20-poly1305 algorithms to IPSec_MB PMD framework. + * Test vector added for chacha20-poly1305 SGL test. + * **Updated Marvell cnxk crypto PMD.** * Added AES-CBC SHA1-HMAC support in lookaside protocol (IPsec) for CN10K.
drivers/crypto/ipsec_mb/meson.build +1 -0
@@ -25,6 +25,7 @@ sources = files('rte_ipsec_mb_pmd.c', 'rte_ipsec_mb_pmd_ops.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', + 'pmd_chacha_poly.c', 'pmd_kasumi.c', 'pmd_snow3g.c', 'pmd_zuc.c'
drivers/crypto/ipsec_mb/pmd_chacha_poly.c new file +528 -0
528 lines not on this page · raw message
drivers/crypto/ipsec_mb/rte_ipsec_mb_pmd_private.h +7 -0
@@ -46,6 +46,9 @@ extern RTE_DEFINE_PER_LCORE(MB_MGR *, mb_mgr);#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc/**< IPSEC Multi buffer PMD zuc device name */ +#define CRYPTODEV_NAME_CHACHA20_POLY1305_PMD crypto_chacha20_poly1305 +/**< IPSEC Multi buffer PMD chacha20_poly1305 device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -59,6 +62,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_PMD_TYPE_SNOW3G ,IPSEC_MB_PMD_TYPE_ZUC , +IPSEC_MB_PMD_TYPE_CHACHA20_POLY1305 , IPSEC_MB_N_PMD_TYPES };
@@ -82,6 +86,7 @@ extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi;extern uint8_t pmd_driver_id_snow3g;extern uint8_t pmd_driver_id_zuc; +extern uint8_t pmd_driver_id_chacha20_poly1305;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -98,6 +103,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_snow3g;case IPSEC_MB_PMD_TYPE_ZUC :return pmd_driver_id_zuc; +case IPSEC_MB_PMD_TYPE_CHACHA20_POLY1305 : +return pmd_driver_id_chacha20_poly1305;default :break ; }
Signature · 1 line
2.25.1
PATCH v2 9/9 doc/rel_notes: added note for SW Crypto PMD change
In reply to Ciara PowerThe SW Crypto PMDs were consolidated into one IPSec_MB PMD. This patch adds a release note to highlight this change.
--- doc/guides/rel_notes/release_21_11.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+)
doc/guides/rel_notes/release_21_11.rst +13 -0
@@ -74,6 +74,19 @@ New Features * Added PMD to support chacha20-poly1305 algorithms to IPSec_MB PMD framework. * Test vector added for chacha20-poly1305 SGL test. +* **Consolidated SW Crypto PMDs with IPSec_MB dependency.** + + Intel SW Crypto PMDS that depend on the IPSec_MB library were + consolidated into one IPSec_MB PMD to share common code between + the PMDs. They can be used as before. + This change includes: + + * AESNI_MB PMD. + * AESNI_GCM PMD. + * KASUMI PMD. + * SNOW3G PMD. + * ZUC PMD. + * **Updated Marvell cnxk crypto PMD.** * Added AES-CBC SHA1-HMAC support in lookaside protocol (IPsec) for CN10K.
Signature · 1 line
2.25.1
Re: [dpdk-dev] [EXT] [PATCH v2 0/9] drivers/crypto: introduce ipsec_mb framework
In reply to Ciara PowerQuoted 26 lines
This set of patches introduces a new framework, making all common code of SW crypto PMD implementations built on top of intel-ipsec-mb library sharable. This helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementation specific details into single files located in the
crypto/ipsec_mbfolder.
A chacha20-poly1305 SW PMD is added based on this framework. The minimum intel-ipsec-mb version required is bumped to 1.0.v2:
- Added qp NULL check in get stats function.
- Updated maintainers file.
- Replaced use of strlcpy withrte_strlcpy.
- Fixed enum for GCM key length.
- Updated release notes.
- AddedChacha20_poly1305PMD documentation.Ciara Power (1):
doc/rel_notes: added note for SW Crypto PMD changeFan Zhang (1):
drivers/crypto: introduce IPsec-mb frameworkKai Ji (1):
crypto/ipsec_mb: add chacha20-poly1305 PMD to framework
Quoted 8 lines
Piotr Bronowski (6):
drivers/crypto: move aesni-mb PMD to IPsec-mb frameworkdrivers/crypto: move aesni-gcm PMD to IPsec-mb frameworkdrivers/crypto: move kasumi PMD to IPsec-mb frameworkdrivers/crypto: move snow3g PMD to IPsec-mb frameworkcrypto/ipsec_mb: add snow3g digest appended ops supportdrivers/crypto: move zuc PMD to IPsec-mb framework
Need acks from Intel side to confirm everything is working fine.
v4 cover drivers/crypto: introduce ipsec_mb framework
In reply to pbronowxThis set of patches introduces a new framework, making all common code of SW crypto PMD implementations built on top of intel-ipsec-mb library sharable. This helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementation specific details into single files located in the crypto/ipsec_mb folder.
A CHACHA20_POLY1305 SW PMD is added based on this framework.
Multi-process support for the PMDs is added for intel-ipsec-mb v1.1. The minimum intel-ipsec-mb version required is bumped to 1.0.
ZUC-256 support is added for the aesni_mb PMD, with relevant tests.
v4:
- Renamed general files and functions to remove "_pmd_" and "rte_".
- Fixed copyright years in many files.
- Fixed some documentation errors.
- Split sections of the PMD files into header files.
- Fixed other small comments left on v3.
- Dropped release note patch from v3, added release notes incrementally throughout the set.
- Updated CHACHA20_POLY1305 AAD max size for AESNI_MB.
- Removed unnecessary enqueue count variables and calls to enqueue when processing ops for SNOW3G, ZUC, KASUMI.
- Removed some unnecessary includes for security headers in PMD files.
- Added call to release queue pairs in the remove function.
- Split CHACHA20_POLY1305 patch into two, (1) PMD addition and
(2) test app changes.
- Added 4 new patches for ZUC-256 support and tests, based on a patch previously sent to the mailing list:
https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/
v3:
- Added multiprocess support for v1.1 of intel-ipsec-mb.
- Fixed some formatting and comments.
- Added detail to some commit logs.
- Updated macros to use intel-ipsec-mb v1.0 supported macros.
- Added use of intel-ipsec-mb API to auto initialise IMB_MGR based on CPU vector support.
v2:
- Added qp NULL check in get stats function.
- Updated maintainers file.
- Replaced use of strlcpy with rte_strlcpy.
- Fixed enum for GCM key length.
- Updated release notes.
- Added Chacha20_poly1305 PMD documentation.
Ciara Power (1):
crypto/ipsec_mb: add multiprocess support
Fan Zhang (1):
drivers/crypto: introduce IPsec-mb framework
Kai Ji (2):
crypto/ipsec_mb: add chacha20-poly1305 PMD to framework test/crypto: add test for chacha20_poly1305 PMD
Pablo de Lara (4):
crypto/ipsec_mb: support ZUC-256 for aesni_mb
test/crypto: check cipher parameters
test/crypto: check auth parameters
test/crypto: add ZUC-256 vectors
Piotr Bronowski (6):
drivers/crypto: move aesni-mb PMD to IPsec-mb framework drivers/crypto: move aesni-gcm PMD to IPsec-mb framework drivers/crypto: move kasumi PMD to IPsec-mb framework drivers/crypto: move snow3g PMD to IPsec-mb framework crypto/ipsec_mb: add snow3g digest appended ops support drivers/crypto: move zuc PMD to IPsec-mb framework
MAINTAINERS | 41 +-
app/test/test_cryptodev.c | 170 ++-
app/test/test_cryptodev.h | 1 +
app/test/test_cryptodev_aead_test_vectors.h | 114 ++
app/test/test_cryptodev_zuc_test_vectors.h | 286 ++++
doc/guides/cryptodevs/aesni_gcm.rst | 4 +-
doc/guides/cryptodevs/aesni_mb.rst | 5 +-
doc/guides/cryptodevs/chacha20_poly1305.rst | 99 ++
.../cryptodevs/features/chacha20_poly1305.ini | 35 +
doc/guides/cryptodevs/features/snow3g.ini | 1 +
doc/guides/cryptodevs/index.rst | 1 +
doc/guides/cryptodevs/kasumi.rst | 3 +-
doc/guides/cryptodevs/snow3g.rst | 3 +-
doc/guides/cryptodevs/zuc.rst | 3 +-
doc/guides/rel_notes/release_21_11.rst | 31 +
drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 104 --
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 984 -------------
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 333 -----
.../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 123 --
drivers/crypto/aesni_gcm/meson.build | 24 -
.../crypto/aesni_mb/aesni_mb_pmd_private.h | 337 -----
drivers/crypto/aesni_mb/meson.build | 25 -
drivers/crypto/aesni_mb/version.map | 3 -
drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 370 +++++
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 176 +++
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 455 ++++++
drivers/crypto/ipsec_mb/meson.build | 33 +
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 837 +++++++++++
drivers/crypto/ipsec_mb/pmd_aesni_gcm_priv.h | 169 +++
.../pmd_aesni_mb.c} | 1235 +++++++----------
.../pmd_aesni_mb_priv.h} | 681 ++++-----
drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 408 ++++++
.../crypto/ipsec_mb/pmd_chacha_poly_priv.h | 74 +
drivers/crypto/ipsec_mb/pmd_kasumi.c | 476 +++++++
drivers/crypto/ipsec_mb/pmd_kasumi_priv.h | 81 ++
.../pmd_snow3g.c} | 543 ++++----
drivers/crypto/ipsec_mb/pmd_snow3g_priv.h | 85 ++
drivers/crypto/ipsec_mb/pmd_zuc.c | 403 ++++++
drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 85 ++
.../{aesni_gcm => ipsec_mb}/version.map | 0
drivers/crypto/kasumi/kasumi_pmd_private.h | 81 --
drivers/crypto/kasumi/meson.build | 24 -
drivers/crypto/kasumi/rte_kasumi_pmd.c | 642 ---------
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 316 -----
drivers/crypto/kasumi/version.map | 3 -
drivers/crypto/meson.build | 6 +-
drivers/crypto/snow3g/meson.build | 24 -
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 323 -----
drivers/crypto/snow3g/snow3g_pmd_private.h | 84 --
drivers/crypto/snow3g/version.map | 3 -
drivers/crypto/zuc/meson.build | 24 -
drivers/crypto/zuc/rte_zuc_pmd.c | 583 --------
drivers/crypto/zuc/rte_zuc_pmd_ops.c | 322 -----
drivers/crypto/zuc/version.map | 3 -
drivers/crypto/zuc/zuc_pmd_private.h | 83 --
55 files changed, 5412 insertions(+), 5950 deletions(-)
create mode 100644 doc/guides/cryptodevs/chacha20_poly1305.rst
create mode 100644 doc/guides/cryptodevs/features/chacha20_poly1305.ini
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c
delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h
delete mode 100644 drivers/crypto/aesni_gcm/meson.build
delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
delete mode 100644 drivers/crypto/aesni_mb/meson.build
delete mode 100644 drivers/crypto/aesni_mb/version.map
create mode 100644 drivers/crypto/ipsec_mb/ipsec_mb_ops.c
create mode 100644 drivers/crypto/ipsec_mb/ipsec_mb_private.c
create mode 100644 drivers/crypto/ipsec_mb/ipsec_mb_private.h
create mode 100644 drivers/crypto/ipsec_mb/meson.build
create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm.c
create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm_priv.h
rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd.c => ipsec_mb/pmd_aesni_mb.c} (60%)
rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd_ops.c => ipsec_mb/pmd_aesni_mb_priv.h} (55%)
create mode 100644 drivers/crypto/ipsec_mb/pmd_chacha_poly.c
create mode 100644 drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h
create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi.c
create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi_priv.h
rename drivers/crypto/{snow3g/rte_snow3g_pmd.c => ipsec_mb/pmd_snow3g.c} (51%)
create mode 100644 drivers/crypto/ipsec_mb/pmd_snow3g_priv.h
create mode 100644 drivers/crypto/ipsec_mb/pmd_zuc.c
create mode 100644 drivers/crypto/ipsec_mb/pmd_zuc_priv.h
rename drivers/crypto/{aesni_gcm => ipsec_mb}/version.map (100%)
delete mode 100644 drivers/crypto/kasumi/kasumi_pmd_private.h
delete mode 100644 drivers/crypto/kasumi/meson.build
delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd.c
delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c
delete mode 100644 drivers/crypto/kasumi/version.map
delete mode 100644 drivers/crypto/snow3g/meson.build
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
delete mode 100644 drivers/crypto/snow3g/snow3g_pmd_private.h
delete mode 100644 drivers/crypto/snow3g/version.map
delete mode 100644 drivers/crypto/zuc/meson.build
delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd.c
delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd_ops.c
delete mode 100644 drivers/crypto/zuc/version.map
delete mode 100644 drivers/crypto/zuc/zuc_pmd_private.hSignature · 1 line
2.25.1
PATCH v4 1/14 drivers/crypto: introduce IPsec-mb framework
From: Fan Zhang <[email protected]>
This patch introduces the new framework to share common code between the SW crypto PMDs that depend on the intel-ipsec-mb library. This change helps to reduce future effort on the code maintenance and feature updates.
The PMDs that will be added to this framework in subsequent patches are:
- AESNI MB
- AESNI GCM
- CHACHA20_POLY1305
- KASUMI
- SNOW3G
- ZUC
The use of these PMDs will not change, they will still be supported for x86, and will use the same EAL args as before.
The minimum required version for the intel-ipsec-mb library is now v1.0.
---
v4:
- Added chacha20_poly1305 to commit log list.
- Fixed remove function to also release each queue pair.
- Fix copyright year for new files.
- Fix return values.
- Fix alphabetical order of PMD list in meson build file.
- Rename files and functions to remove rte_ prefix and pmd references.
- Added basic release note for framework.
v3:
- Updated intel-ipsec-mb macros.
- Added use of auto init function for IMB_MGR.
- Added detail to commit log.
v2:
- Added qp NULL check in get stats function.
- Added maintainers file entry.
- Replaced strlcpy with rte_strlcpy.
--- MAINTAINERS | 4 + doc/guides/rel_notes/release_21_11.rst | 5 + drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 293 +++++++++++++++++++++ drivers/crypto/ipsec_mb/ipsec_mb_private.c | 173 ++++++++++++ drivers/crypto/ipsec_mb/ipsec_mb_private.h | 274 +++++++++++++++++++ drivers/crypto/ipsec_mb/meson.build | 27 ++ drivers/crypto/ipsec_mb/version.map | 3 + drivers/crypto/meson.build | 1 + 8 files changed, 780 insertions(+) create mode 100644 drivers/crypto/ipsec_mb/ipsec_mb_ops.c create mode 100644 drivers/crypto/ipsec_mb/ipsec_mb_private.c create mode 100644 drivers/crypto/ipsec_mb/ipsec_mb_private.h create mode 100644 drivers/crypto/ipsec_mb/meson.build create mode 100644 drivers/crypto/ipsec_mb/version.map
MAINTAINERS +4 -0
@@ -1067,6 +1067,10 @@ F: drivers/common/qat/ F: doc/guides/cryptodevs/qat.rst F: doc/guides/cryptodevs/features/qat.ini +IPsec MB +M: Fan Zhang <[email protected]> +F: drivers/crypto/ipsec_mb/ + KASUMI M: Pablo de Lara <[email protected]> F: drivers/crypto/kasumi/
doc/guides/rel_notes/release_21_11.rst +5 -0
@@ -94,6 +94,11 @@ New Features * Added Intel ixgbe support on Windows. +* **Added framework for consolidation of IPSec_MB dependent SW Crypto PMDs.** + + The IPSec_MB framework was added to share common code between Intel + SW Crypto PMDs that depend on the intel-ipsec-mb library. + * **Updated Marvell cnxk ethdev driver.** * Added rte_flow support for dual VLAN insert and strip actions.
drivers/crypto/ipsec_mb/ipsec_mb_ops.c new file +293 -0
293 lines not on this page · raw message
drivers/crypto/ipsec_mb/ipsec_mb_private.c new file +173 -0
173 lines not on this page · raw message
drivers/crypto/ipsec_mb/ipsec_mb_private.h new file +274 -0
274 lines not on this page · raw message
drivers/crypto/ipsec_mb/meson.build new file +27 -0
@@ -0,0 +1,27 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2021 Intel Corporation + +IMB_required_ver = '1.0.0' +lib = cc.find_library('IPSec_MB', required: false) +if not lib.found() + build = false + reason = 'missing dependency, "libIPSec_MB"' +else + ext_deps += lib + + # version comes with quotes, so we split based on " and take the middle + imb_ver = cc.get_define('IMB_VERSION_STR', + prefix : '#include<intel-ipsec-mb.h>').split('"')[1] + + if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) + reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( + IMB_required_ver, imb_ver) + build = false + endif + +endif + +sources = files('ipsec_mb_private.c', + 'ipsec_mb_ops.c', + ) +deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/version.map new file +3 -0
@@ -0,0 +1,3 @@ +DPDK_22 { + local: *; +};
drivers/crypto/meson.build +1 -0
@@ -15,6 +15,7 @@ drivers = [ 'cnxk', 'dpaa_sec', 'dpaa2_sec', + 'ipsec_mb', 'kasumi', 'mlx5', 'mvsam',
Signature · 1 line
2.25.1
PATCH v4 2/14 crypto/ipsec_mb: add multiprocess support
In reply to Ciara PowerThe ipsec_mb SW PMD now has multiprocess support.
The queue-pair IMB_MGR is stored in a memzone instead of being allocated externally by the Intel IPSec MB library, when v1.1 is used. If v1.0 is used, multi process is not supported, and allocation is done as before.
The secondary process needs to reconfigure the queue-pair to allow for IMB_MGR function pointers be updated.
Intel IPsec MB library version 1.1 is required for this support.
---
v4:
- Remove call to init mb_mgr auto when setting up queue pair IMB_MGR for a secondary process, this is not needed.
- Renamed function to remove pmd reference.
- Combined release note with the IPSec_MB framework note.
--- doc/guides/rel_notes/release_21_11.rst | 3 + drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 109 ++++++++++++++++++--- drivers/crypto/ipsec_mb/ipsec_mb_private.h | 5 + 3 files changed, 101 insertions(+), 16 deletions(-)
doc/guides/rel_notes/release_21_11.rst +3 -0
@@ -99,6 +99,9 @@ New Features The IPSec_MB framework was added to share common code between Intel SW Crypto PMDs that depend on the intel-ipsec-mb library. + * Multiprocess support was added for the consolidated PMDs, + which requires v1.1 of the intel-ipsec-mb library. + * **Updated Marvell cnxk ethdev driver.** * Added rte_flow support for dual VLAN insert and strip actions.
drivers/crypto/ipsec_mb/ipsec_mb_ops.c +93 -16
157 lines not on this page · raw message
drivers/crypto/ipsec_mb/ipsec_mb_private.h +5 -0
@@ -18,6 +18,9 @@/* Maximum length for digest */ #define DIGEST_LENGTH_MAX 64 +/* Maximum length for memzone name */ +#define IPSEC_MB_MAX_MZ_NAME 32 +enum ipsec_mb_vector_mode {IPSEC_MB_NOT_SUPPORTED =0 ,IPSEC_MB_SSE ,
@@ -95,6 +98,8 @@ struct ipsec_mb_qp {*/ IMB_MGR *mb_mgr;/* Multi buffer manager */ +const struct rte_memzone *mb_mgr_mz; +/* Shared memzone for storing mb_mgr */ __extension__uint8_t additional_data[0 ];/**< Storing PMD specific additional data */ };
Signature · 1 line
2.25.1
PATCH v4 3/14 drivers/crypto: move aesni-mb PMD to IPsec-mb framework
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch removes the crypto/aesni_mb folder and gathers all aesni-mb PMD implementation specific details into a single file, pmd_aesni_mb.c in crypto/ipsec_mb.
Now that intel-ipsec-mb v1.0 is the minimum supported version, old macros can be replaced with the newer macros supported by this version.
---
v4:
- Fixed some struct and function naming.
- Added release note.
- Fixed max AAD size for ChaCha20_poly1305.
- Fixed incorrect error log.
- Split into private header file.
- Fixed some checkpatch errors.
v3:
- Updated intel-ipsec-mb library macros.
- Fixed some formatting.
v2: Updated maintainers file.
---
MAINTAINERS | 10 +-
doc/guides/cryptodevs/aesni_mb.rst | 4 +-
doc/guides/rel_notes/release_21_11.rst | 4 +
.../crypto/aesni_mb/aesni_mb_pmd_private.h | 337 -----
drivers/crypto/aesni_mb/meson.build | 25 -
drivers/crypto/aesni_mb/version.map | 3 -
drivers/crypto/ipsec_mb/ipsec_mb_private.c | 7 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 143 +-
drivers/crypto/ipsec_mb/meson.build | 1 +
.../pmd_aesni_mb.c} | 1214 +++++++----------
.../pmd_aesni_mb_priv.h} | 665 ++++-----
drivers/crypto/meson.build | 1 -
12 files changed, 916 insertions(+), 1498 deletions(-)
delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
delete mode 100644 drivers/crypto/aesni_mb/meson.build
delete mode 100644 drivers/crypto/aesni_mb/version.map
rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd.c => ipsec_mb/pmd_aesni_mb.c} (60%)
rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd_ops.c => ipsec_mb/pmd_aesni_mb_priv.h} (55%)MAINTAINERS +3 -7
@@ -1051,13 +1051,6 @@ F: drivers/crypto/aesni_gcm/ F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/features/aesni_gcm.ini -Intel AES-NI Multi-Buffer -M: Declan Doherty <[email protected]> -M: Pablo de Lara <[email protected]> -F: drivers/crypto/aesni_mb/ -F: doc/guides/cryptodevs/aesni_mb.rst -F: doc/guides/cryptodevs/features/aesni_mb.ini - Intel QuickAssist M: John Griffin <[email protected]> M: Fiona Trahe <[email protected]>
@@ -1069,7 +1062,10 @@ F: doc/guides/cryptodevs/features/qat.ini IPsec MB M: Fan Zhang <[email protected]> +M: Pablo de Lara <[email protected]> F: drivers/crypto/ipsec_mb/ +F: doc/guides/cryptodevs/aesni_mb.rst +F: doc/guides/cryptodevs/features/aesni_mb.ini KASUMI M: Pablo de Lara <[email protected]>
doc/guides/cryptodevs/aesni_mb.rst +3 -1
@@ -130,7 +130,9 @@ and the Multi-Buffer library version supported by them: 18.02 0.48 18.05 - 19.02 0.49 - 0.52 19.05 - 19.08 0.52 - 19.11+ 0.52 - 1.0* + 19.11 - 20.08 0.52 - 0.55 + 20.11 - 21.08 0.53 - 1.0* + 21.11+ 1.0* ============== ============================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
doc/guides/rel_notes/release_21_11.rst +4 -0
@@ -101,6 +101,10 @@ New Features * Multiprocess support was added for the consolidated PMDs, which requires v1.1 of the intel-ipsec-mb library. + * The following PMDs were moved into a single source folder, + however their usage and EAL options remain unchanged. + + * AESNI_MB PMD. * **Updated Marvell cnxk ethdev driver.**
drivers/crypto/aesni_mb/aesni_mb_pmd_private.h deleted +0 -337
337 lines not on this page · raw message
drivers/crypto/aesni_mb/meson.build deleted +0 -25
@@ -1,25 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018 Intel Corporation - -IMB_required_ver = '0.52.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - ext_deps += lib - - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -sources = files('rte_aesni_mb_pmd.c', 'rte_aesni_mb_pmd_ops.c') -deps += ['bus_vdev', 'net', 'security']
drivers/crypto/aesni_mb/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/ipsec_mb/ipsec_mb_private.c +5 -2
@@ -105,6 +105,7 @@ ipsec_mb_create(struct rte_vdev_device *vdev, dev->dev_ops = ipsec_mb_pmds[pmd_type].ops; dev->enqueue_burst = ipsec_mb_enqueue_burst; dev->dequeue_burst = ipsec_mb_pmds[pmd_type].dequeue_burst; + dev->feature_flags = pmd_data->feature_flags;if (pmd_data->dev_config) { retval = (*pmd_data->dev_config)(dev);
@@ -116,8 +117,6 @@ ipsec_mb_create(struct rte_vdev_device *vdev, } } - dev->feature_flags = pmd_data->feature_flags; -switch (vector_mode) {case IPSEC_MB_AVX512 : dev->feature_flags |=RTE_CRYPTODEV_FF_CPU_AVX512 ;
@@ -165,6 +164,10 @@ ipsec_mb_remove(struct rte_vdev_device *vdev)rte_free (cryptodev->security_ctx); cryptodev->security_ctx =NULL ; } +#ifdef AESNI_MB_DOCSIS_SEC_ENABLED +rte_free (cryptodev->security_ctx); + cryptodev->security_ctx =NULL ; +#endif for (qp_id =0 ; qp_id < cryptodev->data->nb_queue_pairs; qp_id++)ipsec_mb_qp_release (cryptodev, qp_id);
drivers/crypto/ipsec_mb/ipsec_mb_private.h +142 -1
170 lines not on this page · raw message
drivers/crypto/ipsec_mb/meson.build +1 -0
@@ -23,5 +23,6 @@ endif sources = files('ipsec_mb_private.c', 'ipsec_mb_ops.c', + 'pmd_aesni_mb.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_aesni_mb.c renamed from drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +504 -710
2,171 lines not on this page · raw message
drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h renamed from drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +254 -411
220 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
Re: [dpdk-dev] [PATCH v4 03/14] drivers/crypto: move aesni-mb PMD to IPsec-mb framework
Quoted 17 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Power, Ciara <[email protected]>; Thomas Monjalon <[email protected]>
Subject: [PATCH v4 03/14]drivers/crypto: move aesni-mb PMD to IPsec-mb frameworkFrom: Piotr Bronowski <[email protected]>
This patch removes the
crypto/aesni_mbfolder and gathers all aesni-mb PMD implementation specific details into a single file,pmd_aesni_mb.cincrypto/ipsec_mb.
Quoted 6 lines
Now that intel-ipsec-mb v1.0 is the minimum supported version, old macros can be replaced with the newer macros supported by this version.
Signed-off-by Piotr Bronowski <[email protected]>Signed-off-by Ciara Power <[email protected]>Acked-by Ray Kinsella <[email protected]>
PATCH v4 4/14 crypto/ipsec_mb: support ZUC-256 for aesni_mb
In reply to Ciara PowerFrom: Pablo de Lara <[email protected]>
Add support for ZUC-EEA3-256 and ZUC-EIA3-256.
Only 4-byte tags supported for now.
--- doc/guides/cryptodevs/aesni_mb.rst | 1 + doc/guides/rel_notes/release_21_11.rst | 4 ++++ drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 21 ++++++++++++++++----- drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 16 ++++++++-------- 4 files changed, 29 insertions(+), 13 deletions(-)
doc/guides/cryptodevs/aesni_mb.rst +1 -0
@@ -77,6 +77,7 @@ Limitations protocol. * RTE_CRYPTO_CIPHER_DES_DOCSISBPI is not supported for combined Crypto-CRC DOCSIS security protocol. +* The only tag size supported for ZUC-EIA3-256 is 4 bytes. Installation
doc/guides/rel_notes/release_21_11.rst +4 -0
@@ -106,6 +106,10 @@ New Features * AESNI_MB PMD. +* **Updated the aesni_mb crypto PMD.** + + * Added support for ZUC-EEA3-256 and ZUC-EIA3-256. + * **Updated Marvell cnxk ethdev driver.** * Added rte_flow support for dual VLAN insert and strip actions.
drivers/crypto/ipsec_mb/pmd_aesni_mb.c +16 -5
@@ -179,7 +179,15 @@ aesni_mb_set_session_auth_parameters(const IMB_MGR *mb_mgr, }if (xform->auth.algo ==RTE_CRYPTO_AUTH_ZUC_EIA3 ) { - sess->auth.algo =IMB_AUTH_ZUC_EIA3_BITLEN ; +if (xform->auth.key.length ==16 ) { + sess->auth.algo =IMB_AUTH_ZUC_EIA3_BITLEN ; + }else if (xform->auth.key.length ==32 ) { + sess->auth.algo =IMB_AUTH_ZUC256_EIA3_BITLEN ; + }else { +IPSEC_MB_LOG (ERR ,"Invalid authentication key length\n" ); +return -EINVAL ; + } +uint16_t zuc_eia3_digest_len =get_truncated_digest_byte_length (IMB_AUTH_ZUC_EIA3_BITLEN );
@@ -189,7 +197,8 @@ aesni_mb_set_session_auth_parameters(const IMB_MGR *mb_mgr, } sess->auth.gen_digest_len = sess->auth.req_digest_len; -memcpy (sess->auth.zuc_auth_key, xform->auth.key.data,16 ); +memcpy (sess->auth.zuc_auth_key, xform->auth.key.data, + xform->auth.key.length);return 0 ; }else if (xform->auth.algo ==RTE_CRYPTO_AUTH_SNOW3G_UIA2 ) { sess->auth.algo =IMB_AUTH_SNOW3G_UIA2_BITLEN ;
@@ -522,13 +531,14 @@ aesni_mb_set_session_cipher_parameters(const IMB_MGR *mb_mgr, sess->cipher.key_length_in_bytes =24 ; }else if (is_zuc) { -if (xform->cipher.key.length !=16 ) { +if (xform->cipher.key.length !=16 && + xform->cipher.key.length !=32 ) {IPSEC_MB_LOG (ERR ,"Invalid cipher key length" );return -EINVAL ; } - sess->cipher.key_length_in_bytes =16 ; + sess->cipher.key_length_in_bytes = xform->cipher.key.length;memcpy (sess->cipher.zuc_cipher_key, xform->cipher.key.data, -16 ); + xform->cipher.key.length); }else if (is_snow3g) {if (xform->cipher.key.length !=16 ) {IPSEC_MB_LOG (ERR ,"Invalid cipher key length" );
@@ -1150,6 +1160,7 @@ set_mb_job_params(IMB_JOB *job, struct ipsec_mb_qp *qp, job->dec_keys = &session->cipher.gcm_key;break ;case IMB_AUTH_ZUC_EIA3_BITLEN : +case IMB_AUTH_ZUC256_EIA3_BITLEN : job->u.ZUC_EIA3._key = session->auth.zuc_auth_key; job->u.ZUC_EIA3._iv = rte_crypto_op_ctod_offset(op, uint8_t *, session->auth_iv.offset);
drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h +8 -8
@@ -526,8 +526,8 @@ static const struct rte_cryptodev_capabilities aesni_mb_capabilities[] = { .block_size = 16, .key_size = { .min = 16, - .max = 16, - .increment =0 + .max = 32, + .increment =16 }, .digest_size = { .min = 4,
@@ -536,8 +536,8 @@ static const struct rte_cryptodev_capabilities aesni_mb_capabilities[] = { }, .iv_size = { .min = 16, - .max = 16, - .increment =0 + .max = 25, + .increment =9 } }, } }, }
@@ -551,13 +551,13 @@ static const struct rte_cryptodev_capabilities aesni_mb_capabilities[] = { .block_size = 16, .key_size = { .min = 16, - .max = 16, - .increment =0 + .max = 32, + .increment =16 }, .iv_size = { .min = 16, - .max = 16, - .increment =0 + .max = 25, + .increment =9 }, }, } }, }
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 04/14] crypto/ipsec_mb: support ZUC-256 for aesni_mb
Quoted 9 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]
Subject: [PATCH v4 04/14]crypto/ipsec_mb: support ZUC-256 foraesni_mb
Quoted 7 lines
From: Pablo de Lara <[email protected]>
Add support for ZUC-EEA3-256 and ZUC-EIA3-256.
Only 4-byte tags supported for now.Signed-off-by Pablo de Lara <[email protected]>---
PATCH v4 5/14 test/crypto: check cipher parameters
In reply to Ciara PowerFrom: Pablo de Lara <[email protected]>
Check for cipher parameters in the transform to verify if a test case is supported by the crypto device under test.
--- app/test/test_cryptodev.c | 55 +++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 14 deletions(-)
app/test/test_cryptodev.c +41 -14
@@ -5827,6 +5827,33 @@ test_kasumi_cipher_auth(const struct kasumi_test_data *tdata)return 0 ; } +static int +check_cipher_capability (const struct crypto_testsuite_params *ts_params, +const enum rte_crypto_cipher_algorithm cipher_algo, +const uint16_t key_size,const uint16_t iv_size) +{ +struct rte_cryptodev_sym_capability_idx cap_idx; +const struct rte_cryptodev_symmetric_capability *cap; + +/* Check if device supports the algorithm */ + cap_idx.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; + cap_idx.algo.cipher = cipher_algo; + + cap =rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], + &cap_idx); + +if (cap ==NULL ) +return -1 ; + +/* Check if device supports key size and IV size */ +if (rte_cryptodev_sym_capability_check_cipher (cap, key_size, + iv_size) <0 ) { +return -1 ; + } + +return 0 ; +} +static int test_zuc_encryption (const struct wireless_test_data *tdata) {
@@ -5851,14 +5878,9 @@ test_zuc_encryption(const struct wireless_test_data *tdata)if (gbl_action_type ==RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO )return TEST_SKIPPED ; -struct rte_cryptodev_sym_capability_idx cap_idx; -/* Check if device supports ZUC EEA3 */ - cap_idx.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - cap_idx.algo.cipher =RTE_CRYPTO_CIPHER_ZUC_EEA3 ; - -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) +if (check_cipher_capability (ts_params,RTE_CRYPTO_CIPHER_ZUC_EEA3 , + tdata->key.len, tdata->cipher_iv.len) <0 )return TEST_SKIPPED ;/* Create ZUC session */
@@ -5933,14 +5955,9 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)uint8_t ciphertext_buffer[2048 ];struct rte_cryptodev_info dev_info; -struct rte_cryptodev_sym_capability_idx cap_idx; -/* Check if device supports ZUC EEA3 */ - cap_idx.type =RTE_CRYPTO_SYM_XFORM_CIPHER ; - cap_idx.algo.cipher =RTE_CRYPTO_CIPHER_ZUC_EEA3 ; - -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) +if (check_cipher_capability (ts_params,RTE_CRYPTO_CIPHER_ZUC_EEA3 , + tdata->key.len, tdata->cipher_iv.len) <0 )return TEST_SKIPPED ;if (gbl_action_type ==RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO )
@@ -6134,6 +6151,11 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,struct rte_cryptodev_info dev_info;struct rte_cryptodev_sym_capability_idx cap_idx; +/* Check if device supports ZUC EEA3 */ +if (check_cipher_capability (ts_params,RTE_CRYPTO_CIPHER_ZUC_EEA3 , + tdata->key.len, tdata->cipher_iv.len) <0 ) +return TEST_SKIPPED ; +/* Check if device supports ZUC EIA3 */ cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; cap_idx.algo.auth =RTE_CRYPTO_AUTH_ZUC_EIA3 ;
@@ -6332,6 +6354,11 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,struct rte_cryptodev_info dev_info;struct rte_cryptodev_sym_capability_idx cap_idx; +/* Check if device supports ZUC EEA3 */ +if (check_cipher_capability (ts_params,RTE_CRYPTO_CIPHER_ZUC_EEA3 , + tdata->key.len, tdata->cipher_iv.len) <0 ) +return TEST_SKIPPED ; +/* Check if device supports ZUC EIA3 */ cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; cap_idx.algo.auth =RTE_CRYPTO_AUTH_ZUC_EIA3 ;
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 05/14] test/crypto: check cipher parameters
Quoted 10 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Doherty, Declan <[email protected]>
Subject: [PATCH v4 05/14] test/crypto: check cipher parameters
Quoted 7 lines
From: Pablo de Lara <[email protected]>
Check for cipher parameters in the transform to verify if a test case is supported by the crypto device under test.
Signed-off-by Pablo de Lara <[email protected]>---
This patch shall fix half of the ZUC256 auto test fail problem. Thanks Pablo!
PATCH v4 6/14 test/crypto: check auth parameters
In reply to Ciara PowerFrom: Pablo de Lara <[email protected]>
Check for auth parameters in the transform to verify if a test case is supported by the crypto device under test.
--- app/test/test_cryptodev.c | 55 ++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 18 deletions(-)
app/test/test_cryptodev.c +37 -18
@@ -5854,6 +5854,34 @@ check_cipher_capability(const struct crypto_testsuite_params *ts_params,return 0 ; } +static int +check_auth_capability (const struct crypto_testsuite_params *ts_params, +const enum rte_crypto_auth_algorithm auth_algo, +const uint16_t key_size,const uint16_t iv_size, +const uint16_t tag_size) +{ +struct rte_cryptodev_sym_capability_idx cap_idx; +const struct rte_cryptodev_symmetric_capability *cap; + +/* Check if device supports the algorithm */ + cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; + cap_idx.algo.auth = auth_algo; + + cap =rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], + &cap_idx); + +if (cap ==NULL ) +return -1 ; + +/* Check if device supports key size and IV size */ +if (rte_cryptodev_sym_capability_check_auth (cap, key_size, + tag_size, iv_size) <0 ) { +return -1 ; + } + +return 0 ; +} +static int test_zuc_encryption (const struct wireless_test_data *tdata) {
@@ -6051,7 +6079,6 @@ test_zuc_authentication(const struct wireless_test_data *tdata)unsigned plaintext_len;uint8_t *plaintext; -struct rte_cryptodev_sym_capability_idx cap_idx;struct rte_cryptodev_info dev_info;rte_cryptodev_info_get (ts_params->valid_devs[0 ], &dev_info);
@@ -6073,11 +6100,9 @@ test_zuc_authentication(const struct wireless_test_data *tdata)return TEST_SKIPPED ;/* Check if device supports ZUC EIA3 */ - cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - cap_idx.algo.auth =RTE_CRYPTO_AUTH_ZUC_EIA3 ; - -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) +if (check_auth_capability (ts_params,RTE_CRYPTO_AUTH_ZUC_EIA3 , + tdata->key.len, tdata->auth_iv.len, + tdata->digest.len) <0 )return TEST_SKIPPED ;/* Create ZUC session */
@@ -6149,7 +6174,6 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,unsigned int ciphertext_len;struct rte_cryptodev_info dev_info; -struct rte_cryptodev_sym_capability_idx cap_idx;/* Check if device supports ZUC EEA3 */ if (check_cipher_capability(ts_params, RTE_CRYPTO_CIPHER_ZUC_EEA3,
@@ -6157,11 +6181,9 @@ test_zuc_auth_cipher(const struct wireless_test_data *tdata,return TEST_SKIPPED ;/* Check if device supports ZUC EIA3 */ - cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - cap_idx.algo.auth =RTE_CRYPTO_AUTH_ZUC_EIA3 ; - -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) +if (check_auth_capability (ts_params,RTE_CRYPTO_AUTH_ZUC_EIA3 , + tdata->key.len, tdata->auth_iv.len, + tdata->digest.len) <0 )return TEST_SKIPPED ;rte_cryptodev_info_get (ts_params->valid_devs[0 ], &dev_info);
@@ -6352,7 +6374,6 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,uint8_t digest_buffer[10000 ];struct rte_cryptodev_info dev_info; -struct rte_cryptodev_sym_capability_idx cap_idx;/* Check if device supports ZUC EEA3 */ if (check_cipher_capability(ts_params, RTE_CRYPTO_CIPHER_ZUC_EEA3,
@@ -6360,11 +6381,9 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,return TEST_SKIPPED ;/* Check if device supports ZUC EIA3 */ - cap_idx.type =RTE_CRYPTO_SYM_XFORM_AUTH ; - cap_idx.algo.auth =RTE_CRYPTO_AUTH_ZUC_EIA3 ; - -if (rte_cryptodev_sym_capability_get (ts_params->valid_devs[0 ], - &cap_idx) ==NULL ) +if (check_auth_capability (ts_params,RTE_CRYPTO_AUTH_ZUC_EIA3 , + tdata->key.len, tdata->auth_iv.len, + tdata->digest.len) <0 )return TEST_SKIPPED ;rte_cryptodev_info_get (ts_params->valid_devs[0 ], &dev_info);
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 06/14] test/crypto: check auth parameters
Quoted 10 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Doherty, Declan <[email protected]>
Subject: [PATCH v4 06/14] test/crypto: check auth parameters
Quoted 7 lines
From: Pablo de Lara <[email protected]>
Check for auth parameters in the transform to verify if a test case is supported by the crypto device under test.
Signed-off-by Pablo de Lara <[email protected]>2.25.1
The patch fixed the ZUC256 test fail problem for ZUC/AESNI-MB/QAT.
PATCH v4 7/14 test/crypto: add ZUC-256 vectors
In reply to Ciara PowerFrom: Pablo de Lara <[email protected]>
Add extra ZUC-EIA3-256 and ZUC-EEA3-256 test vectors.
--- app/test/test_cryptodev.c | 37 +++ app/test/test_cryptodev_zuc_test_vectors.h | 286 +++++++++++++++++++++ 2 files changed, 323 insertions(+)
app/test/test_cryptodev.c +37 -0
@@ -7195,6 +7195,30 @@ test_zuc_auth_cipher_verify_test_case_1_oop_sgl(void) &zuc_auth_cipher_test_case_1, OUT_OF_PLACE, 1); } +static int +test_zuc256_encryption_test_case_1 (void ) +{ +return test_zuc_encryption (&zuc256_test_case_cipher_1); +} + +static int +test_zuc256_encryption_test_case_2 (void ) +{ +return test_zuc_encryption (&zuc256_test_case_cipher_2); +} + +static int +test_zuc256_authentication_test_case_1 (void ) +{ +return test_zuc_authentication (&zuc256_test_case_auth_1); +} + +static int +test_zuc256_authentication_test_case_2 (void ) +{ +return test_zuc_authentication (&zuc256_test_case_auth_2); +} +static int test_mixed_check_if_unsupported (const struct mixed_cipher_auth_test_data *tdata) {
@@ -14844,6 +14868,19 @@ static struct unit_test_suite cryptodev_zuc_testsuite = { test_zuc_auth_cipher_verify_test_case_1_sgl),TEST_CASE_ST (ut_setup, ut_teardown, test_zuc_auth_cipher_verify_test_case_1_oop_sgl), + +/** ZUC-256 encrypt only **/ +TEST_CASE_ST (ut_setup, ut_teardown, + test_zuc256_encryption_test_case_1), +TEST_CASE_ST (ut_setup, ut_teardown, + test_zuc256_encryption_test_case_2), + +/** ZUC-256 authentication only **/ +TEST_CASE_ST (ut_setup, ut_teardown, + test_zuc256_authentication_test_case_1), +TEST_CASE_ST (ut_setup, ut_teardown, + test_zuc256_authentication_test_case_2), + TEST_CASES_END() } };
app/test/test_cryptodev_zuc_test_vectors.h +286 -0
290 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 07/14] test/crypto: add ZUC-256 vectors
Quoted 10 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Doherty, Declan <[email protected]>
Subject: [PATCH v4 07/14] test/crypto: add ZUC-256 vectors
Quoted 6 lines
From: Pablo de Lara <[email protected]>
Add extra ZUC-EIA3-256 and ZUC-EEA3-256 test vectors.
Signed-off-by Pablo de Lara <[email protected]>---
PATCH v4 8/14 drivers/crypto: move aesni-gcm PMD to IPsec-mb framework
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch removes the crypto/aesni_gcm folder and gathers all aesni-gcm PMD implementation specific details into a single file, pmd_aesni_gcm.c in the crypto/ipsec_mb folder.
A redundant check for iv length is removed.
GCM ops are stored in the queue pair for multi process support, they are updated during queue pair setup for both primary and secondary processes.
GCM ops are also set per lcore for the CPU crypto mode.
---
v4:
- Fixed some function naming.
- Added release note.
- Fixed copyright date.
- Split into private header file.
- Remove security includes.
v3:
- Moved session GCM ops to queue pair.
- Added GCM ops per lcore.
- Fixed some formatting.
v2:
- Fixed enum for GCM key length.
- Updated maintainers file.
--- MAINTAINERS | 9 +- doc/guides/cryptodevs/aesni_gcm.rst | 4 +- doc/guides/rel_notes/release_21_11.rst | 1 + drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 104 -- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 984 ------------------ drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 333 ------ .../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 123 --- drivers/crypto/aesni_gcm/meson.build | 24 - drivers/crypto/aesni_gcm/version.map | 3 - drivers/crypto/ipsec_mb/ipsec_mb_private.h | 7 + drivers/crypto/ipsec_mb/meson.build | 3 +- drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 837 +++++++++++++++ drivers/crypto/ipsec_mb/pmd_aesni_gcm_priv.h | 169 +++ drivers/crypto/meson.build | 1 - 14 files changed, 1021 insertions(+), 1581 deletions(-) delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h delete mode 100644 drivers/crypto/aesni_gcm/meson.build delete mode 100644 drivers/crypto/aesni_gcm/version.map create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm.c create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm_priv.h
MAINTAINERS +2 -7
@@ -1044,13 +1044,6 @@ M: Fan Zhang <[email protected]> F: drivers/crypto/scheduler/ F: doc/guides/cryptodevs/scheduler.rst -Intel AES-NI GCM -M: Declan Doherty <[email protected]> -M: Pablo de Lara <[email protected]> -F: drivers/crypto/aesni_gcm/ -F: doc/guides/cryptodevs/aesni_gcm.rst -F: doc/guides/cryptodevs/features/aesni_gcm.ini - Intel QuickAssist M: John Griffin <[email protected]> M: Fiona Trahe <[email protected]>
@@ -1064,7 +1057,9 @@ IPsec MB M: Fan Zhang <[email protected]> M: Pablo de Lara <[email protected]> F: drivers/crypto/ipsec_mb/ +F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/aesni_mb.rst +F: doc/guides/cryptodevs/features/aesni_gcm.ini F: doc/guides/cryptodevs/features/aesni_mb.ini KASUMI
doc/guides/cryptodevs/aesni_gcm.rst +3 -1
@@ -83,7 +83,9 @@ and the external crypto libraries supported by them: 17.02 - 17.05 ISA-L Crypto v2.18 17.08 - 18.02 Multi-buffer library 0.46 - 0.48 18.05 - 19.02 Multi-buffer library 0.49 - 0.52 - 19.05+ Multi-buffer library 0.52 - 1.0* + 19.05 - 20.08 Multi-buffer library 0.52 - 0.55 + 20.11 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
doc/guides/rel_notes/release_21_11.rst +1 -0
@@ -105,6 +105,7 @@ New Features however their usage and EAL options remain unchanged. * AESNI_MB PMD. + * AESNI_GCM PMD. * **Updated the aesni_mb crypto PMD.**
drivers/crypto/aesni_gcm/aesni_gcm_ops.h deleted +0 -104
104 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c deleted +0 -984
984 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c deleted +0 -333
333 lines not on this page · raw message
drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h deleted +0 -123
123 lines not on this page · raw message
drivers/crypto/aesni_gcm/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018 Intel Corporation - -IMB_required_ver = '0.52.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - ext_deps += lib - - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif -endif - -sources = files('aesni_gcm_pmd.c', 'aesni_gcm_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/aesni_gcm/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/ipsec_mb/ipsec_mb_private.h +7 -0
@@ -37,6 +37,9 @@ extern RTE_DEFINE_PER_LCORE(IMB_MGR *, mb_mgr);#define CRYPTODEV_NAME_AESNI_MB_PMD crypto_aesni_mb/**< IPSEC Multi buffer aesni_mb PMD device name */ +#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm +/**< IPSEC Multi buffer PMD aesni_gcm device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -46,6 +49,7 @@ extern int ipsec_mb_logtype_driver;/** All supported device types */ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 , +IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_N_PMD_TYPES };
@@ -65,6 +69,7 @@ enum ipsec_mb_operation { };extern uint8_t pmd_driver_id_aesni_mb; +extern uint8_t pmd_driver_id_aesni_gcm;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -73,6 +78,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)switch (pmd_type) {case IPSEC_MB_PMD_TYPE_AESNI_MB :return pmd_driver_id_aesni_mb; +case IPSEC_MB_PMD_TYPE_AESNI_GCM : +return pmd_driver_id_aesni_gcm;default :break ; }
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -23,6 +23,7 @@ endif sources = files('ipsec_mb_private.c', 'ipsec_mb_ops.c', - 'pmd_aesni_mb.c' + 'pmd_aesni_mb.c', + 'pmd_aesni_gcm.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c new file +837 -0
837 lines not on this page · raw message
drivers/crypto/ipsec_mb/pmd_aesni_gcm_priv.h new file +169 -0
169 lines not on this page · raw message
drivers/crypto/meson.build +0 -1
@@ -6,7 +6,6 @@ if is_windows endif drivers = [ - 'aesni_gcm', 'armv8', 'bcmfs', 'caam_jr',
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 08/14] drivers/crypto: move aesni-gcm PMD to IPsec-mb framework
Quoted 22 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Power, Ciara <[email protected]>; Thomas Monjalon <[email protected]>
Subject: [PATCH v4 08/14]drivers/crypto: move aesni-gcm PMD to IPsec-mb frameworkFrom: Piotr Bronowski <[email protected]>
This patch removes the
crypto/aesni_gcmfolder and gathers all aesni-gcm PMD implementation specific details into a single file,pmd_aesni_gcm.cin thecrypto/ipsec_mbfolder.
A redundant check for iv length is removed.GCM ops are stored in the queue pair for multi process support, they are updated during queue pair setup for both primary and secondary processes.
Quoted 6 lines
GCM ops are also set per lcore for the CPU crypto mode.
Signed-off-by Piotr Bronowski <[email protected]>Signed-off-by Ciara Power <[email protected]>Acked-by Ray Kinsella <[email protected]>
PATCH v4 9/14 drivers/crypto: move kasumi PMD to IPsec-mb framework
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch removes the crypto/kasumi folder and gathers all kasumi PMD implementation specific details into a single file, pmd_kasumi.c in the crypto/ipsec_mb folder.
---
v4:
- Fixed some function names.
- Removed unnecessary enqueued counts from process_ops.
- Added release note.
- Split into private header file.
- Fixed some checkpatch errors.
v2: Updated maintainers file.
--- MAINTAINERS | 6 +- doc/guides/cryptodevs/kasumi.rst | 3 +- doc/guides/rel_notes/release_21_11.rst | 1 + drivers/crypto/ipsec_mb/ipsec_mb_private.h | 7 + drivers/crypto/ipsec_mb/meson.build | 3 +- drivers/crypto/ipsec_mb/pmd_kasumi.c | 476 +++++++++++++++ drivers/crypto/ipsec_mb/pmd_kasumi_priv.h | 81 +++ drivers/crypto/kasumi/kasumi_pmd_private.h | 81 --- drivers/crypto/kasumi/meson.build | 24 - drivers/crypto/kasumi/rte_kasumi_pmd.c | 642 --------------------- drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 316 ---------- drivers/crypto/kasumi/version.map | 3 - drivers/crypto/meson.build | 1 - 13 files changed, 570 insertions(+), 1074 deletions(-) create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi.c create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi_priv.h delete mode 100644 drivers/crypto/kasumi/kasumi_pmd_private.h delete mode 100644 drivers/crypto/kasumi/meson.build delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd.c delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c delete mode 100644 drivers/crypto/kasumi/version.map
MAINTAINERS +1 -5
@@ -1059,13 +1059,9 @@ M: Pablo de Lara <[email protected]> F: drivers/crypto/ipsec_mb/ F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/aesni_mb.rst +F: doc/guides/cryptodevs/kasumi.rst F: doc/guides/cryptodevs/features/aesni_gcm.ini F: doc/guides/cryptodevs/features/aesni_mb.ini - -KASUMI -M: Pablo de Lara <[email protected]> -F: drivers/crypto/kasumi/ -F: doc/guides/cryptodevs/kasumi.rst F: doc/guides/cryptodevs/features/kasumi.ini Marvell cnxk crypto
doc/guides/cryptodevs/kasumi.rst +2 -1
@@ -78,7 +78,8 @@ and the external crypto libraries supported by them: DPDK version Crypto library version ============= ================================ 16.11 - 19.11 LibSSO KASUMI - 20.02+ Multi-buffer library 0.53 - 1.0* + 20.02 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
doc/guides/rel_notes/release_21_11.rst +1 -0
@@ -106,6 +106,7 @@ New Features * AESNI_MB PMD. * AESNI_GCM PMD. + * KASUMI PMD. * **Updated the aesni_mb crypto PMD.**
drivers/crypto/ipsec_mb/ipsec_mb_private.h +7 -0
@@ -40,6 +40,9 @@ extern RTE_DEFINE_PER_LCORE(IMB_MGR *, mb_mgr);#define CRYPTODEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm/**< IPSEC Multi buffer PMD aesni_gcm device name */ +#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi +/**< IPSEC Multi buffer PMD kasumi device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -50,6 +53,7 @@ extern int ipsec_mb_logtype_driver;enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 ,IPSEC_MB_PMD_TYPE_AESNI_GCM , +IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_N_PMD_TYPES };
@@ -70,6 +74,7 @@ enum ipsec_mb_operation {extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm; +extern uint8_t pmd_driver_id_kasumi;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -80,6 +85,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_aesni_mb;case IPSEC_MB_PMD_TYPE_AESNI_GCM :return pmd_driver_id_aesni_gcm; +case IPSEC_MB_PMD_TYPE_KASUMI : +return pmd_driver_id_kasumi;default :break ; }
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -24,6 +24,7 @@ endif sources = files('ipsec_mb_private.c', 'ipsec_mb_ops.c', 'pmd_aesni_mb.c', - 'pmd_aesni_gcm.c' + 'pmd_aesni_gcm.c', + 'pmd_kasumi.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_kasumi.c new file +476 -0
476 lines not on this page · raw message
drivers/crypto/ipsec_mb/pmd_kasumi_priv.h new file +81 -0
81 lines not on this page · raw message
drivers/crypto/kasumi/kasumi_pmd_private.h deleted +0 -81
81 lines not on this page · raw message
drivers/crypto/kasumi/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_kasumi_pmd.c', 'rte_kasumi_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/kasumi/rte_kasumi_pmd.c deleted +0 -642
642 lines not on this page · raw message
drivers/crypto/kasumi/rte_kasumi_pmd_ops.c deleted +0 -316
316 lines not on this page · raw message
drivers/crypto/kasumi/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/meson.build +0 -1
@@ -14,7 +14,6 @@ drivers = [ 'dpaa_sec', 'dpaa2_sec', 'ipsec_mb', - 'kasumi', 'mlx5', 'mvsam', 'nitrox',
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 09/14] drivers/crypto: move kasumi PMD to IPsec-mb framework
Quoted 13 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Power, Ciara <[email protected]>; Thomas Monjalon <[email protected]>
Subject: [PATCH v4 09/14]drivers/crypto: move kasumi PMD to IPsec-mb frameworkFrom: Piotr Bronowski <[email protected]>
Quoted 8 lines
This patch removes the
crypto/kasumifolder and gathers all kasumi PMD implementation specific details into a single file,pmd_kasumi.cin thecrypto/ipsec_mbfolder.Signed-off-by Piotr Bronowski <[email protected]>Signed-off-by Ciara Power <[email protected]>Acked-by Ray Kinsella <[email protected]>
PATCH v4 10/14 drivers/crypto: move snow3g PMD to IPsec-mb framework
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch removes the crypto/snow3g folder and gathers all snow3g PMD implementation specific details into a single file, pmd_snow3g.c in the crypto/ipsec_mb folder.
---
v4:
- Removed extra empty lines.
- Removed call to enqueue when processing ops, no longer needed.
- Fixed some function names.
- Removed unnecessary enqueued counts from process_ops function.
- Added release note.
- Removed security includes.
- Split into private header file.
v3: Removed extra empty lines.
v2: Updated maintainers file.
---
MAINTAINERS | 8 +-
doc/guides/cryptodevs/snow3g.rst | 3 +-
doc/guides/rel_notes/release_21_11.rst | 1 +
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 7 +
drivers/crypto/ipsec_mb/meson.build | 3 +-
.../pmd_snow3g.c} | 405 +++++-------------
drivers/crypto/ipsec_mb/pmd_snow3g_priv.h | 85 ++++
drivers/crypto/meson.build | 1 -
drivers/crypto/snow3g/meson.build | 24 --
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 323 --------------
drivers/crypto/snow3g/snow3g_pmd_private.h | 84 ----
drivers/crypto/snow3g/version.map | 3 -
12 files changed, 218 insertions(+), 729 deletions(-)
rename drivers/crypto/{snow3g/rte_snow3g_pmd.c => ipsec_mb/pmd_snow3g.c} (54%)
create mode 100644 drivers/crypto/ipsec_mb/pmd_snow3g_priv.h
delete mode 100644 drivers/crypto/snow3g/meson.build
delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
delete mode 100644 drivers/crypto/snow3g/snow3g_pmd_private.h
delete mode 100644 drivers/crypto/snow3g/version.mapMAINTAINERS +2 -6
@@ -1060,9 +1060,11 @@ F: drivers/crypto/ipsec_mb/ F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/aesni_mb.rst F: doc/guides/cryptodevs/kasumi.rst +F: doc/guides/cryptodevs/snow3g.rst F: doc/guides/cryptodevs/features/aesni_gcm.ini F: doc/guides/cryptodevs/features/aesni_mb.ini F: doc/guides/cryptodevs/features/kasumi.ini +F: doc/guides/cryptodevs/features/snow3g.ini Marvell cnxk crypto M: Ankur Dwivedi <[email protected]>
@@ -1133,12 +1135,6 @@ F: drivers/crypto/openssl/ F: doc/guides/cryptodevs/openssl.rst F: doc/guides/cryptodevs/features/openssl.ini -SNOW 3G -M: Pablo de Lara <[email protected]> -F: drivers/crypto/snow3g/ -F: doc/guides/cryptodevs/snow3g.rst -F: doc/guides/cryptodevs/features/snow3g.ini - Virtio M: Jay Zhou <[email protected]> F: drivers/crypto/virtio/
doc/guides/cryptodevs/snow3g.rst +2 -1
@@ -77,7 +77,8 @@ and the external crypto libraries supported by them: DPDK version Crypto library version ============= ================================ 16.04 - 19.11 LibSSO SNOW3G - 20.02+ Multi-buffer library 0.53 - 1.0* + 20.02 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
doc/guides/rel_notes/release_21_11.rst +1 -0
@@ -107,6 +107,7 @@ New Features * AESNI_MB PMD. * AESNI_GCM PMD. * KASUMI PMD. + * SNOW3G PMD. * **Updated the aesni_mb crypto PMD.**
drivers/crypto/ipsec_mb/ipsec_mb_private.h +7 -0
@@ -43,6 +43,9 @@ extern RTE_DEFINE_PER_LCORE(IMB_MGR *, mb_mgr);#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi/**< IPSEC Multi buffer PMD kasumi device name */ +#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g +/**< IPSEC Multi buffer PMD snow3g device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -54,6 +57,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_MB =0 ,IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_PMD_TYPE_KASUMI , +IPSEC_MB_PMD_TYPE_SNOW3G , IPSEC_MB_N_PMD_TYPES };
@@ -75,6 +79,7 @@ enum ipsec_mb_operation {extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi; +extern uint8_t pmd_driver_id_snow3g;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -87,6 +92,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_aesni_gcm;case IPSEC_MB_PMD_TYPE_KASUMI :return pmd_driver_id_kasumi; +case IPSEC_MB_PMD_TYPE_SNOW3G : +return pmd_driver_id_snow3g;default :break ; }
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -25,6 +25,7 @@ sources = files('ipsec_mb_private.c', 'ipsec_mb_ops.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', - 'pmd_kasumi.c' + 'pmd_kasumi.c', + 'pmd_snow3g.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_snow3g.c renamed from drivers/crypto/snow3g/rte_snow3g_pmd.c +119 -286
639 lines not on this page · raw message
drivers/crypto/ipsec_mb/pmd_snow3g_priv.h new file +85 -0
85 lines not on this page · raw message
drivers/crypto/meson.build +0 -1
@@ -22,7 +22,6 @@ drivers = [ 'octeontx2', 'openssl', 'scheduler', - 'snow3g', 'virtio', 'zuc', ]
drivers/crypto/snow3g/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2019-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_snow3g_pmd.c', 'rte_snow3g_pmd_ops.c') -deps += ['bus_vdev', 'cryptodev']
drivers/crypto/snow3g/rte_snow3g_pmd_ops.c deleted +0 -323
323 lines not on this page · raw message
drivers/crypto/snow3g/snow3g_pmd_private.h deleted +0 -84
84 lines not on this page · raw message
drivers/crypto/snow3g/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 10/14] drivers/crypto: move snow3g PMD to IPsec-mb framework
Quoted 13 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Power, Ciara <[email protected]>; Thomas Monjalon <[email protected]>
Subject: [PATCH v4 10/14]drivers/crypto: move snow3g PMD to IPsec-mb frameworkFrom: Piotr Bronowski <[email protected]>
Quoted 8 lines
This patch removes the
crypto/snow3gfolder and gathers all snow3g PMD implementation specific details into a single file,pmd_snow3g.cin thecrypto/ipsec_mbfolder.Signed-off-by Piotr Bronowski <[email protected]>Signed-off-by Ciara Power <[email protected]>Acked-by Ray Kinsella <[email protected]>
PATCH v4 11/14 crypto/ipsec_mb: add snow3g digest appended ops support
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch enables out-of-place auth-cipher operations where digest should be encrypted along with the rest of raw data. It also adds support for partially encrypted digest when using auth-cipher operations.
---
v2: Added release note.
--- doc/guides/cryptodevs/features/snow3g.ini | 1 + doc/guides/rel_notes/release_21_11.rst | 7 + drivers/crypto/ipsec_mb/pmd_snow3g.c | 148 +++++++++++++++++++--- 3 files changed, 139 insertions(+), 17 deletions(-)
doc/guides/cryptodevs/features/snow3g.ini +1 -0
@@ -8,6 +8,7 @@ Symmetric crypto = Y Sym operation chaining = Y Symmetric sessionless = Y Non-Byte aligned data = Y +Digest encrypted = Y OOP LB In LB Out = Y ;
doc/guides/rel_notes/release_21_11.rst +7 -0
@@ -113,6 +113,13 @@ New Features * Added support for ZUC-EEA3-256 and ZUC-EIA3-256. +* **Added digest appended ops support for Snow3G PMD.** + + * Added support for out-of-place auth-cipher operations that encrypt + the digest along with the rest of the raw data. + * Added support for partially encrypted digest when using auth-cipher + operations. + * **Updated Marvell cnxk ethdev driver.** * Added rte_flow support for dual VLAN insert and strip actions.
drivers/crypto/ipsec_mb/pmd_snow3g.c +131 -17
219 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 11/14] crypto/ipsec_mb: add snow3g digest appended ops support
Quoted 19 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Damian Nowak <[email protected]>; Ji, Kai <[email protected]>; Power, Ciara <[email protected]>
Subject: [PATCH v4 11/14]crypto/ipsec_mb: add snow3g digest appended ops supportFrom: Piotr Bronowski <[email protected]>
This patch enables out-of-place auth-cipher operations where digest should be encrypted along with the rest of raw data. It also adds support for partially encrypted digest when using auth-cipher operations.
Quoted 6 lines
Signed-off-by Damian Nowak <[email protected]>Signed-off-by Kai Ji <[email protected]>Signed-off-by Piotr Bronowski <[email protected]>Signed-off-by Ciara Power <[email protected]>Acked-by Ray Kinsella <[email protected]>
PATCH v4 12/14 drivers/crypto: move zuc PMD to IPsec-mb framework
In reply to Ciara PowerFrom: Piotr Bronowski <[email protected]>
This patch removes the crypto/zuc folder and gathers all zuc PMD implementation specific details into two files, pmd_zuc.c and pmd_zuc_priv.h in the crypto/ipsec_mb folder.
---
v4:
- Fixed some function names.
- Removed unnecessary enqueued counts from process_ops function.
- Added release note.
- Removed security includes.
- Split into private header file.
v2: Updated maintainers file.
--- MAINTAINERS | 8 +- doc/guides/cryptodevs/zuc.rst | 3 +- doc/guides/rel_notes/release_21_11.rst | 1 + drivers/crypto/ipsec_mb/ipsec_mb_private.h | 7 + drivers/crypto/ipsec_mb/meson.build | 3 +- drivers/crypto/ipsec_mb/pmd_zuc.c | 403 ++++++++++++++ drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 85 +++ drivers/crypto/meson.build | 1 - drivers/crypto/zuc/meson.build | 24 - drivers/crypto/zuc/rte_zuc_pmd.c | 583 --------------------- drivers/crypto/zuc/rte_zuc_pmd_ops.c | 322 ------------ drivers/crypto/zuc/version.map | 3 - drivers/crypto/zuc/zuc_pmd_private.h | 83 --- 13 files changed, 502 insertions(+), 1024 deletions(-) create mode 100644 drivers/crypto/ipsec_mb/pmd_zuc.c create mode 100644 drivers/crypto/ipsec_mb/pmd_zuc_priv.h delete mode 100644 drivers/crypto/zuc/meson.build delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd.c delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd_ops.c delete mode 100644 drivers/crypto/zuc/version.map delete mode 100644 drivers/crypto/zuc/zuc_pmd_private.h
MAINTAINERS +2 -6
@@ -1061,10 +1061,12 @@ F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/aesni_mb.rst F: doc/guides/cryptodevs/kasumi.rst F: doc/guides/cryptodevs/snow3g.rst +F: doc/guides/cryptodevs/zuc.rst F: doc/guides/cryptodevs/features/aesni_gcm.ini F: doc/guides/cryptodevs/features/aesni_mb.ini F: doc/guides/cryptodevs/features/kasumi.ini F: doc/guides/cryptodevs/features/snow3g.ini +F: doc/guides/cryptodevs/features/zuc.ini Marvell cnxk crypto M: Ankur Dwivedi <[email protected]>
@@ -1141,12 +1143,6 @@ F: drivers/crypto/virtio/ F: doc/guides/cryptodevs/virtio.rst F: doc/guides/cryptodevs/features/virtio.ini -ZUC -M: Pablo de Lara <[email protected]> -F: drivers/crypto/zuc/ -F: doc/guides/cryptodevs/zuc.rst -F: doc/guides/cryptodevs/features/zuc.ini - Compression Drivers -------------------
doc/guides/cryptodevs/zuc.rst +2 -1
@@ -77,7 +77,8 @@ and the external crypto libraries supported by them: DPDK version Crypto library version ============= ================================ 16.11 - 19.11 LibSSO ZUC - 20.02+ Multi-buffer library 0.53 - 1.0* + 20.02 - 21.08 Multi-buffer library 0.53 - 1.0* + 21.11+ Multi-buffer library 1.0* ============= ================================ \* Multi-buffer library 1.0 or newer only works for Meson but not Make build system.
doc/guides/rel_notes/release_21_11.rst +1 -0
@@ -108,6 +108,7 @@ New Features * AESNI_GCM PMD. * KASUMI PMD. * SNOW3G PMD. + * ZUC PMD. * **Updated the aesni_mb crypto PMD.**
drivers/crypto/ipsec_mb/ipsec_mb_private.h +7 -0
@@ -46,6 +46,9 @@ extern RTE_DEFINE_PER_LCORE(IMB_MGR *, mb_mgr);#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g/**< IPSEC Multi buffer PMD snow3g device name */ +#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc +/**< IPSEC Multi buffer PMD zuc device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -58,6 +61,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_AESNI_GCM ,IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_PMD_TYPE_SNOW3G , +IPSEC_MB_PMD_TYPE_ZUC , IPSEC_MB_N_PMD_TYPES };
@@ -80,6 +84,7 @@ extern uint8_t pmd_driver_id_aesni_mb;extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi;extern uint8_t pmd_driver_id_snow3g; +extern uint8_t pmd_driver_id_zuc;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -94,6 +99,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_kasumi;case IPSEC_MB_PMD_TYPE_SNOW3G :return pmd_driver_id_snow3g; +case IPSEC_MB_PMD_TYPE_ZUC : +return pmd_driver_id_zuc;default :break ; }
drivers/crypto/ipsec_mb/meson.build +2 -1
@@ -26,6 +26,7 @@ sources = files('ipsec_mb_private.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', 'pmd_kasumi.c', - 'pmd_snow3g.c' + 'pmd_snow3g.c', + 'pmd_zuc.c' ) deps += ['bus_vdev', 'net', 'security']
drivers/crypto/ipsec_mb/pmd_zuc.c new file +403 -0
403 lines not on this page · raw message
drivers/crypto/ipsec_mb/pmd_zuc_priv.h new file +85 -0
85 lines not on this page · raw message
drivers/crypto/meson.build +0 -1
@@ -23,7 +23,6 @@ drivers = [ 'openssl', 'scheduler', 'virtio', - 'zuc', ] std_deps = ['cryptodev'] # cryptodev pulls in all other needed deps
drivers/crypto/zuc/meson.build deleted +0 -24
@@ -1,24 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2018-2020 Intel Corporation - -IMB_required_ver = '0.53.0' -lib = cc.find_library('IPSec_MB', required: false) -if not lib.found() - build = false - reason = 'missing dependency, "libIPSec_MB"' -else - # version comes with quotes, so we split based on " and take the middle - imb_ver = cc.get_define('IMB_VERSION_STR', - prefix : '#include<intel-ipsec-mb.h>').split('"')[1] - - if (imb_ver == '') or (imb_ver.version_compare('<' + IMB_required_ver)) - reason = 'IPSec_MB version >= @0@ is required, found version @1@'.format( - IMB_required_ver, imb_ver) - build = false - endif - -endif - -ext_deps += lib -sources = files('rte_zuc_pmd.c', 'rte_zuc_pmd_ops.c') -deps += ['bus_vdev']
drivers/crypto/zuc/rte_zuc_pmd.c deleted +0 -583
583 lines not on this page · raw message
drivers/crypto/zuc/rte_zuc_pmd_ops.c deleted +0 -322
322 lines not on this page · raw message
drivers/crypto/zuc/version.map deleted +0 -3
@@ -1,3 +0,0 @@ -DPDK_22 { - local: *; -};
drivers/crypto/zuc/zuc_pmd_private.h deleted +0 -83
83 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 12/14] drivers/crypto: move zuc PMD to IPsec-mb framework
Quoted 13 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Power, Ciara <[email protected]>; Thomas Monjalon <[email protected]>
Subject: [PATCH v4 12/14]drivers/crypto: move zuc PMD to IPsec-mb frameworkFrom: Piotr Bronowski <[email protected]>
Quoted 8 lines
This patch removes the
crypto/zucfolder and gathers all zuc PMD implementation specific details into two files,pmd_zuc.candpmd_zuc_priv.hin thecrypto/ipsec_mbfolder.Signed-off-by Piotr Bronowski <[email protected]>Signed-off-by Ciara Power <[email protected]>Acked-by Ray Kinsella <[email protected]>
PATCH v4 13/14 crypto/ipsec_mb: add chacha20-poly1305 PMD to framework
In reply to Ciara PowerFrom: Kai Ji <[email protected]>
Add in new chacha20_poly1305 PMD to the ipsec_mb framework.
---
v4:
- Fixed some function names.
- Removed unnecessary enqueued counts from process_ops function.
- Fixed table label in doc.
- Split into private header file.
- Removed security includes.
- Added sub release note under ipsec_mb note.
- Split out test app changes to new patch.
- Fixed copyright years.
- Added docs to maintainers file.
v3:
- Fixed some formatting.
- Removed unnecessary get session function.
v2:
- Added unused tag to session configure parameter.
- Added release note.
- Added documentation for PMD.
--- MAINTAINERS | 2 + doc/guides/cryptodevs/chacha20_poly1305.rst | 99 +++++ .../cryptodevs/features/chacha20_poly1305.ini | 35 ++ doc/guides/cryptodevs/index.rst | 1 + doc/guides/rel_notes/release_21_11.rst | 1 + drivers/crypto/ipsec_mb/ipsec_mb_private.h | 7 + drivers/crypto/ipsec_mb/meson.build | 1 + drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 408 ++++++++++++++++++ .../crypto/ipsec_mb/pmd_chacha_poly_priv.h | 74 ++++ 9 files changed, 628 insertions(+) create mode 100644 doc/guides/cryptodevs/chacha20_poly1305.rst create mode 100644 doc/guides/cryptodevs/features/chacha20_poly1305.ini create mode 100644 drivers/crypto/ipsec_mb/pmd_chacha_poly.c create mode 100644 drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h
MAINTAINERS +2 -0
@@ -1059,11 +1059,13 @@ M: Pablo de Lara <[email protected]> F: drivers/crypto/ipsec_mb/ F: doc/guides/cryptodevs/aesni_gcm.rst F: doc/guides/cryptodevs/aesni_mb.rst +F: doc/guides/cryptodevs/chacha20_poly1305.rst F: doc/guides/cryptodevs/kasumi.rst F: doc/guides/cryptodevs/snow3g.rst F: doc/guides/cryptodevs/zuc.rst F: doc/guides/cryptodevs/features/aesni_gcm.ini F: doc/guides/cryptodevs/features/aesni_mb.ini +F: doc/guides/cryptodevs/features/chacha20_poly1305.ini F: doc/guides/cryptodevs/features/kasumi.ini F: doc/guides/cryptodevs/features/snow3g.ini F: doc/guides/cryptodevs/features/zuc.ini
doc/guides/cryptodevs/chacha20_poly1305.rst new file +99 -0
99 lines not on this page · raw message
doc/guides/cryptodevs/features/chacha20_poly1305.ini new file +35 -0
@@ -0,0 +1,35 @@ +; +; Supported features of the 'chacha20_poly1305' crypto driver. +; +; Refer to default.ini for the full list of available PMD features. +; +[Features] +Symmetric crypto = Y +Sym operation chaining = Y +Symmetric sessionless = Y +Non-Byte aligned data = Y +In Place SGL = Y +OOP SGL In LB Out = Y +OOP LB In LB Out = Y +CPU crypto = Y + +; +; Supported crypto algorithms of the 'chacha20_poly1305' crypto driver. +; +[Cipher] + +; +; Supported authentication algorithms of the 'chacha20_poly1305' crypto driver. +; +[Auth] + +; +; Supported AEAD algorithms of the 'chacha20_poly1305' crypto driver. +; +[AEAD] +CHACHA20-POLY1305 = Y + +; +; Supported Asymmetric algorithms of the 'chacha20_poly1305' crypto driver. +; +[Asymmetric]
doc/guides/cryptodevs/index.rst +1 -0
@@ -16,6 +16,7 @@ Crypto Device Drivers bcmfs caam_jr ccp + chacha20_poly1305 cnxk dpaa2_sec dpaa_sec
doc/guides/rel_notes/release_21_11.rst +1 -0
@@ -109,6 +109,7 @@ New Features * KASUMI PMD. * SNOW3G PMD. * ZUC PMD. + * CHACHA20_POLY1305 PMD. * **Updated the aesni_mb crypto PMD.**
drivers/crypto/ipsec_mb/ipsec_mb_private.h +7 -0
@@ -49,6 +49,9 @@ extern RTE_DEFINE_PER_LCORE(IMB_MGR *, mb_mgr);#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc/**< IPSEC Multi buffer PMD zuc device name */ +#define CRYPTODEV_NAME_CHACHA20_POLY1305_PMD crypto_chacha20_poly1305 +/**< IPSEC Multi buffer PMD chacha20_poly1305 device name */ +/** PMD LOGTYPE DRIVER, common to all PMDs */ extern int ipsec_mb_logtype_driver;#define IPSEC_MB_LOG (level, fmt, ...) \
@@ -62,6 +65,7 @@ enum ipsec_mb_pmd_types {IPSEC_MB_PMD_TYPE_KASUMI ,IPSEC_MB_PMD_TYPE_SNOW3G ,IPSEC_MB_PMD_TYPE_ZUC , +IPSEC_MB_PMD_TYPE_CHACHA20_POLY1305 , IPSEC_MB_N_PMD_TYPES };
@@ -85,6 +89,7 @@ extern uint8_t pmd_driver_id_aesni_gcm;extern uint8_t pmd_driver_id_kasumi;extern uint8_t pmd_driver_id_snow3g;extern uint8_t pmd_driver_id_zuc; +extern uint8_t pmd_driver_id_chacha20_poly1305;/** Helper function. Gets driver ID based on PMD type */ static __rte_always_inline uint8_t
@@ -101,6 +106,8 @@ ipsec_mb_get_driver_id(enum ipsec_mb_pmd_types pmd_type)return pmd_driver_id_snow3g;case IPSEC_MB_PMD_TYPE_ZUC :return pmd_driver_id_zuc; +case IPSEC_MB_PMD_TYPE_CHACHA20_POLY1305 : +return pmd_driver_id_chacha20_poly1305;default :break ; }
drivers/crypto/ipsec_mb/meson.build +1 -0
@@ -25,6 +25,7 @@ sources = files('ipsec_mb_private.c', 'ipsec_mb_ops.c', 'pmd_aesni_mb.c', 'pmd_aesni_gcm.c', + 'pmd_chacha_poly.c', 'pmd_kasumi.c', 'pmd_snow3g.c', 'pmd_zuc.c'
drivers/crypto/ipsec_mb/pmd_chacha_poly.c new file +408 -0
408 lines not on this page · raw message
drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h new file +74 -0
74 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 13/14] crypto/ipsec_mb: add chacha20-poly1305 PMD to framework
Quoted 12 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Ji, Kai <[email protected]>; Power, Ciara <[email protected]>; Thomas Monjalon <[email protected]>
Subject: [PATCH v4 13/14]crypto/ipsec_mb: add chacha20-poly1305 PMD to framework
Quoted 8 lines
From: Kai Ji <[email protected]>
Add in new
chacha20_poly1305PMD to theipsec_mbframework.Signed-off-by Kai Ji <[email protected]>Signed-off-by Ciara Power <[email protected]>Acked-by Ray Kinsella <[email protected]>
PATCH v4 14/14 test/crypto: add test for chacha20_poly1305 PMD
In reply to Ciara PowerFrom: Kai Ji <[email protected]>
An autotest is added for the new chacha20_poly1305 PMD. A new test case is also added for SGL test.
---
v4:
- This patch is newly created, having been split from the previous patch that adds chacha20_poly1305 PMD.
--- app/test/test_cryptodev.c | 23 ++++ app/test/test_cryptodev.h | 1 + app/test/test_cryptodev_aead_test_vectors.h | 114 ++++++++++++++++++++ doc/guides/rel_notes/release_21_11.rst | 3 + 4 files changed, 141 insertions(+)
app/test/test_cryptodev.c +23 -0
@@ -13998,6 +13998,14 @@ test_chacha20_poly1305_decrypt_test_case_rfc8439(void)return test_authenticated_decryption (&chacha20_poly1305_case_rfc8439); } +static int +test_chacha20_poly1305_encrypt_SGL_out_of_place (void ) +{ +return test_authenticated_encryption_SGL ( + &chacha20_poly1305_case_2,OUT_OF_PLACE ,32 , + chacha20_poly1305_case_2.plaintext.len); +} +#ifdef RTE_CRYPTO_SCHEDULER /* global AESNI worker IDs for the scheduler test */
@@ -14682,6 +14690,8 @@ static struct unit_test_suite cryptodev_chacha20_poly1305_testsuite = { test_chacha20_poly1305_encrypt_test_case_rfc8439),TEST_CASE_ST (ut_setup, ut_teardown, test_chacha20_poly1305_decrypt_test_case_rfc8439), +TEST_CASE_ST (ut_setup, ut_teardown, + test_chacha20_poly1305_encrypt_SGL_out_of_place), TEST_CASES_END() } };
@@ -15264,6 +15274,17 @@ test_cryptodev_cpu_aesni_mb(void)return rc; } +static int +test_cryptodev_chacha_poly_mb (void ) +{ +int32_t rc; +enum rte_security_session_action_type at = gbl_action_type; + rc =run_cryptodev_testsuite ( +RTE_STR (CRYPTODEV_NAME_CHACHA20_POLY1305_PMD )); + gbl_action_type = at; +return rc; +} +static int test_cryptodev_openssl (void ) {
@@ -15523,6 +15544,8 @@ REGISTER_TEST_COMMAND(cryptodev_qat_autotest, test_cryptodev_qat);REGISTER_TEST_COMMAND (cryptodev_aesni_mb_autotest, test_cryptodev_aesni_mb);REGISTER_TEST_COMMAND (cryptodev_cpu_aesni_mb_autotest, test_cryptodev_cpu_aesni_mb); +REGISTER_TEST_COMMAND (cryptodev_chacha_poly_mb_autotest, + test_cryptodev_chacha_poly_mb);REGISTER_TEST_COMMAND (cryptodev_openssl_autotest, test_cryptodev_openssl);REGISTER_TEST_COMMAND (cryptodev_aesni_gcm_autotest, test_cryptodev_aesni_gcm); REGISTER_TEST_COMMAND(cryptodev_cpu_aesni_gcm_autotest,
app/test/test_cryptodev.h +1 -0
@@ -59,6 +59,7 @@#define CRYPTODEV_NAME_SNOW3G_PMD crypto_snow3g#define CRYPTODEV_NAME_KASUMI_PMD crypto_kasumi#define CRYPTODEV_NAME_ZUC_PMD crypto_zuc +#define CRYPTODEV_NAME_CHACHA20_POLY1305_PMD crypto_chacha20_poly1305#define CRYPTODEV_NAME_ARMV8_PMD crypto_armv8#define CRYPTODEV_NAME_DPAA_SEC_PMD crypto_dpaa_sec#define CRYPTODEV_NAME_DPAA2_SEC_PMD crypto_dpaa2_sec
app/test/test_cryptodev_aead_test_vectors.h +114 -0
118 lines not on this page · raw message
doc/guides/rel_notes/release_21_11.rst +3 -0
@@ -111,6 +111,9 @@ New Features * ZUC PMD. * CHACHA20_POLY1305 PMD. + * An autotest was added for the CHACHA20_POLY1305 PMD, + including a new testcase for SGL OOP. + * **Updated the aesni_mb crypto PMD.** * Added support for ZUC-EEA3-256 and ZUC-EIA3-256.
Signature · 1 line
2.25.1
Re: [dpdk-dev] [PATCH v4 14/14] test/crypto: add test for chacha20_poly1305 PMD
Quoted 11 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Friday, October 15, 2021 3:40 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; De Lara Guarch, Pablo <[email protected]>; [email protected]; Ji, Kai <[email protected]>; Power, Ciara <[email protected]>; Doherty, Declan <[email protected]>
Subject: [PATCH v4 14/14] test/crypto: add test forchacha20_poly1305PMD
Quoted 9 lines
From: Kai Ji <[email protected]>
An autotest is added for the new
chacha20_poly1305PMD. A new test case is also added for SGL test.Signed-off-by Kai Ji <[email protected]>Signed-off-by Ciara Power <[email protected]>Acked-by Ray Kinsella <[email protected]>
Re: [dpdk-dev] [EXT] [PATCH v4 00/14] drivers/crypto: introduce ipsec_mb framework
In reply to Ciara PowerQuoted 7 lines
This set of patches introduces a new framework, making all common code of SW crypto PMD implementations built on top of intel-ipsec-mb library sharable. This helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementation specific details into single files located in the
crypto/ipsec_mbfolder.
ACHACHA20_POLY1305SW PMD is added based on this framework.
Quoted 6 lines
Multi-process support for the PMDs is added for intel-ipsec-mb v1.1. The minimum intel-ipsec-mb version required is bumped to 1.0.
ZUC-256 support is added for the
aesni_mbPMD, with relevant tests.v4:
Patches are rebased over TOT of next-crypto
Release notes are updated
Applied to dpdk-next-crypto
Quoted 169 lines
- Renamed general files and functions to remove "_pmd_" and "
rte_".
- Fixed copyright years in many files.
- Fixed some documentation errors.
- Split sections of the PMD files into header files.
- Fixed other small comments left on v3.
- Dropped release note patch from v3, added release notes incrementally throughout the set.
- UpdatedCHACHA20_POLY1305AAD max size forAESNI_MB.
- Removed unnecessary enqueue count variables and calls to enqueue
when
processing ops for SNOW3G, ZUC, KASUMI.
- Removed some unnecessary includes for security headers in PMD files.
- Added call to release queue pairs in the remove function.
- SplitCHACHA20_POLY1305patch into two, (1) PMD addition and
(2) test app changes.
- Added 4 new patches for ZUC-256 support and tests, based on a patch previously sent to the mailing list:
https://urldefense.proofpoint.com/v2/url?u=https-
3A__patchwork.dpdk.org_project_dpdk_patch_20210910164516.807659- 2D1-2Dpablo.de.lara.guarch- 40intel.com_&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=DnL7Si2wl_PRwp Z9TWey3eu68gBzn7DkPwuqhd6WNyo&m=uArCd3xuliTs88F0w- M_dUmWE501xEWXaFNHXmMFeW4&s=H01RcsI-I- lYeayHNmBHCbD0qp5aV2RZlGBVkOhZZu4&e=v3:
- Added multiprocess support for v1.1 of intel-ipsec-mb.
- Fixed some formatting and comments.
- Added detail to some commit logs.
- Updated macros to use intel-ipsec-mb v1.0 supported macros.
- Added use of intel-ipsec-mb API to auto initialiseIMB_MGRbased on CPU vector support.v2:
- Added qp NULL check in get stats function.
- Updated maintainers file.
- Replaced use of strlcpy withrte_strlcpy.
- Fixed enum for GCM key length.
- Updated release notes.
- AddedChacha20_poly1305PMD documentation.Ciara Power (1):
crypto/ipsec_mb: add multiprocess supportFan Zhang (1):
drivers/crypto: introduce IPsec-mb frameworkKai Ji (2):
crypto/ipsec_mb: add chacha20-poly1305 PMD to framework test/crypto: add test forchacha20_poly1305PMDPablo de Lara (4):
crypto/ipsec_mb: support ZUC-256 foraesni_mb
test/crypto: check cipher parameters
test/crypto: check auth parameters
test/crypto: add ZUC-256 vectorsPiotr Bronowski (6):
drivers/crypto: move aesni-mb PMD to IPsec-mb frameworkdrivers/crypto: move aesni-gcm PMD to IPsec-mb frameworkdrivers/crypto: move kasumi PMD to IPsec-mb frameworkdrivers/crypto: move snow3g PMD to IPsec-mb frameworkcrypto/ipsec_mb: add snow3g digest appended ops supportdrivers/crypto: move zuc PMD to IPsec-mb frameworkMAINTAINERS | 41 +- app/test/test_cryptodev.c | 170 ++- app/test/test_cryptodev.h | 1 + app/test/test_cryptodev_aead_test_vectors.h | 114 ++ app/test/test_cryptodev_zuc_test_vectors.h | 286 ++++ doc/guides/cryptodevs/aesni_gcm.rst | 4 +- doc/guides/cryptodevs/aesni_mb.rst | 5 +- doc/guides/cryptodevs/chacha20_poly1305.rst | 99 ++ .../cryptodevs/features/chacha20_poly1305.ini | 35 + doc/guides/cryptodevs/features/snow3g.ini | 1 + doc/guides/cryptodevs/index.rst | 1 + doc/guides/cryptodevs/kasumi.rst | 3 +- doc/guides/cryptodevs/snow3g.rst | 3 +- doc/guides/cryptodevs/zuc.rst | 3 +- doc/guides/rel_notes/release_21_11.rst | 31 + drivers/crypto/aesni_gcm/aesni_gcm_ops.h | 104 -- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 984 ------------- drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c | 333 ----- .../crypto/aesni_gcm/aesni_gcm_pmd_private.h | 123 -- drivers/crypto/aesni_gcm/meson.build | 24 - .../crypto/aesni_mb/aesni_mb_pmd_private.h | 337 ----- drivers/crypto/aesni_mb/meson.build | 25 - drivers/crypto/aesni_mb/version.map | 3 - drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 370 +++++ drivers/crypto/ipsec_mb/ipsec_mb_private.c | 176 +++ drivers/crypto/ipsec_mb/ipsec_mb_private.h | 455 ++++++ drivers/crypto/ipsec_mb/meson.build | 33 + drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 837 +++++++++++ drivers/crypto/ipsec_mb/pmd_aesni_gcm_priv.h | 169 +++ .../pmd_aesni_mb.c} | 1235 +++++++---------- .../pmd_aesni_mb_priv.h} | 681 ++++----- drivers/crypto/ipsec_mb/pmd_chacha_poly.c | 408 ++++++ .../crypto/ipsec_mb/pmd_chacha_poly_priv.h | 74 + drivers/crypto/ipsec_mb/pmd_kasumi.c | 476 +++++++ drivers/crypto/ipsec_mb/pmd_kasumi_priv.h | 81 ++ .../pmd_snow3g.c} | 543 ++++---- drivers/crypto/ipsec_mb/pmd_snow3g_priv.h | 85 ++ drivers/crypto/ipsec_mb/pmd_zuc.c | 403 ++++++ drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 85 ++ .../{aesni_gcm => ipsec_mb}/version.map | 0 drivers/crypto/kasumi/kasumi_pmd_private.h | 81 -- drivers/crypto/kasumi/meson.build | 24 - drivers/crypto/kasumi/rte_kasumi_pmd.c | 642 --------- drivers/crypto/kasumi/rte_kasumi_pmd_ops.c | 316 ----- drivers/crypto/kasumi/version.map | 3 - drivers/crypto/meson.build | 6 +- drivers/crypto/snow3g/meson.build | 24 - drivers/crypto/snow3g/rte_snow3g_pmd_ops.c | 323 ----- drivers/crypto/snow3g/snow3g_pmd_private.h | 84 -- drivers/crypto/snow3g/version.map | 3 - drivers/crypto/zuc/meson.build | 24 - drivers/crypto/zuc/rte_zuc_pmd.c | 583 -------- drivers/crypto/zuc/rte_zuc_pmd_ops.c | 322 ----- drivers/crypto/zuc/version.map | 3 - drivers/crypto/zuc/zuc_pmd_private.h | 83 -- 55 files changed, 5412 insertions(+), 5950 deletions(-) create mode 100644 doc/guides/cryptodevs/chacha20_poly1305.rst create mode 100644 doc/guides/cryptodevs/features/chacha20_poly1305.ini delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_ops.h delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c delete mode 100644 drivers/crypto/aesni_gcm/aesni_gcm_pmd_private.h delete mode 100644 drivers/crypto/aesni_gcm/meson.build delete mode 100644 drivers/crypto/aesni_mb/aesni_mb_pmd_private.h delete mode 100644 drivers/crypto/aesni_mb/meson.build delete mode 100644 drivers/crypto/aesni_mb/version.map create mode 100644 drivers/crypto/ipsec_mb/ipsec_mb_ops.c create mode 100644 drivers/crypto/ipsec_mb/ipsec_mb_private.c create mode 100644 drivers/crypto/ipsec_mb/ipsec_mb_private.h create mode 100644 drivers/crypto/ipsec_mb/meson.build create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm.c create mode 100644 drivers/crypto/ipsec_mb/pmd_aesni_gcm_priv.h rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd.c => ipsec_mb/pmd_aesni_mb.c} (60%) rename drivers/crypto/{aesni_mb/rte_aesni_mb_pmd_ops.c => ipsec_mb/pmd_aesni_mb_priv.h} (55%) create mode 100644 drivers/crypto/ipsec_mb/pmd_chacha_poly.c create mode 100644 drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi.c create mode 100644 drivers/crypto/ipsec_mb/pmd_kasumi_priv.h rename drivers/crypto/{snow3g/rte_snow3g_pmd.c => ipsec_mb/pmd_snow3g.c} (51%) create mode 100644 drivers/crypto/ipsec_mb/pmd_snow3g_priv.h create mode 100644 drivers/crypto/ipsec_mb/pmd_zuc.c create mode 100644 drivers/crypto/ipsec_mb/pmd_zuc_priv.h rename drivers/crypto/{aesni_gcm => ipsec_mb}/version.map (100%) delete mode 100644 drivers/crypto/kasumi/kasumi_pmd_private.h delete mode 100644 drivers/crypto/kasumi/meson.build delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd.c delete mode 100644 drivers/crypto/kasumi/rte_kasumi_pmd_ops.c delete mode 100644 drivers/crypto/kasumi/version.map delete mode 100644 drivers/crypto/snow3g/meson.build delete mode 100644 drivers/crypto/snow3g/rte_snow3g_pmd_ops.c delete mode 100644 drivers/crypto/snow3g/snow3g_pmd_private.h delete mode 100644 drivers/crypto/snow3g/version.map delete mode 100644 drivers/crypto/zuc/meson.build delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd.c delete mode 100644 drivers/crypto/zuc/rte_zuc_pmd_ops.c delete mode 100644 drivers/crypto/zuc/version.map delete mode 100644 drivers/crypto/zuc/zuc_pmd_private.h--
2.25.1
Re: [dpdk-dev] [EXT] [PATCH v4 00/14] drivers/crypto: introduce ipsec_mb framework
18/10/2021 17:21, Akhil Goyal:
Quoted 10 lines
Quoted 10 lines
This set of patches introduces a new framework, making all common code of SW crypto PMD implementations built on top of intel-ipsec-mb library sharable. This helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementation specific details into single files located in the
crypto/ipsec_mbfolder.
ACHACHA20_POLY1305SW PMD is added based on this framework.Multi-process support for the PMDs is added for intel-ipsec-mb v1.1. The minimum intel-ipsec-mb version required is bumped to 1.0.
Quoted 8 lines
Quoted 3 lines
ZUC-256 support is added for the
aesni_mbPMD, with relevant tests.v4:
Acked-by Akhil Goyal <[email protected]>Patches are rebased over TOT of next-crypto
Release notes are updated
Applied to dpdk-next-crypto
I think compilation has not been tested.
You need to update intel-ipsec-mb to v1.0.
Result:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘hash_keys’ may be used uninitialized [-Werror=maybe-uninitialized]/aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag), (_num)))
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 1 of type ‘const void * const*’ to ‘void(const void * const*, const void * const*, const void * const*, const uint32_t *, uint32_t **, const uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
/aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag), (_num)))
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:145:21: note: ‘hash_keys’ declared here
145 | const void *hash_keys[ZUC_MAX_BURST];
| ^~~~~~~~~
In file included from ../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,
from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8,
from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘iv’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void **)hash_keys,
/aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag), (_num)))
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 2 of type ‘const void * const*’ to ‘void(const void * const*, const void * const*, const void * const*, const uint32_t *, uint32_t **, const uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
/aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag), (_num)))
| ^~~~drivers/crypto/ipsec_mb/pmd_zuc.c:144:18: note: ‘iv’ declared here
144 | uint8_t *iv[ZUC_MAX_BURST];
| ^~
In file included from ../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,
from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8,
from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘src’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void **)hash_keys,
/aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag), (_num)))
| ^~~~
../../dpdk/d(const void * const*, const void * const*, const void * const*, const uint32_t *, uint32_t **, const uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void **)hash_keys,
/aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag), (_num)))
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:141:18: note: ‘src’ declared here
141 | uint8_t *src[ZUC_MAX_BURST];
| ^~~
In file included from ../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,
from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8,
from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘length_in_bits’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void **)hash_keys,
/aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag), (_num)))
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 4 of type ‘const uint32_t *’ {aka ‘const unsigned int *’} to ‘void(const void * const*, const void * const*, const void * const*, const uint32_t *, uint32_t **, const uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void **)hash_keys,
/aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag), (_num)))
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:143:18: note: ‘length_in_bits’ declared here
143 | uint32_t length_in_bits[ZUC_MAX_BURST];
| ^~~~~~~~~~~~~~cc1: all warnings being treated as errors
I think I will just drop all these patches from 21.11-rc1.
Not sure I will accept any new revision, given how I am annoyed recently by such bad work in Intel.
Re: [dpdk-dev] [EXT] [PATCH v4 00/14] drivers/crypto: introduce ipsec_mb framework
Quoted 14 lines
18/10/2021 17:21, Akhil Goyal:
Quoted 1 line
Quoted 1 line
This set of patches introduces a new framework, making all common
code of
Quoted 11 lines
Quoted 11 lines
SW crypto PMD implementations built on top of intel-ipsec-mb library sharable. This helps to reduce future effort on the code maintenance and future updates. It also moves all SW PMD implementation specific details into single files located in the
crypto/ipsec_mbfolder.
ACHACHA20_POLY1305SW PMD is added based on this framework.Multi-process support for the PMDs is added for intel-ipsec-mb v1.1. The minimum intel-ipsec-mb version required is bumped to 1.0.
ZUC-256 support is added for the
aesni_mbPMD, with relevant tests.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
v4:
Acked-by Akhil Goyal <[email protected]>Patches are rebased over TOT of next-crypto
Release notes are updated
Applied to dpdk-next-cryptoI think compilation has not been tested.
I am not sure why this is failing at your end,
On my machine, it is getting compiled with intel-ipsec-mb v1.0.
I am double checking compilation for all the individual patches as well. Will inform you once it is completed.
On TOT of next crypto, I did a quick test touched the pmd_zuc.c and it is getting compiled.
cavium@cavium-DT13:~/up/dpdk-next-crypto$ touch drivers/crypto/ipsec_mb/pmd_zuc.c cavium@cavium-DT13:~/up/dpdk-next-crypto$ ./devtools/test-meson-builds.sh ninja: Entering directory `./build-gcc-static' [24/24] Linking target app/test/dpdk-test. ninja: Entering directory `./build-gcc-shared' [8/8] Linking target drivers/librte_crypto_ipsec_mb.so.22.0. ninja: Entering directory `./build-clang-static' [24/24] Linking target app/test/dpdk-test. ninja: Entering directory `./build-clang-shared' [8/8] Linking target drivers/librte_crypto_ipsec_mb.so.22.0. ninja: Entering directory `./build-x86-generic' [9/9] Linking target buildtools/chkincs/chkincs. ninja: Entering directory `./build-x86-mingw' ninja: no work to do.
Quoted 111 lines
You need to update intel-ipsec-mb to v1.0.
Result:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘hash_keys’ may be used uninitialized [-Werror=maybe-uninitialized]/aesni/intel-ipsec-mb/lib/intel- ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 1 of type ‘const void * const*’ to ‘void(const void * const*, const void * const*, const void * const*, constuint32_t*,uint32_t**, const uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’} /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~ drivers/crypto/ipsec_mb/pmd_zuc.c:145:21: note: ‘hash_keys’ declared here 145 | const void *hash_keys[ZUC_MAX_BURST]; | ^~~~~~~~~ In file included from ../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘iv’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 2 of type ‘const void * const*’ to ‘void(const void * const*, const void * const*, const void * const*, constuint32_t*,uint32_t**, const uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’} /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:144:18: note: ‘iv’ declared here
144 |uint8_t*iv[ZUC_MAX_BURST];
| ^~
In file included from../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘src’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~../../dpdk/d(const void * const*, const void * const*, const void * const*, const
uint32_t*,uint32_t**, const uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys,
/aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:141:18: note: ‘src’ declared here
141 |uint8_t*src[ZUC_MAX_BURST];
| ^~~
In file included from../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘length_in_bits’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 4 of type ‘constuint32_t*’ {aka ‘const unsigned int *’} to ‘void(const void * const*, const void * const*, const void * const*, constuint32_t*,uint32_t**, const uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys,
/aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~ drivers/crypto/ipsec_mb/pmd_zuc.c:143:18: note: ‘length_in_bits’ declared here 143 | uint32_t length_in_bits[ZUC_MAX_BURST]; | ^~~~~~~~~~~~~~cc1: all warnings being treated as errors
I think I will just drop all these patches from 21.11-rc1.
Not sure I will accept any new revision, given how I am annoyed recently by such bad work in Intel.
Re: [dpdk-dev] [EXT] [PATCH v4 00/14] drivers/crypto: introduce ipsec_mb framework
Quoted 13 lines
Quoted 6 lines
Quoted 4 lines
Acked-by Akhil Goyal <[email protected]>Patches are rebased over TOT of next-crypto
Release notes are updated
Applied to dpdk-next-cryptoI think compilation has not been tested.
I am not sure why this is failing at your end,
On my machine, it is getting compiled with intel-ipsec-mb v1.0. I am double checking compilation for all the individual patches as well. Will inform you once it is completed.
On TOT of next crypto, I did a quick test touched thepmd_zuc.cand it is getting compiled.
Quoted 18 lines
cavium@cavium-DT13:~/up/dpdk-next-crypto$ touch drivers/crypto/ipsec_mb/pmd_zuc.c cavium@cavium-DT13:~/up/dpdk-next-crypto$ ./devtools/test-meson- builds.sh ninja: Entering directory `./build-gcc-static' [24/24] Linking target app/test/dpdk-test. ninja: Entering directory `./build-gcc-shared' [8/8] Linking target drivers/librte_crypto_ipsec_mb.so.22.0. ninja: Entering directory `./build-clang-static' [24/24] Linking target app/test/dpdk-test. ninja: Entering directory `./build-clang-shared' [8/8] Linking target drivers/librte_crypto_ipsec_mb.so.22.0. ninja: Entering directory `./build-x86-generic' [9/9] Linking target buildtools/chkincs/chkincs. ninja: Entering directory `./build-x86-mingw' ninja: no work to do.Quoted 1 line
You need to update intel-ipsec-mb to v1.0.
I have tried compilation of individual patches as well. It works fine for me. I see that the ipsec_mb is not in content skipped. So my intel-ipsec-mb version is 1.0. Message:
=================
Content Skipped
=================
libs:
drivers:
common/mvep: missing dependency, "libmusdk"
net/af_xdp: missing dependency, "libbpf"
net/ipn3ke: missing dependency, "libfdt"
net/mvneta: missing dependency, "libmusdk"
net/mvpp2: missing dependency, "libmusdk"
net/nfb: missing dependency, "libnfb"
net/pcap: missing dependency, "libpcap"
net/szedata2: missing dependency, "libsze2"
raw/ifpga: missing dependency, "libfdt"
crypto/armv8: missing dependency, "libAArch64crypto"
crypto/mvsam: missing dependency, "libmusdk"I did a rebase -i on the commit below these patches and ran test-meson-build.sh git rebase -i 672c47fc35 --exec=./devtools/test-meson-builds.sh
The compilation is perfect for me.
Quoted 117 lines
Quoted 3 lines
Result:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘hash_keys’ may beused
Quoted 2 lines
uninitialized [-Werror=maybe-uninitialized]/aesni/intel-ipsec-mb/lib/intel- ipsec-mb.h:1444:11: note: in definition of macro
‘IMB_ZUC_EIA3_N_BUFFER’
Quoted 6 lines
1444 | ((_mgr)->eia3_n_buffer((_key), (
_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 1 of type ‘const void * const*’ to ‘void(const void * const*, const void * const*, const void * const*, constuint32_t*,uint32_t**, const uint32_t)’ {aka‘void(const
Quoted 8 lines
void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’} /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:145:21: note: ‘hash_keys’ declaredhere
Quoted 14 lines
145 | const void *hash_keys[ZUC_MAX_BURST]; | ^~~~~~~~~ In file included from ../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘iv’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))Quoted 4 lines
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 2 of type ‘const void * const*’ to ‘void(const void * const*, const void * const*, const void * const*, constuint32_t*,uint32_t**, const uint32_t)’ {aka‘void(const
Quoted 22 lines
void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’} /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:144:18: note: ‘iv’ declared here
144 |uint8_t*iv[ZUC_MAX_BURST];
| ^~
In file included from../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘src’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))Quoted 3 lines
| ^~~~../../dpdk/d(const void * const*, const void * const*, const void * const*, const
uint32_t*,uint32_t**, const uint32_t)’ {aka ‘void(const void *const*,
Quoted 24 lines
const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:141:18: note: ‘src’ declared here
141 |uint8_t*src[ZUC_MAX_BURST];
| ^~~
In file included from../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘length_in_bits’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))Quoted 4 lines
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 4 of type ‘constuint32_t*’ {aka ‘const unsigned int *’} to ‘void(const void * const*, const void * const*, const void * const*, constuint32_t*,uint32_t**,const
Quoted 20 lines
uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~ drivers/crypto/ipsec_mb/pmd_zuc.c:143:18: note: ‘length_in_bits’ declared here 143 | uint32_t length_in_bits[ZUC_MAX_BURST]; | ^~~~~~~~~~~~~~cc1: all warnings being treated as errors
I think I will just drop all these patches from 21.11-rc1.
Not sure I will accept any new revision, given how I am annoyed recently by such bad work in Intel.
Re: [dpdk-dev] [EXT] [PATCH v4 00/14] drivers/crypto: introduce ipsec_mb framework
20/10/2021 10:31, Akhil Goyal:
Quoted 30 lines
Quoted 30 lines
Quoted 6 lines
Quoted 4 lines
Acked-by Akhil Goyal <[email protected]>Patches are rebased over TOT of next-crypto
Release notes are updated
Applied to dpdk-next-cryptoI think compilation has not been tested.
I am not sure why this is failing at your end,
On my machine, it is getting compiled with intel-ipsec-mb v1.0. I am double checking compilation for all the individual patches as well. Will inform you once it is completed.
On TOT of next crypto, I did a quick test touched thepmd_zuc.cand it is getting compiled.cavium@cavium-DT13:~/up/dpdk-next-crypto$ touch drivers/crypto/ipsec_mb/pmd_zuc.c cavium@cavium-DT13:~/up/dpdk-next-crypto$ ./devtools/test-meson- builds.sh ninja: Entering directory `./build-gcc-static' [24/24] Linking target app/test/dpdk-test. ninja: Entering directory `./build-gcc-shared' [8/8] Linking target drivers/librte_crypto_ipsec_mb.so.22.0. ninja: Entering directory `./build-clang-static' [24/24] Linking target app/test/dpdk-test. ninja: Entering directory `./build-clang-shared' [8/8] Linking target drivers/librte_crypto_ipsec_mb.so.22.0. ninja: Entering directory `./build-x86-generic' [9/9] Linking target buildtools/chkincs/chkincs. ninja: Entering directory `./build-x86-mingw' ninja: no work to do.
Quoted 3 lines
Quoted 1 line
Quoted 1 line
You need to update intel-ipsec-mb to v1.0.
I have tried compilation of individual patches as well. It works fine for me. I see that the
ipsec_mbis not in content skipped. So my intel-ipsec-mb version is 1.0.
It may be due to the fact that I play with CFLAGS and don't install the lib. I will check again for next pull.
Re: [dpdk-dev] [EXT] [PATCH v4 00/14] drivers/crypto: introduce ipsec_mb framework
In reply to Akhil GoyalHi Thomas,
As stated in all cryptodev guides for the PMDs based on intel-ipsec-mb, the minimum dependent intel-ipsec-mb lib version is bumped to 1.0.
Could you bump the library version and try again?
Regards,
Fan
Quoted 182 lines
-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Wednesday, October 20, 2021 5:24 AM
To: Thomas Monjalon <[email protected]>; Power, Ciara <[email protected]>; De Lara Guarch, Pablo <[email protected]>; Mcnamara, John <[email protected]>
Cc: [email protected]; Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; [email protected]
Subject: RE: [dpdk-dev] [EXT] [PATCH v4 00/14]drivers/crypto: introduceipsec_mbframeworkQuoted 5 lines
18/10/2021 17:21, Akhil Goyal:
Quoted 1 line
Quoted 1 line
This set of patches introduces a new framework, making all common
code of
Quoted 2 lines
Quoted 2 lines
SW crypto PMD implementations built on top of intel-ipsec-mb library sharable. This helps to reduce future effort on the code maintenance
and
Quoted 1 line
Quoted 1 line
Quoted 1 line
future updates. It also moves all SW PMD implementation specific
details
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
into single files located in the
crypto/ipsec_mbfolder. ACHACHA20_POLY1305SW PMD is added based on this framework.Multi-process support for the PMDs is added for intel-ipsec-mb v1.1. The minimum intel-ipsec-mb version required is bumped to 1.0.
ZUC-256 support is added for the
aesni_mbPMD, with relevant tests.Quoted 8 lines
Quoted 6 lines
Quoted 1 line
v4:
Acked-by Akhil Goyal <[email protected]>Patches are rebased over TOT of next-crypto
Release notes are updated
Applied to dpdk-next-cryptoI think compilation has not been tested.
I am not sure why this is failing at your end,
On my machine, it is getting compiled with intel-ipsec-mb v1.0. I am double checking compilation for all the individual patches as well. Will inform you once it is completed.
On TOT of next crypto, I did a quick test touched thepmd_zuc.cand it is getting compiled.cavium@cavium-DT13:~/up/dpdk-next-crypto$ touch drivers/crypto/ipsec_mb/pmd_zuc.c cavium@cavium-DT13:~/up/dpdk-next-crypto$ ./devtools/test-meson- builds.sh ninja: Entering directory `./build-gcc-static' [24/24] Linking target app/test/dpdk-test. ninja: Entering directory `./build-gcc-shared' [8/8] Linking target drivers/librte_crypto_ipsec_mb.so.22.0. ninja: Entering directory `./build-clang-static' [24/24] Linking target app/test/dpdk-test. ninja: Entering directory `./build-clang-shared' [8/8] Linking target drivers/librte_crypto_ipsec_mb.so.22.0. ninja: Entering directory `./build-x86-generic' [9/9] Linking target buildtools/chkincs/chkincs. ninja: Entering directory `./build-x86-mingw' ninja: no work to do.Quoted 4 lines
You need to update intel-ipsec-mb to v1.0.
Result:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘hash_keys’ may beused
Quoted 2 lines
uninitialized [-Werror=maybe-uninitialized]/aesni/intel-ipsec-mb/lib/intel- ipsec-mb.h:1444:11: note: in definition of macro
‘IMB_ZUC_EIA3_N_BUFFER’
Quoted 5 lines
1444 | ((_mgr)->eia3_n_buffer((_key), (
_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 1 of type ‘const void * const*’ to ‘void(const void * const*, const void * const*,const
Quoted 1 line
void * const*, const
uint32_t*,uint32_t**, const uint32_t)’ {aka‘void(const
Quoted 8 lines
void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’} /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:145:21: note: ‘hash_keys’ declaredhere
Quoted 14 lines
145 | const void *hash_keys[ZUC_MAX_BURST]; | ^~~~~~~~~ In file included from ../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘iv’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))Quoted 3 lines
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 2 of type ‘const void * const*’ to ‘void(const void * const*, const void * const*,const
Quoted 1 line
void * const*, const
uint32_t*,uint32_t**, const uint32_t)’ {aka‘void(const
Quoted 22 lines
void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’} /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:144:18: note: ‘iv’ declared here
144 |uint8_t*iv[ZUC_MAX_BURST];
| ^~
In file included from../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘src’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))Quoted 3 lines
| ^~~~../../dpdk/d(const void * const*, const void * const*, const void * const*, const
uint32_t*,uint32_t**, const uint32_t)’ {aka ‘void(const void *const*,
Quoted 24 lines
const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:141:18: note: ‘src’ declared here
141 |uint8_t*src[ZUC_MAX_BURST];
| ^~~
In file included from../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘length_in_bits’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))Quoted 4 lines
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 4 of type ‘constuint32_t*’ {aka ‘const unsigned int *’} to ‘void(const void * const*, const void * const*, const void * const*, constuint32_t*,uint32_t**,const
Quoted 10 lines
uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:143:18: note: ‘length_in_bits’declared
Quoted 10 lines
here
143 | uint32_t length_in_bits[ZUC_MAX_BURST]; | ^~~~~~~~~~~~~~cc1: all warnings being treated as errors
I think I will just drop all these patches from 21.11-rc1.
Not sure I will accept any new revision, given how I am annoyed recently by such bad work in Intel.
Re: [dpdk-dev] [EXT] [PATCH v4 00/14] drivers/crypto: introduce ipsec_mb framework
Quoted 7 lines
Hi Thomas,
As stated in all cryptodev guides for the PMDs based on intel-ipsec-mb, the minimum dependent intel-ipsec-mb lib version is bumped to 1.0.
Could you bump the library version and try again?
Hi Fan,
The version is bumped.
I downloaded from the zip link https://github.com/01org/intel-ipsec-mb/archive/v1.0.zip
And Thomas pulled it from git.
And when I downloaded from master of https://github.com/intel/intel-ipsec-mb.
With the zip link it worked fine, but not from git. I see there are some differences in the code. Could you check?
Quoted 190 lines
Regards,
FanQuoted 61 lines
-----Original Message-----
From: Akhil Goyal <[email protected]>
Sent: Wednesday, October 20, 2021 5:24 AM
To: Thomas Monjalon <[email protected]>; Power, Ciara <[email protected]>; De Lara Guarch, Pablo <[email protected]>; Mcnamara, John <[email protected]>
Cc: [email protected]; Zhang, Roy Fan <[email protected]>; Bronowski, PiotrX <[email protected]>; [email protected]; [email protected]
Subject: RE: [dpdk-dev] [EXT] [PATCH v4 00/14]drivers/crypto: introduceipsec_mbframeworkQuoted 5 lines
18/10/2021 17:21, Akhil Goyal:
Quoted 1 line
Quoted 1 line
This set of patches introduces a new framework, making all common
code of
Quoted 2 lines
Quoted 2 lines
SW crypto PMD implementations built on top of intel-ipsec-mb library sharable. This helps to reduce future effort on the code maintenance
and
Quoted 1 line
Quoted 1 line
Quoted 1 line
future updates. It also moves all SW PMD implementation specific
details
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
into single files located in the
crypto/ipsec_mbfolder. ACHACHA20_POLY1305SW PMD is added based on this framework.Multi-process support for the PMDs is added for intel-ipsec-mb v1.1. The minimum intel-ipsec-mb version required is bumped to 1.0.
ZUC-256 support is added for the
aesni_mbPMD, with relevant tests.Quoted 8 lines
Quoted 6 lines
Quoted 1 line
v4:
Acked-by Akhil Goyal <[email protected]>Patches are rebased over TOT of next-crypto
Release notes are updated
Applied to dpdk-next-cryptoI think compilation has not been tested.
I am not sure why this is failing at your end,
On my machine, it is getting compiled with intel-ipsec-mb v1.0. I am double checking compilation for all the individual patches as well. Will inform you once it is completed.
On TOT of next crypto, I did a quick test touched thepmd_zuc.cand it is getting compiled.cavium@cavium-DT13:~/up/dpdk-next-crypto$ touch drivers/crypto/ipsec_mb/pmd_zuc.c cavium@cavium-DT13:~/up/dpdk-next-crypto$ ./devtools/test-meson- builds.sh ninja: Entering directory `./build-gcc-static' [24/24] Linking target app/test/dpdk-test. ninja: Entering directory `./build-gcc-shared' [8/8] Linking target drivers/librte_crypto_ipsec_mb.so.22.0. ninja: Entering directory `./build-clang-static' [24/24] Linking target app/test/dpdk-test. ninja: Entering directory `./build-clang-shared' [8/8] Linking target drivers/librte_crypto_ipsec_mb.so.22.0. ninja: Entering directory `./build-x86-generic' [9/9] Linking target buildtools/chkincs/chkincs. ninja: Entering directory `./build-x86-mingw' ninja: no work to do.Quoted 6 lines
Quoted 4 lines
You need to update intel-ipsec-mb to v1.0.
Result:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘hash_keys’ may beused
Quoted 1 line
uninitialized [-Werror=maybe-uninitialized]/aesni/intel-ipsec-
mb/lib/intel-
Quoted 11 lines
Quoted 1 line
ipsec-mb.h:1444:11: note: in definition of macro
‘IMB_ZUC_EIA3_N_BUFFER’
Quoted 5 lines
1444 | ((_mgr)->eia3_n_buffer((_key), (
_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 1 of type ‘const void * const*’ to ‘void(const void * const*, const void * const*,const
Quoted 1 line
void * const*, const
uint32_t*,uint32_t**, const uint32_t)’ {aka‘void(const
Quoted 1 line
void * const*, const void * const*, const void * const*, const unsigned int
*,
Quoted 25 lines
Quoted 7 lines
unsigned int **, const unsigned int)’} /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:145:21: note: ‘hash_keys’ declaredhere
Quoted 14 lines
145 | const void *hash_keys[ZUC_MAX_BURST]; | ^~~~~~~~~ In file included from ../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘iv’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))Quoted 3 lines
| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 2 of type ‘const void * const*’ to ‘void(const void * const*, const void * const*,Quoted 4 lines
const
Quoted 1 line
void * const*, const
uint32_t*,uint32_t**, const uint32_t)’ {aka‘void(const
Quoted 1 line
void * const*, const void * const*, const void * const*, const unsigned int
*,
Quoted 24 lines
Quoted 21 lines
unsigned int **, const unsigned int)’} /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:144:18: note: ‘iv’ declared here
144 |uint8_t*iv[ZUC_MAX_BURST];
| ^~
In file included from../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘src’ may be used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))Quoted 3 lines
| ^~~~../../dpdk/d(const void * const*, const void * const*, const void * const*, const
uint32_t*,uint32_t**, const uint32_t)’ {aka ‘void(const void *Quoted 2 lines
const*,
Quoted 1 line
const void * const*, const void * const*, const unsigned int *, unsigned
int
Quoted 8 lines
Quoted 8 lines
**, const unsigned int)’}
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~Quoted 8 lines
Quoted 8 lines
drivers/crypto/ipsec_mb/pmd_zuc.c:141:18: note: ‘src’ declared here
141 |uint8_t*src[ZUC_MAX_BURST];
| ^~~
In file included from../../dpdk/drivers/crypto/ipsec_mb/ipsec_mb_private.h:8,from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc_priv.h:8, from ../../dpdk/drivers/crypto/ipsec_mb/pmd_zuc.c:5:
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: error: ‘length_in_bits’ maybe
Quoted 33 lines
Quoted 11 lines
used uninitialized [-Werror=maybe-uninitialized]
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:176:33: note: by argument 4 of type ‘constuint32_t*’ {aka ‘const unsigned int *’} to ‘void(const void * const*, const void * const*, const void * const*, constuint32_t*,uint32_t**,const
Quoted 10 lines
uint32_t)’ {aka ‘void(const void * const*, const void * const*, const void * const*, const unsigned int *, unsigned int **, const unsigned int)’}
176 | IMB_ZUC_EIA3_N_BUFFER(qp->mb_mgr, (const void
**)hash_keys, /aesni/intel-ipsec-mb/lib/intel-ipsec-mb.h:1444:11: note: in definition of macro ‘IMB_ZUC_EIA3_N_BUFFER’
1444 | ((_mgr)->eia3_n_buffer((_key), (_iv), (_in), (_len), (_tag),
(_num)))| ^~~~
drivers/crypto/ipsec_mb/pmd_zuc.c:143:18: note: ‘length_in_bits’declared
Quoted 10 lines
here
143 | uint32_t length_in_bits[ZUC_MAX_BURST]; | ^~~~~~~~~~~~~~cc1: all warnings being treated as errors
I think I will just drop all these patches from 21.11-rc1.
Not sure I will accept any new revision, given how I am annoyed recently by such bad work in Intel.