From: Gagandeep Singh Date: Mon, 8 Apr 2019 08:59:30 +0000 (+0000) Subject: crypto/caam_jr: fix total length in auth only s/g X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3386ca38bdc4c835489ed088e2ea0843e90dc5b6;p=dpdk.git crypto/caam_jr: fix total length in auth only s/g CAAM return wrong digest value in AUTH only sg test case because digest calculated on wrong length of data Fixes: 71dd6b9d44e7 ("crypto/caam_jr: add scatter gather") Cc: stable@dpdk.org Signed-off-by: Gagandeep Singh Acked-by: Akhil Goyal --- diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c index da9e9821e3..5028bd2a4c 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -799,7 +799,7 @@ build_auth_only_sg(struct rte_crypto_op *op, struct caam_jr_session *ses) sg->len = cpu_to_caam32(ses->digest_length); length += ses->digest_length; } else { - length -= ses->digest_length; + sg->len -= ses->digest_length; } /* last element*/