crypto/ipsec_mb: fix cipher key setting
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Mon, 22 Nov 2021 17:47:29 +0000 (17:47 +0000)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 23 Nov 2021 18:35:59 +0000 (19:35 +0100)
commitb0a37e8cd2ac559202086d88c1761e0b6406b445
treea3c739d9169fea5a6aff5aeb23731db17da07069
parent94220b39773e1f3b3cb37333f91edd094b221590
crypto/ipsec_mb: fix cipher key setting

When authenticating with SNOW3G, KASUMI and ZUC,
the pointers for encryption/decryption keys is not set.
If a cipher algorithm such as AES-CBC is also used,
the application would seg fault.
Hence, these pointers should be set to some value by default.

Command line to replicate the issue:
./build/app/dpdk-test-crypto-perf -l 4,5 -n 6 --vdev="crypto_aesni_mb" -- \
 --devtype="crypto_aesni_mb" --optype=cipher-then-auth --auth-algo \
 snow3g-uia2 --auth-key-sz 16 --auth-iv-sz 16 --digest-sz 4 --silent \
 --total-ops 1000000 --auth-op generate --burst-sz 32 \
 --cipher-algo aes-ctr --cipher-key-sz 16 --cipher-iv-sz 16

Fixes: ae8e085c608d ("crypto/aesni_mb: support KASUMI F8/F9")
Fixes: 6c42e0cf4d12 ("crypto/aesni_mb: support SNOW3G-UEA2/UIA2")
Fixes: fd8df85487c4 ("crypto/aesni_mb: support ZUC-EEA3/EIA3")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
drivers/crypto/ipsec_mb/pmd_aesni_mb.c