From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 51BCF1B3B5 for ; Thu, 7 Feb 2019 14:28:47 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B3A83811A9; Thu, 7 Feb 2019 13:28:46 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.33.36.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0181600C4; Thu, 7 Feb 2019 13:28:45 +0000 (UTC) From: Kevin Traynor To: Fiona Trahe Cc: Arek Kusztal , dpdk stable Date: Thu, 7 Feb 2019 13:26:10 +0000 Message-Id: <20190207132614.20538-64-ktraynor@redhat.com> In-Reply-To: <20190207132614.20538-1-ktraynor@redhat.com> References: <20190207132614.20538-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 07 Feb 2019 13:28:46 +0000 (UTC) Subject: [dpdk-stable] patch 'crypto/qat: fix digest in wireless auth case' has been queued to LTS release 18.11.1 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: , X-List-Received-Date: Thu, 07 Feb 2019 13:28:47 -0000 Hi, FYI, your patch has been queued to LTS release 18.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/14/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. Thanks. Kevin Traynor --- >>From 74baa223799b27e26347f1949a5509d0b061c5fe Mon Sep 17 00:00:00 2001 From: Fiona Trahe Date: Fri, 25 Jan 2019 16:59:00 +0000 Subject: [PATCH] crypto/qat: fix digest in wireless auth case [ upstream commit 89da5e006f23dd4ef29b55f5b29a239297eb2f9c ] When operation calls for auth (digest generation), followed by encryption of both data plus digest, the digest-in-buffer flag must be set for QAT. Fixes: 39e0bee48e81 ("crypto/qat: rework request builder for performance") Signed-off-by: Fiona Trahe Acked-by: Arek Kusztal --- drivers/crypto/qat/qat_sym.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c index 10cdf2e10..8801ca567 100644 --- a/drivers/crypto/qat/qat_sym.c +++ b/drivers/crypto/qat/qat_sym.c @@ -158,4 +158,5 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, uint64_t src_buf_start = 0, dst_buf_start = 0; uint8_t do_sgl = 0; + uint8_t wireless_auth = 0, in_place = 1; struct rte_crypto_op *op = (struct rte_crypto_op *)in_op; struct qat_sym_op_cookie *cookie = @@ -270,4 +271,5 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, auth_ofs = op->sym->auth.data.offset >> 3; auth_len = op->sym->auth.data.length >> 3; + wireless_auth = 1; auth_param->u1.aad_adr = @@ -439,4 +441,5 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, * so as not to overwrite data in dest buffer */ + in_place = 0; src_buf_start = rte_pktmbuf_iova_offset(op->sym->m_src, min_ofs); @@ -531,4 +534,16 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg, qat_req->comn_mid.src_data_addr = src_buf_start; qat_req->comn_mid.dest_data_addr = dst_buf_start; + /* handle case of auth-gen-then-cipher with digest encrypted */ + if (wireless_auth && in_place && + (op->sym->auth.digest.phys_addr == + src_buf_start + auth_ofs + auth_len) && + (auth_ofs + auth_len + ctx->digest_length <= + cipher_ofs + cipher_len)) { + struct icp_qat_fw_comn_req_hdr *header = + &qat_req->comn_hdr; + ICP_QAT_FW_LA_DIGEST_IN_BUFFER_SET( + header->serv_specif_flags, + ICP_QAT_FW_LA_DIGEST_IN_BUFFER); + } } -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-02-07 13:19:57.113403941 +0000 +++ 0064-crypto-qat-fix-digest-in-wireless-auth-case.patch 2019-02-07 13:19:55.000000000 +0000 @@ -1,14 +1,15 @@ -From 89da5e006f23dd4ef29b55f5b29a239297eb2f9c Mon Sep 17 00:00:00 2001 +From 74baa223799b27e26347f1949a5509d0b061c5fe Mon Sep 17 00:00:00 2001 From: Fiona Trahe Date: Fri, 25 Jan 2019 16:59:00 +0000 Subject: [PATCH] crypto/qat: fix digest in wireless auth case +[ upstream commit 89da5e006f23dd4ef29b55f5b29a239297eb2f9c ] + When operation calls for auth (digest generation), followed by encryption of both data plus digest, the digest-in-buffer flag must be set for QAT. Fixes: 39e0bee48e81 ("crypto/qat: rework request builder for performance") -Cc: stable@dpdk.org Signed-off-by: Fiona Trahe Acked-by: Arek Kusztal