DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gagandeep Singh <G.Singh@nxp.com>
To: "dev@dpdk.org" <dev@dpdk.org>, Akhil Goyal <akhil.goyal@nxp.com>
Cc: Gagandeep Singh <G.Singh@nxp.com>
Subject: [dpdk-dev] [PATCH 2/2] crypto/caam_jr: fix total length in AUTH only sg case
Date: Mon, 8 Apr 2019 08:59:30 +0000	[thread overview]
Message-ID: <1554736925-13184-2-git-send-email-g.singh@nxp.com> (raw)
Message-ID: <20190408085930.Lg_jhVDfgWUjgr4bHzLOeGoNcbKM8OYVdkyXXaJLSjE@z> (raw)
In-Reply-To: <1554736925-13184-1-git-send-email-g.singh@nxp.com>

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(-)

diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 20452e3..efc69b6 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -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*/
-- 
1.9.1


  parent reply	other threads:[~2019-04-08  8:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08  8:59 [dpdk-dev] [PATCH 1/2] crypto/caam_jr: fix the shared desc endianness Gagandeep Singh
2019-04-08  8:59 ` Gagandeep Singh
2019-04-08  8:59 ` Gagandeep Singh [this message]
2019-04-08  8:59   ` [dpdk-dev] [PATCH 2/2] crypto/caam_jr: fix total length in AUTH only sg case Gagandeep Singh
2019-04-09 14:06   ` Akhil Goyal
2019-04-09 14:06     ` Akhil Goyal
2019-04-09 14:17 ` [dpdk-dev] [PATCH 1/2] crypto/caam_jr: fix the shared desc endianness Akhil Goyal
2019-04-09 14:17   ` Akhil Goyal
2019-04-16 14:51   ` Akhil Goyal
2019-04-16 14:51     ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1554736925-13184-2-git-send-email-g.singh@nxp.com \
    --to=g.singh@nxp.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).