diff options
author | Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> | 2018-06-27 16:31:45 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-07-24 17:09:22 +0300 |
commit | affc79f2a8b6d7e6633002faec81e81eac8098b2 (patch) | |
tree | f83f9f9a15e87bda82c7f6e150a142fc1fc3d38e | |
parent | e92c75b952c404562643dcda9e69e1c9389bf634 (diff) |
linux-dpdk: crypto: report both bit and byte modes for NULL cipher
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
-rw-r--r-- | platform/linux-dpdk/odp_crypto.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/platform/linux-dpdk/odp_crypto.c b/platform/linux-dpdk/odp_crypto.c index 3def66910..8e145e68d 100644 --- a/platform/linux-dpdk/odp_crypto.c +++ b/platform/linux-dpdk/odp_crypto.c @@ -795,7 +795,12 @@ int odp_crypto_cipher_capability(odp_cipher_alg_t cipher, if (cipher == ODP_CIPHER_ALG_NULL) { if (num_copy >= 1) memset(dst, 0, sizeof(odp_crypto_cipher_capability_t)); - return 1; + if (num_copy >= 2) { + memset(&dst[1], 0, + sizeof(odp_crypto_cipher_capability_t)); + dst[1].bit_mode = true; + } + return 2; } if (cipher_is_aead(cipher)) @@ -1021,7 +1026,12 @@ int odp_crypto_auth_capability(odp_auth_alg_t auth, if (auth == ODP_AUTH_ALG_NULL) { if (num_copy >= 1) memset(dst, 0, sizeof(odp_crypto_auth_capability_t)); - return 1; + if (num_copy >= 2) { + memset(&dst[1], 0, + sizeof(odp_crypto_auth_capability_t)); + dst[1].bit_mode = true; + } + return 2; } if (auth_is_aead(auth)) |