patch 'crypto/ipsec_mb: fix ZUC operation overwrite' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Tue Mar 1 11:41:50 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.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 03/06/22. 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/cfa7703c8e58d2610c8ff87f0247e20cfe03597e

Thanks.

Kevin

---
>From cfa7703c8e58d2610c8ff87f0247e20cfe03597e Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch at intel.com>
Date: Wed, 23 Feb 2022 16:01:15 +0000
Subject: [PATCH] crypto/ipsec_mb: fix ZUC operation overwrite

[ upstream commit 96d0dc2a3cd21d6f392347ae1d2ff3c21e27231a ]

ZUC PMD batches crypto operations depending on their type
(encryption + tag generation, tag verification + decryption, etc),
to allow parallelization.
The array used to store the pointers to these operations was
always the same array provided by dequeue_burst() function,
and it was looping around the same positions (from 0 to ZUC_MAX_BURST - 1).

A new internal array is used to avoid overwriting the pointers
of the array provided by dequeue_burst() function.

Fixes: cf7685d68f00 ("crypto/zuc: add driver for ZUC library")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
---
 drivers/crypto/ipsec_mb/pmd_zuc.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/pmd_zuc.c b/drivers/crypto/ipsec_mb/pmd_zuc.c
index 07cf1462d2..e36c7092d6 100644
--- a/drivers/crypto/ipsec_mb/pmd_zuc.c
+++ b/drivers/crypto/ipsec_mb/pmd_zuc.c
@@ -260,4 +260,5 @@ zuc_pmd_dequeue_burst(void *queue_pair,
 	struct zuc_session *curr_sess;
 	struct zuc_session *sessions[ZUC_MAX_BURST];
+	struct rte_crypto_op *int_c_ops[ZUC_MAX_BURST];
 	enum ipsec_mb_operation prev_zuc_op = IPSEC_MB_OP_NOT_SUPPORTED;
 	enum ipsec_mb_operation curr_zuc_op;
@@ -291,9 +292,9 @@ zuc_pmd_dequeue_burst(void *queue_pair,
 		if (burst_size == 0) {
 			prev_zuc_op = curr_zuc_op;
-			c_ops[0] = curr_c_op;
+			int_c_ops[0] = curr_c_op;
 			sessions[0] = curr_sess;
 			burst_size++;
 		} else if (curr_zuc_op == prev_zuc_op) {
-			c_ops[burst_size] = curr_c_op;
+			int_c_ops[burst_size] = curr_c_op;
 			sessions[burst_size] = curr_sess;
 			burst_size++;
@@ -303,5 +304,5 @@ zuc_pmd_dequeue_burst(void *queue_pair,
 			 */
 			if (burst_size == ZUC_MAX_BURST) {
-				processed_ops = process_ops(c_ops, curr_zuc_op,
+				processed_ops = process_ops(int_c_ops, curr_zuc_op,
 						sessions, qp, burst_size);
 				if (processed_ops < burst_size) {
@@ -317,5 +318,5 @@ zuc_pmd_dequeue_burst(void *queue_pair,
 			 * of the previous type.
 			 */
-			processed_ops = process_ops(c_ops, prev_zuc_op,
+			processed_ops = process_ops(int_c_ops, prev_zuc_op,
 					sessions, qp, burst_size);
 			if (processed_ops < burst_size) {
@@ -327,5 +328,5 @@ zuc_pmd_dequeue_burst(void *queue_pair,
 			prev_zuc_op = curr_zuc_op;
 
-			c_ops[0] = curr_c_op;
+			int_c_ops[0] = curr_c_op;
 			sessions[0] = curr_sess;
 			burst_size++;
@@ -335,5 +336,5 @@ zuc_pmd_dequeue_burst(void *queue_pair,
 	if (burst_size != 0) {
 		/* Process the crypto ops of the last operation type. */
-		processed_ops = process_ops(c_ops, prev_zuc_op,
+		processed_ops = process_ops(int_c_ops, prev_zuc_op,
 				sessions, qp, burst_size);
 	}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-01 10:41:02.257350828 +0000
+++ 0034-crypto-ipsec_mb-fix-ZUC-operation-overwrite.patch	2022-03-01 10:41:01.286244094 +0000
@@ -1 +1 @@
-From 96d0dc2a3cd21d6f392347ae1d2ff3c21e27231a Mon Sep 17 00:00:00 2001
+From cfa7703c8e58d2610c8ff87f0247e20cfe03597e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 96d0dc2a3cd21d6f392347ae1d2ff3c21e27231a ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list