aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/odp_crypto.c
diff options
context:
space:
mode:
authorJanne Peltonen <janne.peltonen@nokia.com>2021-08-25 10:45:18 +0300
committerMatias Elo <matias.elo@nokia.com>2021-08-25 16:54:22 +0300
commitf1a509a5c008d5ed0ecc39732c494480bb2bd732 (patch)
tree05e15fffb5e03e56110bc07a52f30b567fdb083a /platform/linux-dpdk/odp_crypto.c
parent9aec81d8e15798d23c4a090c4cd6067976074866 (diff)
linux-dpdk: crypto: fix disabling of AES-CMAC with aesni-mb driver
AES-CMAC is not included in crypto capabilities when found in aesni-mb but it may still be included because some other crypto device supports it. If aesni-mb device and another device that does support AES-CMAC are present at the same time, then the aesni-mb device may still get selected for a session that uses AES-CMAC. Fix device selection in session creation by excluding AES-CMAC sessions from the aesni-mb device. Fixes: cf4d3329d4a9b53663ee27a904ee88f2cd3f50d8 Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'platform/linux-dpdk/odp_crypto.c')
-rw-r--r--platform/linux-dpdk/odp_crypto.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c
index a5846ef42..b6f2ebefc 100644
--- a/platform/linux-dpdk/odp_crypto.c
+++ b/platform/linux-dpdk/odp_crypto.c
@@ -1216,6 +1216,13 @@ check_auth:
if (cap->op == RTE_CRYPTO_OP_TYPE_UNDEFINED)
continue;
+ /* As a bug workaround, we do not use AES_CMAC with
+ * the aesni-mb crypto driver.
+ */
+ if (auth_xform->auth.algo == RTE_CRYPTO_AUTH_AES_CMAC &&
+ is_dev_aesni_mb(&dev_info))
+ continue;
+
/* As a bug workaround, we do not use AES_XCBC_MAC with
* the aesni-mb crypto driver.
*/