From: Pablo de Lara Date: Tue, 11 Jul 2017 06:30:43 +0000 (+0100) Subject: cryptodev: remove AAD size in auth capabilities X-Git-Tag: spdx-start~2407 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7b3880fdcc65329ecb1acf2ed87e4ab708435587;p=dpdk.git cryptodev: remove AAD size in auth capabilities Additional Authenticated Data (AAD) was removed from the authentication parameters, but still the supported size was part of the authentication capabilities of a PMD. Fixes: 4428eda8bb75 ("cryptodev: remove AAD from authentication structure") Signed-off-by: Pablo de Lara Acked-by: Declan Doherty --- diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index 51345ea813..99f5d3e0b0 100644 --- a/app/test-crypto-perf/main.c +++ b/app/test-crypto-perf/main.c @@ -208,7 +208,6 @@ cperf_verify_devices_capabilities(struct cperf_options *opts, capability, opts->auth_key_sz, opts->digest_sz, - 0, opts->auth_iv_sz); if (ret != 0) return ret; diff --git a/doc/guides/rel_notes/release_17_08.rst b/doc/guides/rel_notes/release_17_08.rst index ef51ebbe87..6f3b662ca1 100644 --- a/doc/guides/rel_notes/release_17_08.rst +++ b/doc/guides/rel_notes/release_17_08.rst @@ -291,6 +291,8 @@ API Changes ``mempool``, instead of ``device id`` and ``rte_crypto_sym_xform``. * Remove ``device id`` parameter from ``rte_cryptodev_sym_session_free()``. * Added new field ``session_pool`` to ``rte_cryptodev_queue_pair_setup()``. + * Removed ``aad_size`` parameter from ``rte_cryptodev_sym_capability_check_auth()``. + * Added ``iv_size`` parameter to ``rte_cryptodev_sym_capability_check_auth()``. ABI Changes diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c index 6d24a32dbf..af107a5215 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd_ops.c @@ -56,7 +56,6 @@ static const struct rte_cryptodev_capabilities aesni_gcm_pmd_capabilities[] = { .max = 16, .increment = 4 }, - .aad_size = { 0 }, .iv_size = { .min = 12, .max = 12, diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c index e3a6ef5edd..d033408b5c 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c @@ -57,7 +57,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .max = 12, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -79,7 +78,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .max = 12, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -101,7 +99,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .max = 14, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -123,7 +120,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .max = 16, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -145,7 +141,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .max = 24, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -167,7 +162,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .max = 32, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -189,7 +183,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = { .max = 12, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } diff --git a/drivers/crypto/armv8/rte_armv8_pmd_ops.c b/drivers/crypto/armv8/rte_armv8_pmd_ops.c index 05a7703b44..cc77d406d7 100644 --- a/drivers/crypto/armv8/rte_armv8_pmd_ops.c +++ b/drivers/crypto/armv8/rte_armv8_pmd_ops.c @@ -59,7 +59,6 @@ static const struct rte_cryptodev_capabilities .max = 20, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -81,7 +80,6 @@ static const struct rte_cryptodev_capabilities .max = 32, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h index eafa0eb56c..e104f714b6 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_priv.h @@ -209,7 +209,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .max = 16, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -231,7 +230,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .max = 20, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -253,7 +251,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .max = 28, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -275,7 +272,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .max = 32, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -297,7 +293,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .max = 48, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -319,7 +314,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = { .max = 64, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c index 1d9c0fc7c9..e92ccbd7c8 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd_ops.c @@ -60,8 +60,7 @@ static const struct rte_cryptodev_capabilities kasumi_pmd_capabilities[] = { .min = 8, .max = 8, .increment = 0 - }, - .aad_size = { 0 } + } }, } }, } }, diff --git a/drivers/crypto/null/null_crypto_pmd_ops.c b/drivers/crypto/null/null_crypto_pmd_ops.c index c618e6b3de..13e7a19133 100644 --- a/drivers/crypto/null/null_crypto_pmd_ops.c +++ b/drivers/crypto/null/null_crypto_pmd_ops.c @@ -56,7 +56,6 @@ static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] = .max = 0, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, }, }, }, diff --git a/drivers/crypto/openssl/rte_openssl_pmd_ops.c b/drivers/crypto/openssl/rte_openssl_pmd_ops.c index 1db4d14176..ae367ace1d 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd_ops.c +++ b/drivers/crypto/openssl/rte_openssl_pmd_ops.c @@ -57,7 +57,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 16, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -79,7 +78,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 16, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -101,7 +99,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 20, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -123,7 +120,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 20, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -145,7 +141,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 28, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -167,7 +162,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 28, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -189,7 +183,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 32, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -211,7 +204,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 32, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -233,7 +225,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 48, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -255,7 +246,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 48, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -277,7 +267,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 64, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } @@ -299,7 +288,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = { .max = 64, .increment = 0 }, - .aad_size = { 0 }, .iv_size = { 0 } }, } }, } diff --git a/drivers/crypto/qat/qat_crypto_capabilities.h b/drivers/crypto/qat/qat_crypto_capabilities.h index fee8ee1770..16b2c11db2 100644 --- a/drivers/crypto/qat/qat_crypto_capabilities.h +++ b/drivers/crypto/qat/qat_crypto_capabilities.h @@ -52,7 +52,6 @@ .max = 20, \ .increment = 0 \ }, \ - .aad_size = { 0 }, \ .iv_size = { 0 } \ }, } \ }, } \ @@ -74,7 +73,6 @@ .max = 28, \ .increment = 0 \ }, \ - .aad_size = { 0 }, \ .iv_size = { 0 } \ }, } \ }, } \ @@ -96,7 +94,6 @@ .max = 32, \ .increment = 0 \ }, \ - .aad_size = { 0 }, \ .iv_size = { 0 } \ }, } \ }, } \ @@ -118,7 +115,6 @@ .max = 48, \ .increment = 0 \ }, \ - .aad_size = { 0 }, \ .iv_size = { 0 } \ }, } \ }, } \ @@ -140,7 +136,6 @@ .max = 64, \ .increment = 0 \ }, \ - .aad_size = { 0 }, \ .iv_size = { 0 } \ }, } \ }, } \ @@ -162,7 +157,6 @@ .max = 16, \ .increment = 0 \ }, \ - .aad_size = { 0 }, \ .iv_size = { 0 } \ }, } \ }, } \ @@ -265,8 +259,7 @@ .min = 16, \ .max = 16, \ .increment = 0 \ - }, \ - .aad_size = { 0 } \ + } \ }, } \ }, } \ }, \ @@ -367,7 +360,6 @@ .max = 0, \ .increment = 0 \ }, \ - .aad_size = { 0 }, \ .iv_size = { 0 } \ }, }, \ }, }, \ @@ -433,8 +425,7 @@ .min = 8, \ .max = 8, \ .increment = 0 \ - }, \ - .aad_size = { 0 } \ + } \ }, } \ }, } \ }, \ @@ -561,8 +552,7 @@ .min = 16, \ .max = 16, \ .increment = 0 \ - }, \ - .aad_size = { 0 } \ + } \ }, } \ }, } \ } diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c index 108f251d6f..62ba3a664b 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c @@ -60,8 +60,7 @@ static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = { .min = 16, .max = 16, .increment = 0 - }, - .aad_size = { 0 } + } }, } }, } }, diff --git a/drivers/crypto/zuc/rte_zuc_pmd_ops.c b/drivers/crypto/zuc/rte_zuc_pmd_ops.c index 7cb3f1ca4a..7624e679db 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd_ops.c +++ b/drivers/crypto/zuc/rte_zuc_pmd_ops.c @@ -60,8 +60,7 @@ static const struct rte_cryptodev_capabilities zuc_pmd_capabilities[] = { .min = 16, .max = 16, .increment = 0 - }, - .aad_size = { 0 } + } }, } }, } }, diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c index 8ee5d47a9b..bdea2676ef 100644 --- a/lib/librte_cryptodev/rte_cryptodev.c +++ b/lib/librte_cryptodev/rte_cryptodev.c @@ -311,8 +311,7 @@ rte_cryptodev_sym_capability_check_cipher( int rte_cryptodev_sym_capability_check_auth( const struct rte_cryptodev_symmetric_capability *capability, - uint16_t key_size, uint16_t digest_size, uint16_t aad_size, - uint16_t iv_size) + uint16_t key_size, uint16_t digest_size, uint16_t iv_size) { if (param_range_check(key_size, capability->auth.key_size)) return -1; @@ -320,9 +319,6 @@ rte_cryptodev_sym_capability_check_auth( if (param_range_check(digest_size, capability->auth.digest_size)) return -1; - if (param_range_check(aad_size, capability->auth.aad_size)) - return -1; - if (param_range_check(iv_size, capability->auth.iv_size)) return -1; diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h index 1d975e5f93..756c00bbbc 100644 --- a/lib/librte_cryptodev/rte_cryptodev.h +++ b/lib/librte_cryptodev/rte_cryptodev.h @@ -238,7 +238,6 @@ rte_cryptodev_sym_capability_check_cipher( * @param capability Description of the symmetric crypto capability. * @param key_size Auth key size. * @param digest_size Auth digest size. - * @param aad_size Auth aad size. * @param iv_size Auth initial vector size. * * @return @@ -248,8 +247,7 @@ rte_cryptodev_sym_capability_check_cipher( int rte_cryptodev_sym_capability_check_auth( const struct rte_cryptodev_symmetric_capability *capability, - uint16_t key_size, uint16_t digest_size, uint16_t aad_size, - uint16_t iv_size); + uint16_t key_size, uint16_t digest_size, uint16_t iv_size); /** * Check if key, digest, AAD and initial vector sizes are supported