patch 'crypto/qat: fix out-of-place chain/cipher/auth headers' has been queued to stable release 22.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jun 30 14:25:42 CEST 2025
Hi,
FYI, your patch has been queued to stable release 22.11.9
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/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/96a4318baabd605091d45bb8a9391abfe4f6fbf9
Thanks.
Luca Boccassi
---
>From 96a4318baabd605091d45bb8a9391abfe4f6fbf9 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau at intel.com>
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 <radu.nicolau at intel.com>
Acked-by: Kai Ji <kai.ji at intel.com>
---
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 84d58accc7..989caabf17 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen3.c
@@ -662,16 +662,19 @@ qat_sym_dp_enqueue_auth_jobs_gen3(void *qp_data, uint8_t *drv_ctx,
for (i = 0; i < n; i++) {
struct qat_sym_op_cookie *cookie =
qp->op_cookies[tail >> tx_queue->trailz];
+ int error = 0;
req = (struct icp_qat_fw_la_bulk_req *)(
(uint8_t *)tx_queue->base_addr + tail);
rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
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,
user_data[i], cookie,
@@ -679,7 +682,7 @@ qat_sym_dp_enqueue_auth_jobs_gen3(void *qp_data, uint8_t *drv_ctx,
vec->src_sgl[i].num, NULL, 0);
}
- if (unlikely(data_len < 0))
+ if (unlikely(data_len < 0) || error)
break;
if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) {
null_digest.iova = cookie->digest_null_phys_addr;
diff --git a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
index 52218e5a0a..1ffc4528cf 100644
--- a/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
+++ b/drivers/crypto/qat/dev/qat_crypto_pmd_gen4.c
@@ -409,16 +409,19 @@ qat_sym_dp_enqueue_aead_jobs_gen4(void *qp_data, uint8_t *drv_ctx,
for (i = 0; i < n; i++) {
struct qat_sym_op_cookie *cookie =
qp->op_cookies[tail >> tx_queue->trailz];
+ int error = 0;
req = (struct icp_qat_fw_la_bulk_req *)(
(uint8_t *)tx_queue->base_addr + tail);
rte_mov128((uint8_t *)req, (const uint8_t *)&(ctx->fw_req));
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,
user_data[i], cookie,
@@ -426,7 +429,7 @@ qat_sym_dp_enqueue_aead_jobs_gen4(void *qp_data, uint8_t *drv_ctx,
vec->src_sgl[i].num, NULL, 0);
}
- if (unlikely(data_len < 0))
+ if (unlikely(data_len < 0) || error)
break;
enqueue_one_aead_job_gen4(ctx, req, &vec->iv[i],
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-30 13:21:22.222105725 +0100
+++ 0012-crypto-qat-fix-out-of-place-chain-cipher-auth-header.patch 2025-06-30 13:21:21.751057449 +0100
@@ -1 +1 @@
-From 068acf11cec0597735c9d82c8f4972251c736717 Mon Sep 17 00:00:00 2001
+From 96a4318baabd605091d45bb8a9391abfe4f6fbf9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 068acf11cec0597735c9d82c8f4972251c736717 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 478e766b97..428430882d 100644
+index 84d58accc7..989caabf17 100644
@@ -22 +23 @@
-@@ -643,16 +643,19 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx,
+@@ -662,16 +662,19 @@ qat_sym_dp_enqueue_auth_jobs_gen3(void *qp_data, uint8_t *drv_ctx,
@@ -46 +47 @@
-@@ -660,7 +663,7 @@ qat_sym_dp_enqueue_aead_jobs_gen3(void *qp_data, uint8_t *drv_ctx,
+@@ -679,7 +682,7 @@ qat_sym_dp_enqueue_auth_jobs_gen3(void *qp_data, uint8_t *drv_ctx,
@@ -53,2 +54,2 @@
-
- enqueue_one_aead_job_gen3(ctx, req, &vec->iv[i],
+ if (ctx->qat_hash_alg == ICP_QAT_HW_AUTH_ALGO_NULL) {
+ null_digest.iova = cookie->digest_null_phys_addr;
@@ -56 +57 @@
-index 6a5d6e78b9..638da1a173 100644
+index 52218e5a0a..1ffc4528cf 100644
@@ -59 +60 @@
-@@ -418,16 +418,19 @@ qat_sym_dp_enqueue_aead_jobs_gen4(void *qp_data, uint8_t *drv_ctx,
+@@ -409,16 +409,19 @@ qat_sym_dp_enqueue_aead_jobs_gen4(void *qp_data, uint8_t *drv_ctx,
@@ -83 +84 @@
-@@ -435,7 +438,7 @@ qat_sym_dp_enqueue_aead_jobs_gen4(void *qp_data, uint8_t *drv_ctx,
+@@ -426,7 +429,7 @@ qat_sym_dp_enqueue_aead_jobs_gen4(void *qp_data, uint8_t *drv_ctx,
More information about the stable
mailing list