From: Arek Kusztal Date: Mon, 12 Oct 2020 19:21:24 +0000 (+0100) Subject: cryptodev: remove algo lists end X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3a6f835b33eeb6defeb29a22ca393097101cccc7;p=dpdk.git cryptodev: remove algo lists end This patch removes enumerators RTE_CRYPTO_CIPHER_LIST_END, RTE_CRYPTO_AUTH_LIST_END, RTE_CRYPTO_AEAD_LIST_END to prevent ABI breakage that may arise when adding new crypto algorithms. Signed-off-by: Arek Kusztal Acked-by: Akhil Goyal --- diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 025c083036..604f198059 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -171,11 +171,6 @@ Deprecation Notices Hence the API will be modified to take two mempool pointers - one for session and one for private data. -* cryptodev: ``RTE_CRYPTO_AEAD_LIST_END`` from ``enum rte_crypto_aead_algorithm``, - ``RTE_CRYPTO_CIPHER_LIST_END`` from ``enum rte_crypto_cipher_algorithm`` and - ``RTE_CRYPTO_AUTH_LIST_END`` from ``enum rte_crypto_auth_algorithm`` - will be removed. - * cryptodev: support for using IV with all sizes is added, J0 still can be used but only when IV length in following structs ``rte_crypto_auth_xform``, ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index 9936760918..4477d25e89 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -359,6 +359,11 @@ API Changes * cryptodev: The structure ``rte_crypto_sym_vec`` is updated to support both cpu_crypto synchrounous operation and asynchronous raw data-path APIs. +* cryptodev: ``RTE_CRYPTO_AEAD_LIST_END`` from ``enum rte_crypto_aead_algorithm``, + ``RTE_CRYPTO_CIPHER_LIST_END`` from ``enum rte_crypto_cipher_algorithm`` and + ``RTE_CRYPTO_AUTH_LIST_END`` from ``enum rte_crypto_auth_algorithm`` + are removed to avoid future ABI breakage while adding new algorithms. + * scheduler: Renamed functions ``rte_cryptodev_scheduler_slave_attach``, ``rte_cryptodev_scheduler_slave_detach`` and ``rte_cryptodev_scheduler_slaves_get`` to diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h index e1f23d303f..9d572ec057 100644 --- a/lib/librte_cryptodev/rte_crypto_sym.h +++ b/lib/librte_cryptodev/rte_crypto_sym.h @@ -105,7 +105,13 @@ union rte_crypto_sym_ofs { } ofs; }; -/** Symmetric Cipher Algorithms */ +/** Symmetric Cipher Algorithms + * + * Note, to avoid ABI breakage across releases + * - LIST_END should not be added to this enum + * - the order of enums should not be changed + * - new algorithms should only be added to the end + */ enum rte_crypto_cipher_algorithm { RTE_CRYPTO_CIPHER_NULL = 1, /**< NULL cipher algorithm. No mode applies to the NULL algorithm. */ @@ -150,15 +156,12 @@ enum rte_crypto_cipher_algorithm { * for m_src and m_dst in the rte_crypto_sym_op must be NULL. */ - RTE_CRYPTO_CIPHER_DES_DOCSISBPI, + RTE_CRYPTO_CIPHER_DES_DOCSISBPI /**< DES algorithm using modes required by * DOCSIS Baseline Privacy Plus Spec. * Chained mbufs are not supported in this mode, i.e. rte_mbuf.next * for m_src and m_dst in the rte_crypto_sym_op must be NULL. */ - - RTE_CRYPTO_CIPHER_LIST_END - }; /** Cipher algorithm name strings */ @@ -264,7 +267,13 @@ struct rte_crypto_cipher_xform { } iv; /**< Initialisation vector parameters */ }; -/** Symmetric Authentication / Hash Algorithms */ +/** Symmetric Authentication / Hash Algorithms + * + * Note, to avoid ABI breakage across releases + * - LIST_END should not be added to this enum + * - the order of enums should not be changed + * - new algorithms should only be added to the end + */ enum rte_crypto_auth_algorithm { RTE_CRYPTO_AUTH_NULL = 1, /**< NULL hash algorithm. */ @@ -330,10 +339,8 @@ enum rte_crypto_auth_algorithm { /**< HMAC using 384 bit SHA3 algorithm. */ RTE_CRYPTO_AUTH_SHA3_512, /**< 512 bit SHA3 algorithm. */ - RTE_CRYPTO_AUTH_SHA3_512_HMAC, + RTE_CRYPTO_AUTH_SHA3_512_HMAC /**< HMAC using 512 bit SHA3 algorithm. */ - - RTE_CRYPTO_AUTH_LIST_END }; /** Authentication algorithm name strings */ @@ -424,15 +431,20 @@ struct rte_crypto_auth_xform { }; -/** Symmetric AEAD Algorithms */ +/** Symmetric AEAD Algorithms + * + * Note, to avoid ABI breakage across releases + * - LIST_END should not be added to this enum + * - the order of enums should not be changed + * - new algorithms should only be added to the end + */ enum rte_crypto_aead_algorithm { RTE_CRYPTO_AEAD_AES_CCM = 1, /**< AES algorithm in CCM mode. */ RTE_CRYPTO_AEAD_AES_GCM, /**< AES algorithm in GCM mode. */ - RTE_CRYPTO_AEAD_CHACHA20_POLY1305, + RTE_CRYPTO_AEAD_CHACHA20_POLY1305 /**< Chacha20 cipher with poly1305 authenticator */ - RTE_CRYPTO_AEAD_LIST_END }; /** AEAD algorithm name strings */