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 <pablo.de.lara.guarch@intel.com> Acked-by: Declan Doherty <declan.doherty@intel.com>
This commit is contained in:
parent
7c95d47c1e
commit
7b3880fdcc
@ -208,7 +208,6 @@ cperf_verify_devices_capabilities(struct cperf_options *opts,
|
|||||||
capability,
|
capability,
|
||||||
opts->auth_key_sz,
|
opts->auth_key_sz,
|
||||||
opts->digest_sz,
|
opts->digest_sz,
|
||||||
0,
|
|
||||||
opts->auth_iv_sz);
|
opts->auth_iv_sz);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -291,6 +291,8 @@ API Changes
|
|||||||
``mempool``, instead of ``device id`` and ``rte_crypto_sym_xform``.
|
``mempool``, instead of ``device id`` and ``rte_crypto_sym_xform``.
|
||||||
* Remove ``device id`` parameter from ``rte_cryptodev_sym_session_free()``.
|
* Remove ``device id`` parameter from ``rte_cryptodev_sym_session_free()``.
|
||||||
* Added new field ``session_pool`` to ``rte_cryptodev_queue_pair_setup()``.
|
* 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
|
ABI Changes
|
||||||
|
@ -56,7 +56,6 @@ static const struct rte_cryptodev_capabilities aesni_gcm_pmd_capabilities[] = {
|
|||||||
.max = 16,
|
.max = 16,
|
||||||
.increment = 4
|
.increment = 4
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = {
|
.iv_size = {
|
||||||
.min = 12,
|
.min = 12,
|
||||||
.max = 12,
|
.max = 12,
|
||||||
|
@ -57,7 +57,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
|
|||||||
.max = 12,
|
.max = 12,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -79,7 +78,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
|
|||||||
.max = 12,
|
.max = 12,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -101,7 +99,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
|
|||||||
.max = 14,
|
.max = 14,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -123,7 +120,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
|
|||||||
.max = 16,
|
.max = 16,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -145,7 +141,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
|
|||||||
.max = 24,
|
.max = 24,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -167,7 +162,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
|
|||||||
.max = 32,
|
.max = 32,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -189,7 +183,6 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
|
|||||||
.max = 12,
|
.max = 12,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
|
@ -59,7 +59,6 @@ static const struct rte_cryptodev_capabilities
|
|||||||
.max = 20,
|
.max = 20,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -81,7 +80,6 @@ static const struct rte_cryptodev_capabilities
|
|||||||
.max = 32,
|
.max = 32,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
|
@ -209,7 +209,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
|
|||||||
.max = 16,
|
.max = 16,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -231,7 +230,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
|
|||||||
.max = 20,
|
.max = 20,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -253,7 +251,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
|
|||||||
.max = 28,
|
.max = 28,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -275,7 +272,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
|
|||||||
.max = 32,
|
.max = 32,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -297,7 +293,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
|
|||||||
.max = 48,
|
.max = 48,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -319,7 +314,6 @@ static const struct rte_cryptodev_capabilities dpaa2_sec_capabilities[] = {
|
|||||||
.max = 64,
|
.max = 64,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
|
@ -60,8 +60,7 @@ static const struct rte_cryptodev_capabilities kasumi_pmd_capabilities[] = {
|
|||||||
.min = 8,
|
.min = 8,
|
||||||
.max = 8,
|
.max = 8,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
}
|
||||||
.aad_size = { 0 }
|
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
},
|
},
|
||||||
|
@ -56,7 +56,6 @@ static const struct rte_cryptodev_capabilities null_crypto_pmd_capabilities[] =
|
|||||||
.max = 0,
|
.max = 0,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, },
|
}, },
|
||||||
}, },
|
}, },
|
||||||
|
@ -57,7 +57,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 16,
|
.max = 16,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -79,7 +78,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 16,
|
.max = 16,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -101,7 +99,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 20,
|
.max = 20,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -123,7 +120,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 20,
|
.max = 20,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -145,7 +141,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 28,
|
.max = 28,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -167,7 +162,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 28,
|
.max = 28,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -189,7 +183,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 32,
|
.max = 32,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -211,7 +204,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 32,
|
.max = 32,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -233,7 +225,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 48,
|
.max = 48,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -255,7 +246,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 48,
|
.max = 48,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -277,7 +267,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 64,
|
.max = 64,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
@ -299,7 +288,6 @@ static const struct rte_cryptodev_capabilities openssl_pmd_capabilities[] = {
|
|||||||
.max = 64,
|
.max = 64,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
},
|
||||||
.aad_size = { 0 },
|
|
||||||
.iv_size = { 0 }
|
.iv_size = { 0 }
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
|
@ -52,7 +52,6 @@
|
|||||||
.max = 20, \
|
.max = 20, \
|
||||||
.increment = 0 \
|
.increment = 0 \
|
||||||
}, \
|
}, \
|
||||||
.aad_size = { 0 }, \
|
|
||||||
.iv_size = { 0 } \
|
.iv_size = { 0 } \
|
||||||
}, } \
|
}, } \
|
||||||
}, } \
|
}, } \
|
||||||
@ -74,7 +73,6 @@
|
|||||||
.max = 28, \
|
.max = 28, \
|
||||||
.increment = 0 \
|
.increment = 0 \
|
||||||
}, \
|
}, \
|
||||||
.aad_size = { 0 }, \
|
|
||||||
.iv_size = { 0 } \
|
.iv_size = { 0 } \
|
||||||
}, } \
|
}, } \
|
||||||
}, } \
|
}, } \
|
||||||
@ -96,7 +94,6 @@
|
|||||||
.max = 32, \
|
.max = 32, \
|
||||||
.increment = 0 \
|
.increment = 0 \
|
||||||
}, \
|
}, \
|
||||||
.aad_size = { 0 }, \
|
|
||||||
.iv_size = { 0 } \
|
.iv_size = { 0 } \
|
||||||
}, } \
|
}, } \
|
||||||
}, } \
|
}, } \
|
||||||
@ -118,7 +115,6 @@
|
|||||||
.max = 48, \
|
.max = 48, \
|
||||||
.increment = 0 \
|
.increment = 0 \
|
||||||
}, \
|
}, \
|
||||||
.aad_size = { 0 }, \
|
|
||||||
.iv_size = { 0 } \
|
.iv_size = { 0 } \
|
||||||
}, } \
|
}, } \
|
||||||
}, } \
|
}, } \
|
||||||
@ -140,7 +136,6 @@
|
|||||||
.max = 64, \
|
.max = 64, \
|
||||||
.increment = 0 \
|
.increment = 0 \
|
||||||
}, \
|
}, \
|
||||||
.aad_size = { 0 }, \
|
|
||||||
.iv_size = { 0 } \
|
.iv_size = { 0 } \
|
||||||
}, } \
|
}, } \
|
||||||
}, } \
|
}, } \
|
||||||
@ -162,7 +157,6 @@
|
|||||||
.max = 16, \
|
.max = 16, \
|
||||||
.increment = 0 \
|
.increment = 0 \
|
||||||
}, \
|
}, \
|
||||||
.aad_size = { 0 }, \
|
|
||||||
.iv_size = { 0 } \
|
.iv_size = { 0 } \
|
||||||
}, } \
|
}, } \
|
||||||
}, } \
|
}, } \
|
||||||
@ -265,8 +259,7 @@
|
|||||||
.min = 16, \
|
.min = 16, \
|
||||||
.max = 16, \
|
.max = 16, \
|
||||||
.increment = 0 \
|
.increment = 0 \
|
||||||
}, \
|
} \
|
||||||
.aad_size = { 0 } \
|
|
||||||
}, } \
|
}, } \
|
||||||
}, } \
|
}, } \
|
||||||
}, \
|
}, \
|
||||||
@ -367,7 +360,6 @@
|
|||||||
.max = 0, \
|
.max = 0, \
|
||||||
.increment = 0 \
|
.increment = 0 \
|
||||||
}, \
|
}, \
|
||||||
.aad_size = { 0 }, \
|
|
||||||
.iv_size = { 0 } \
|
.iv_size = { 0 } \
|
||||||
}, }, \
|
}, }, \
|
||||||
}, }, \
|
}, }, \
|
||||||
@ -433,8 +425,7 @@
|
|||||||
.min = 8, \
|
.min = 8, \
|
||||||
.max = 8, \
|
.max = 8, \
|
||||||
.increment = 0 \
|
.increment = 0 \
|
||||||
}, \
|
} \
|
||||||
.aad_size = { 0 } \
|
|
||||||
}, } \
|
}, } \
|
||||||
}, } \
|
}, } \
|
||||||
}, \
|
}, \
|
||||||
@ -561,8 +552,7 @@
|
|||||||
.min = 16, \
|
.min = 16, \
|
||||||
.max = 16, \
|
.max = 16, \
|
||||||
.increment = 0 \
|
.increment = 0 \
|
||||||
}, \
|
} \
|
||||||
.aad_size = { 0 } \
|
|
||||||
}, } \
|
}, } \
|
||||||
}, } \
|
}, } \
|
||||||
}
|
}
|
||||||
|
@ -60,8 +60,7 @@ static const struct rte_cryptodev_capabilities snow3g_pmd_capabilities[] = {
|
|||||||
.min = 16,
|
.min = 16,
|
||||||
.max = 16,
|
.max = 16,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
}
|
||||||
.aad_size = { 0 }
|
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
},
|
},
|
||||||
|
@ -60,8 +60,7 @@ static const struct rte_cryptodev_capabilities zuc_pmd_capabilities[] = {
|
|||||||
.min = 16,
|
.min = 16,
|
||||||
.max = 16,
|
.max = 16,
|
||||||
.increment = 0
|
.increment = 0
|
||||||
},
|
}
|
||||||
.aad_size = { 0 }
|
|
||||||
}, }
|
}, }
|
||||||
}, }
|
}, }
|
||||||
},
|
},
|
||||||
|
@ -311,8 +311,7 @@ rte_cryptodev_sym_capability_check_cipher(
|
|||||||
int
|
int
|
||||||
rte_cryptodev_sym_capability_check_auth(
|
rte_cryptodev_sym_capability_check_auth(
|
||||||
const struct rte_cryptodev_symmetric_capability *capability,
|
const struct rte_cryptodev_symmetric_capability *capability,
|
||||||
uint16_t key_size, uint16_t digest_size, uint16_t aad_size,
|
uint16_t key_size, uint16_t digest_size, uint16_t iv_size)
|
||||||
uint16_t iv_size)
|
|
||||||
{
|
{
|
||||||
if (param_range_check(key_size, capability->auth.key_size))
|
if (param_range_check(key_size, capability->auth.key_size))
|
||||||
return -1;
|
return -1;
|
||||||
@ -320,9 +319,6 @@ rte_cryptodev_sym_capability_check_auth(
|
|||||||
if (param_range_check(digest_size, capability->auth.digest_size))
|
if (param_range_check(digest_size, capability->auth.digest_size))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (param_range_check(aad_size, capability->auth.aad_size))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (param_range_check(iv_size, capability->auth.iv_size))
|
if (param_range_check(iv_size, capability->auth.iv_size))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -238,7 +238,6 @@ rte_cryptodev_sym_capability_check_cipher(
|
|||||||
* @param capability Description of the symmetric crypto capability.
|
* @param capability Description of the symmetric crypto capability.
|
||||||
* @param key_size Auth key size.
|
* @param key_size Auth key size.
|
||||||
* @param digest_size Auth digest size.
|
* @param digest_size Auth digest size.
|
||||||
* @param aad_size Auth aad size.
|
|
||||||
* @param iv_size Auth initial vector size.
|
* @param iv_size Auth initial vector size.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -248,8 +247,7 @@ rte_cryptodev_sym_capability_check_cipher(
|
|||||||
int
|
int
|
||||||
rte_cryptodev_sym_capability_check_auth(
|
rte_cryptodev_sym_capability_check_auth(
|
||||||
const struct rte_cryptodev_symmetric_capability *capability,
|
const struct rte_cryptodev_symmetric_capability *capability,
|
||||||
uint16_t key_size, uint16_t digest_size, uint16_t aad_size,
|
uint16_t key_size, uint16_t digest_size, uint16_t iv_size);
|
||||||
uint16_t iv_size);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if key, digest, AAD and initial vector sizes are supported
|
* Check if key, digest, AAD and initial vector sizes are supported
|
||||||
|
Loading…
x
Reference in New Issue
Block a user