[dpdk-stable] patch 'cryptodev: fix multi-segment raw vector processing' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:30:14 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3d67f2c1c3f1ea58d87fcccdb673f045d4f67082

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 3d67f2c1c3f1ea58d87fcccdb673f045d4f67082 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh at nxp.com>
Date: Thu, 14 Oct 2021 00:30:21 +0530
Subject: [PATCH] cryptodev: fix multi-segment raw vector processing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 8edcb68fd01b6a1e47549be389335cfef042ea05 ]

If no next segment available the “for” loop will fail and it still
returns i+1 i.e. 2, which is wrong as it has filled only 1 buffer.

Fixes: 7adf992fb9bf ("cryptodev: introduce CPU crypto API")

Signed-off-by: Gagandeep Singh <g.singh at nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 lib/librte_cryptodev/rte_crypto_sym.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index 9d572ec057..406c5c7a5c 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -963,6 +963,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
 			/* whole requested data is completed */
 			vec[i].len = left;
 			left = 0;
+			i++;
 			break;
 		}
 
@@ -972,7 +973,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
 	}
 
 	RTE_ASSERT(left == 0);
-	return i + 1;
+	return i;
 }
 
 
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:07.723070176 +0800
+++ 0130-cryptodev-fix-multi-segment-raw-vector-processing.patch	2021-11-10 14:17:01.890745927 +0800
@@ -1 +1 @@
-From 8edcb68fd01b6a1e47549be389335cfef042ea05 Mon Sep 17 00:00:00 2001
+From 3d67f2c1c3f1ea58d87fcccdb673f045d4f67082 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 8edcb68fd01b6a1e47549be389335cfef042ea05 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
- lib/cryptodev/rte_crypto_sym.h | 3 ++-
+ lib/librte_cryptodev/rte_crypto_sym.h | 3 ++-
@@ -22,5 +24,5 @@
-diff --git a/lib/cryptodev/rte_crypto_sym.h b/lib/cryptodev/rte_crypto_sym.h
-index c907b1646d..daa090b978 100644
---- a/lib/cryptodev/rte_crypto_sym.h
-+++ b/lib/cryptodev/rte_crypto_sym.h
-@@ -990,6 +990,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
+diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
+index 9d572ec057..406c5c7a5c 100644
+--- a/lib/librte_cryptodev/rte_crypto_sym.h
++++ b/lib/librte_cryptodev/rte_crypto_sym.h
+@@ -963,6 +963,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
@@ -34 +36 @@
-@@ -999,7 +1000,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,
+@@ -972,7 +973,7 @@ rte_crypto_mbuf_to_vec(const struct rte_mbuf *mb, uint32_t ofs, uint32_t len,


More information about the stable mailing list