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 D33E546BAE for ; Fri, 18 Jul 2025 21:37:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CE6B640611; Fri, 18 Jul 2025 21:37:07 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5EEED40611 for ; Fri, 18 Jul 2025 21:37:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752867426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kwOp1x7hFQBO/5p+Szmavev5FtGYnz56CQsim1rLtSs=; b=bz3NKSI+pu4h945kksQxAHB7o3wsCRjWAcnDlVP/AdVZSE6iE/1QjytC5qLdHZ1HwH2P64 fyBFbkp3GY4niQMFuzzM4v6RZDQmnPCr6uiYqpnI+VUKwkiMu/wtXbdWMApHMvsZ4jvdHO P155tAMnE1hQSd1GECayNxSxSdecqN0= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-QQTi0O0FPHKGa-A2R2TrZA-1; Fri, 18 Jul 2025 15:37:04 -0400 X-MC-Unique: QQTi0O0FPHKGa-A2R2TrZA-1 X-Mimecast-MFC-AGG-ID: QQTi0O0FPHKGa-A2R2TrZA_1752867423 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A2F85195FE1E; Fri, 18 Jul 2025 19:37:03 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.40]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 080ED18003FC; Fri, 18 Jul 2025 19:37:01 +0000 (UTC) From: Kevin Traynor To: Radu Nicolau Cc: Kai Ji , dpdk stable Subject: patch 'crypto/qat: fix out-of-place chain/cipher/auth headers' has been queued to stable release 24.11.3 Date: Fri, 18 Jul 2025 20:30:53 +0100 Message-ID: <20250718193247.1008129-119-ktraynor@redhat.com> In-Reply-To: <20250718193247.1008129-1-ktraynor@redhat.com> References: <20250718193247.1008129-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: zaBo5f5mqv4uXsVmmIVzdql40qi4WYYo5iW0sR3i_J4_1752867423 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 Hi, FYI, your patch has been queued to stable release 24.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/23/25. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/18094203969a14dca33e43ac8468ba73a0b52e5f Thanks. Kevin --- >From 18094203969a14dca33e43ac8468ba73a0b52e5f Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Thu, 12 Jun 2025 10:14:14 +0000 Subject: [PATCH] crypto/qat: fix out-of-place chain/cipher/auth headers [ upstream commit 068acf11cec0597735c9d82c8f4972251c736717 ] Extend the original fix to gen3 and gen4 code. Fixes: 317d05f3721c ("crypto/qat: fix out-of-place chain/cipher/auth headers") Signed-off-by: Radu Nicolau Acked-by: Kai Ji --- drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c | 13 ++++++++----- drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c index af664fb9b9..e677fde393 100644 --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c @@ -645,4 +645,5 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx, struct qat_sym_op_cookie *cookie = qp->op_cookies[tail >> tx_queue->trailz]; + int error = 0; req = (struct icp_qat_fw_la_bulk_req *)( @@ -651,8 +652,10 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx, if (vec->dest_sgl) { - data_len = qat_sym_build_req_set_data(req, - user_data[i], cookie, - vec->src_sgl[i].vec, vec->src_sgl[i].num, - vec->dest_sgl[i].vec, vec->dest_sgl[i].num); + data_len = qat_reqs_mid_set(&error, req, cookie, user_data[i], + &vec->src_sgl[i], &vec->dest_sgl[i], ofs); + /* In oop there is no offset, src/dst addresses are moved + * to avoid overwriting the dst header + */ + ofs.ofs.cipher.head = 0; } else { data_len = qat_sym_build_req_set_data(req, @@ -662,5 +665,5 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx, } - if (unlikely(data_len < 0)) + if (unlikely(data_len < 0) || error) break; diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c index 6a5d6e78b9..638da1a173 100644 --- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c +++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c @@ -419,4 +419,5 @@ qat_sym_dp_enqueue_aead_jobs_gen4(void *qp_data, uint8_t *drv_ctx, struct qat_sym_op_cookie *cookie = qp->op_cookies[tail >> tx_queue->trailz]; + int error = 0; req = (struct icp_qat_fw_la_bulk_req *)( @@ -425,8 +426,10 @@ qat_sym_dp_enqueue_aead_jobs_gen4(void *qp_data, uint8_t *drv_ctx, if (vec->dest_sgl) { - data_len = qat_sym_build_req_set_data(req, - user_data[i], cookie, - vec->src_sgl[i].vec, vec->src_sgl[i].num, - vec->dest_sgl[i].vec, vec->dest_sgl[i].num); + data_len = qat_reqs_mid_set(&error, req, cookie, user_data[i], + &vec->src_sgl[i], &vec->dest_sgl[i], ofs); + /* In oop there is no offset, src/dst addresses are moved + * to avoid overwriting the dst header + */ + ofs.ofs.cipher.head = 0; } else { data_len = qat_sym_build_req_set_data(req, @@ -436,5 +439,5 @@ qat_sym_dp_enqueue_aead_jobs_gen4(void *qp_data, uint8_t *drv_ctx, } - if (unlikely(data_len < 0)) + if (unlikely(data_len < 0) || error) break; -- 2.50.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-07-18 20:29:15.161866260 +0100 +++ 0119-crypto-qat-fix-out-of-place-chain-cipher-auth-header.patch 2025-07-18 20:29:11.058907723 +0100 @@ -1 +1 @@ -From 068acf11cec0597735c9d82c8f4972251c736717 Mon Sep 17 00:00:00 2001 +From 18094203969a14dca33e43ac8468ba73a0b52e5f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 068acf11cec0597735c9d82c8f4972251c736717 ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 478e766b97..428430882d 100644 +index af664fb9b9..e677fde393 100644 @@ -22 +23 @@ -@@ -644,4 +644,5 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx, +@@ -645,4 +645,5 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx, @@ -28 +29 @@ -@@ -650,8 +651,10 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx, +@@ -651,8 +652,10 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx, @@ -43 +44 @@ -@@ -661,5 +664,5 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx, +@@ -662,5 +665,5 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx,