[03/10] crypto/dpaa_sec: fix to check for aead as well

Message ID 20191011163233.31017-4-hemant.agrawal@nxp.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series NXP DPAAx crypto fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Hemant Agrawal Oct. 11, 2019, 4:32 p.m. UTC
  From: Vakul Garg <vakul.garg@nxp.com>

The code shall also check aead as non auth-cipher case

Fixes: 1f14d500bce1 ("crypto/dpaa_sec: support IPsec protocol offload")
Cc: stable@dpdk.org

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 38cfdd378..e89cbcefb 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -266,7 +266,8 @@  static inline int is_auth_cipher(dpaa_sec_session *ses)
 	return ((ses->cipher_alg != RTE_CRYPTO_CIPHER_NULL) &&
 		(ses->auth_alg != RTE_CRYPTO_AUTH_NULL) &&
 		(ses->proto_alg != RTE_SECURITY_PROTOCOL_PDCP) &&
-		(ses->proto_alg != RTE_SECURITY_PROTOCOL_IPSEC));
+		(ses->proto_alg != RTE_SECURITY_PROTOCOL_IPSEC) &&
+		(ses->aead_alg == 0));
 }
 
 static inline int is_proto_ipsec(dpaa_sec_session *ses)