[2/2] crypto/caam_jr: fix total length in AUTH only sg case
Checks
Commit Message
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: g.singh@nxp.com
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
drivers/crypto/caam_jr/caam_jr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: Gagandeep Singh
> Sent: Monday, April 8, 2019 2:30 PM
> To: dev@dpdk.org; Akhil Goyal <akhil.goyal@nxp.com>
> Cc: Gagandeep Singh <G.Singh@nxp.com>
> Subject: [PATCH 2/2] crypto/caam_jr: fix total length in AUTH only sg case
>
> 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: g.singh@nxp.com
>
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
> ---
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -798,7 +798,7 @@ void caam_jr_stats_reset(struct rte_cryptodev *dev)
sg->len = cpu_to_caam32(ses->digest_length);
length += ses->digest_length;
} else {
- length -= ses->digest_length;
+ sg->len -= ses->digest_length;
}
/* last element*/