aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Peltonen <janne.peltonen@nokia.com>2023-04-28 12:45:21 +0300
committerMatias Elo <matias.elo@nokia.com>2023-05-02 16:15:34 +0300
commit9ca646f007c9989caee2ea27164d359dda8789f5 (patch)
tree5243dad11d814881c5bc23b3b180440e56b6486d
parente82fa57a92d6814c633ee7954d2ad5ecf51042e8 (diff)
linux-dpdk: crypto: re-enable AES-CCM
Re-enable AES-CCM algorithm if supported by the underlying device. Ubuntu Trusty Tahr (14.04) with an unknown DPDK version and crypto device had some problem with it (see 8800ca1e6) but we no longer support Trusty and things seem to work fine with recent SW versions. The openssl crypto device does not accept chained buffers for AES-CCM, so do not pass it such buffers in AES-CCM sessions. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
-rw-r--r--platform/linux-dpdk/odp_crypto.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c
index 236516434..9111f85c1 100644
--- a/platform/linux-dpdk/odp_crypto.c
+++ b/platform/linux-dpdk/odp_crypto.c
@@ -602,13 +602,10 @@ static void capability_process(struct rte_cryptodev_info *dev_info,
ciphers->bit.aes_gcm = 1;
auths->bit.aes_gcm = 1;
}
- /* AES-CCM algorithm produces errors in Ubuntu Trusty,
- * so it is disabled for now
if (cap_aead_algo == RTE_CRYPTO_AEAD_AES_CCM) {
ciphers->bit.aes_ccm = 1;
auths->bit.aes_ccm = 1;
}
- */
#if RTE_VERSION >= RTE_VERSION_NUM(20, 11, 0, 0)
if (cap_aead_algo == RTE_CRYPTO_AEAD_CHACHA20_POLY1305) {
ciphers->bit.chacha20_poly1305 = 1;
@@ -1311,6 +1308,7 @@ static int chained_bufs_ok(const odp_crypto_session_param_t *param,
if (dev_info.driver_name &&
!strcmp(dev_info.driver_name, "crypto_openssl") &&
(param->cipher_alg == ODP_CIPHER_ALG_AES_GCM ||
+ param->cipher_alg == ODP_CIPHER_ALG_AES_CCM ||
param->auth_alg == ODP_AUTH_ALG_AES_GMAC))
chained_bufs_ok = 0;