[dpdk-stable] patch 'crypto/dpaa2_sec: fix offset calculation for GCM' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Thu Apr 25 17:40:18 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/01/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches can be viewed on the 18.11 branch at:
	https://github.com/kevintraynor/dpdk-stable-queue.git

Thanks.

Kevin Traynor

---
>From 783d160c0a4016253f03a444fae63e5af4a232e9 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal at nxp.com>
Date: Wed, 27 Mar 2019 11:53:32 +0000
Subject: [PATCH] crypto/dpaa2_sec: fix offset calculation for GCM

[ upstream commit a5e05ab6431802f87b27a656d983226b86c307d7 ]

In case of gcm, output buffer should have aad space
before the actual buffer which needs to be written.
CAAM will not write into the aad anything, it will skip
auth_only_len (aad) and write the buffer afterwards.

Fixes: 37f96eb01bce ("crypto/dpaa2_sec: support scatter gather")

Signed-off-by: Akhil Goyal <akhil.goyal at nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 077194b6f..ec3111b29 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -237,6 +237,6 @@ build_authenc_gcm_sg_fd(dpaa2_sec_session *sess,
 	/* Configure Output SGE for Encap/Decap */
 	DPAA2_SET_FLE_ADDR(sge, DPAA2_MBUF_VADDR_TO_IOVA(mbuf));
-	DPAA2_SET_FLE_OFFSET(sge, mbuf->data_off + sym_op->aead.data.offset -
-								auth_only_len);
+	DPAA2_SET_FLE_OFFSET(sge, mbuf->data_off +
+			RTE_ALIGN_CEIL(auth_only_len, 16) - auth_only_len);
 	sge->length = mbuf->data_len - sym_op->aead.data.offset + auth_only_len;
 
@@ -401,6 +401,6 @@ build_authenc_gcm_fd(dpaa2_sec_session *sess,
 	/* Configure Output SGE for Encap/Decap */
 	DPAA2_SET_FLE_ADDR(sge, DPAA2_MBUF_VADDR_TO_IOVA(dst));
-	DPAA2_SET_FLE_OFFSET(sge, sym_op->aead.data.offset +
-				dst->data_off - auth_only_len);
+	DPAA2_SET_FLE_OFFSET(sge, dst->data_off +
+			RTE_ALIGN_CEIL(auth_only_len, 16) - auth_only_len);
 	sge->length = sym_op->aead.data.length + auth_only_len;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-25 16:37:48.603947142 +0100
+++ 0043-crypto-dpaa2_sec-fix-offset-calculation-for-GCM.patch	2019-04-25 16:37:46.756294697 +0100
@@ -1 +1 @@
-From a5e05ab6431802f87b27a656d983226b86c307d7 Mon Sep 17 00:00:00 2001
+From 783d160c0a4016253f03a444fae63e5af4a232e9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a5e05ab6431802f87b27a656d983226b86c307d7 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index d955ffc45..7e762d4b8 100644
+index 077194b6f..ec3111b29 100644


More information about the stable mailing list