From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8F3F9A0C47 for ; Mon, 26 Jul 2021 15:54:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88574410F5; Mon, 26 Jul 2021 15:54:26 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id C6E70410EE for ; Mon, 26 Jul 2021 15:54:25 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id l11-20020a7bc34b0000b029021f84fcaf75so8259683wmj.1 for ; Mon, 26 Jul 2021 06:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qJOG781gB+RrhjiEgNVxvTsAhICI7W3o75UjnfWJRtw=; b=G8ahc+VOne54oxTFaQum6OkMmt+n2wH4Pu5S0X5MXbJwT1vZ9lnMCD6ovZ0nAgcQHV L1FCkoM522WEPiRanQvLOUfpt6LGrfxQBQvIImuoBmWah+XEKckVu+Ge8HAJBtaXqtcZ 3TqWmhot3Uqf17C5iPy791px764uLaHXag1yYs9Ba2Ky1ENq6PTLGkYWYUQZtVnB9yUj sbLAGSSkCwkaunGoaxa8dveJWtqncLxEBdPvnc7tVcaOuKnBw1UVzuFRrRHy26vBg2b9 zGIN+nvtdpADOmwzWHzJYimmlgnqIkspkKpT1TblonT+OJhKh4E5BPAzZi4Z6zKMvvbI t9WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qJOG781gB+RrhjiEgNVxvTsAhICI7W3o75UjnfWJRtw=; b=HN1V6rSu63oE/DDaC6wBmmqL7FaXFPq/esVcj+XetAqP5ig9QKX9f/5y1AQcQbV4eG 0/H5Xpm/n7Ozc9mHkaNkWHG8xL8VPUYJ6xvho/p6OalsWEETc8uBhrhJu6EbYul32FiA xgIbNGLN1bl08r6T3vXeX69gMZbdS9AQRdn3hBZ58krVn4s8/lJGgxE5luArH5zAihV1 lAskC5CcAuyG6FGVhIJ40D/a5NHuVPaUSxCLty9KaRqDj+XYEmJx3DlGDB/nXtMAK985 8lLRdkTwoiYj46SZZvPv1ZHR3hWr85Wima9x9L3inh0NuTAKLHUxsNsOoB0grP0GFP9v u7NA== X-Gm-Message-State: AOAM532TEea+YMHLAyhtDPjC4LrU1mNxf/TnoSIlQ7JF9SbQSSyC6Q/g ku6IWwd4S8Jo63bZAWLQ7uk= X-Google-Smtp-Source: ABdhPJybYdlc42PFS+p6oMirYS/fhHDXOf2OUp2nZkoMIDH3ACuM6JbBYxFt5Ab2plYmQCIPUZvHkw== X-Received: by 2002:a05:600c:d3:: with SMTP id u19mr4878962wmm.186.1627307665549; Mon, 26 Jul 2021 06:54:25 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id s6sm50421492wrt.45.2021.07.26.06.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 06:54:25 -0700 (PDT) From: luca.boccassi@gmail.com To: Tejasree Kondoj Cc: Akhil Goyal , dpdk stable Date: Mon, 26 Jul 2021 14:52:43 +0100 Message-Id: <20210726135322.149850-20-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210726135322.149850-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> <20210726135322.149850-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'crypto/octeontx2: fix lookaside IPsec IV pointer' has been queued to stable release 20.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/28/21. 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 are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/89d903beb47d8212512379b90bd134a01f12bd52 Thanks. Luca Boccassi --- >From 89d903beb47d8212512379b90bd134a01f12bd52 Mon Sep 17 00:00:00 2001 From: Tejasree Kondoj Date: Fri, 16 Jul 2021 16:14:47 +0530 Subject: [PATCH] crypto/octeontx2: fix lookaside IPsec IV pointer [ upstream commit 48c56b329498589e5b57072616e16a776f2d6579 ] In case of AES-GCM/CCM, nonce/salt comes along with IV, hence can be copied in a single memcpy. This patch fixes the IV copy in lookaside IPsec outbound instruction. Fixes: fab634eb87ca ("crypto/octeontx2: support security session data path") Signed-off-by: Tejasree Kondoj Acked-by: Akhil Goyal --- drivers/crypto/octeontx2/otx2_ipsec_po_ops.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h b/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h index bc702d5c79..ee30131f17 100644 --- a/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h +++ b/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h @@ -61,16 +61,12 @@ process_outb_sa(struct rte_crypto_op *cop, uint32_t dlen, rlen, extend_head, extend_tail; struct rte_crypto_sym_op *sym_op = cop->sym; struct rte_mbuf *m_src = sym_op->m_src; - struct otx2_ipsec_po_sa_ctl *ctl_wrd; struct cpt_request_info *req = NULL; struct otx2_ipsec_po_out_hdr *hdr; - struct otx2_ipsec_po_out_sa *sa; int hdr_len, mdata_len, ret = 0; vq_cmd_word0_t word0; char *mdata, *data; - sa = &sess->out_sa; - ctl_wrd = &sa->ctl; hdr_len = sizeof(*hdr); dlen = rte_pktmbuf_pkt_len(m_src) + hdr_len; @@ -107,14 +103,8 @@ process_outb_sa(struct rte_crypto_op *cop, hdr = (struct otx2_ipsec_po_out_hdr *)rte_pktmbuf_adj(m_src, RTE_ETHER_HDR_LEN); - if (ctl_wrd->enc_type == OTX2_IPSEC_FP_SA_ENC_AES_GCM) { - memcpy(&hdr->iv[0], &sa->iv.gcm.nonce, 4); - memcpy(&hdr->iv[4], rte_crypto_op_ctod_offset(cop, uint8_t *, - sess->iv_offset), sess->iv_length); - } else if (ctl_wrd->auth_type == OTX2_IPSEC_FP_SA_ENC_AES_CBC) { - memcpy(&hdr->iv[0], rte_crypto_op_ctod_offset(cop, uint8_t *, - sess->iv_offset), sess->iv_length); - } + memcpy(&hdr->iv[0], rte_crypto_op_ctod_offset(cop, uint8_t *, + sess->iv_offset), sess->iv_length); /* Prepare CPT instruction */ word0.u64 = sess->ucmd_w0; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-26 13:53:16.908369281 +0100 +++ 0020-crypto-octeontx2-fix-lookaside-IPsec-IV-pointer.patch 2021-07-26 13:53:15.833292286 +0100 @@ -1 +1 @@ -From 48c56b329498589e5b57072616e16a776f2d6579 Mon Sep 17 00:00:00 2001 +From 89d903beb47d8212512379b90bd134a01f12bd52 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 48c56b329498589e5b57072616e16a776f2d6579 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -17,2 +18,2 @@ - drivers/crypto/octeontx2/otx2_ipsec_po_ops.h | 12 ++---------- - 1 file changed, 2 insertions(+), 10 deletions(-) + drivers/crypto/octeontx2/otx2_ipsec_po_ops.h | 14 ++------------ + 1 file changed, 2 insertions(+), 12 deletions(-) @@ -21 +22 @@ -index 58b199f4f3..25ee10f342 100644 +index bc702d5c79..ee30131f17 100644 @@ -24 +25 @@ -@@ -61,7 +61,6 @@ process_outb_sa(struct rte_crypto_op *cop, +@@ -61,16 +61,12 @@ process_outb_sa(struct rte_crypto_op *cop, @@ -31,2 +32,3 @@ - struct otx2_ipsec_po_out_sa *sa; -@@ -70,7 +69,6 @@ process_outb_sa(struct rte_crypto_op *cop, +- struct otx2_ipsec_po_out_sa *sa; + int hdr_len, mdata_len, ret = 0; + vq_cmd_word0_t word0; @@ -35 +37 @@ - sa = &sess->out_sa; +- sa = &sess->out_sa; @@ -40 +42 @@ -@@ -107,14 +105,8 @@ process_outb_sa(struct rte_crypto_op *cop, +@@ -107,14 +103,8 @@ process_outb_sa(struct rte_crypto_op *cop, @@ -48 +50 @@ -- } else if (ctl_wrd->auth_type == OTX2_IPSEC_PO_SA_AUTH_SHA1) { +- } else if (ctl_wrd->auth_type == OTX2_IPSEC_FP_SA_ENC_AES_CBC) {