From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 22E60A05D3 for ; Thu, 25 Apr 2019 17:41:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 19E521B5C4; Thu, 25 Apr 2019 17:41:55 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9EC321B5ED for ; Thu, 25 Apr 2019 17:41:51 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 13B6E86671; Thu, 25 Apr 2019 15:41:51 +0000 (UTC) Received: from rh.redhat.com (unknown [10.36.116.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1D7FB5D9C6; Thu, 25 Apr 2019 15:41:49 +0000 (UTC) From: Kevin Traynor To: Akhil Goyal Cc: dpdk stable Date: Thu, 25 Apr 2019 16:40:18 +0100 Message-Id: <20190425154037.28778-43-ktraynor@redhat.com> In-Reply-To: <20190425154037.28778-1-ktraynor@redhat.com> References: <20190425154037.28778-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 25 Apr 2019 15:41:51 +0000 (UTC) Subject: [dpdk-stable] patch 'crypto/dpaa2_sec: fix offset calculation for GCM' has been queued to LTS release 18.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 --- 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@dpdk.org @@ -20 +21 @@ -index d955ffc45..7e762d4b8 100644 +index 077194b6f..ec3111b29 100644