[dpdk-stable] patch 'common/cpt: fix component for empty IOV buffer' has been queued to LTS release 18.11.7

Kevin Traynor ktraynor at redhat.com
Fri Feb 14 18:03:34 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.7

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/20/20. 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-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/0059d95c55496ccc64cfe8d2d7b8c9ba35ee3b00

Thanks.

Kevin.

---
>From 0059d95c55496ccc64cfe8d2d7b8c9ba35ee3b00 Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana at marvell.com>
Date: Wed, 5 Feb 2020 18:46:17 +0530
Subject: [PATCH] common/cpt: fix component for empty IOV buffer

[ upstream commit 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 ]

fill_sg_comp_from_iov() prepares gather components for i/p IOV
buffers and extra buf. This API is failing to create a gather component
for extra_buf when IOV buf len is zero. Though there is enough space
to accommodate extra_buf, because of pre-decrementing of extra_buf
length from aggregate size, this issue is seen.

Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption")

Signed-off-by: Archana Muniganti <marchana at marvell.com>
Signed-off-by: Anoob Joseph <anoobj at marvell.com>
---
 drivers/common/cpt/cpt_ucode.h | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 67f19bd379..f47c96d934 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -378,5 +378,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 	int32_t j;
 	uint32_t extra_len = extra_buf ? extra_buf->size : 0;
-	uint32_t size = *psize - extra_len;
+	uint32_t size = *psize;
 	buf_ptr_t *bufs;
 
@@ -387,7 +387,4 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 		sg_comp_t *to = &list[i >> 2];
 
-		if (!bufs[j].size)
-			continue;
-
 		if (unlikely(from_offset)) {
 			if (from_offset >= bufs[j].size) {
@@ -421,4 +418,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 			}
 
+			extra_len = RTE_MIN(extra_len, size);
 			/* Insert extra data ptr */
 			if (extra_len) {
@@ -426,11 +424,11 @@ fill_sg_comp_from_iov(sg_comp_t *list,
 				to = &list[i >> 2];
 				to->u.s.len[i % 4] =
-					rte_cpu_to_be_16(extra_buf->size);
+					rte_cpu_to_be_16(extra_len);
 				to->ptr[i % 4] =
 					rte_cpu_to_be_64(extra_buf->dma_addr);
-
-				/* size already decremented by extra len */
+				size -= extra_len;
 			}
 
+			next_len = RTE_MIN(next_len, size);
 			/* insert the rest of the data */
 			if (next_len) {
-- 
2.21.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-14 17:02:39.274872102 +0000
+++ 0040-common-cpt-fix-component-for-empty-IOV-buffer.patch	2020-02-14 17:02:37.060405664 +0000
@@ -1 +1 @@
-From 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 Mon Sep 17 00:00:00 2001
+From 0059d95c55496ccc64cfe8d2d7b8c9ba35ee3b00 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0022ae1eb8fc4fb6c0115d6516003f3a9442ff00 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 081249cd7b..c310ea7cb4 100644
+index 67f19bd379..f47c96d934 100644
@@ -25 +26 @@
-@@ -374,5 +374,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -378,5 +378,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
@@ -32 +33 @@
-@@ -383,7 +383,4 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -387,7 +387,4 @@ fill_sg_comp_from_iov(sg_comp_t *list,
@@ -40 +41 @@
-@@ -417,4 +414,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -421,4 +418,5 @@ fill_sg_comp_from_iov(sg_comp_t *list,
@@ -46 +47 @@
-@@ -422,11 +420,11 @@ fill_sg_comp_from_iov(sg_comp_t *list,
+@@ -426,11 +424,11 @@ fill_sg_comp_from_iov(sg_comp_t *list,



More information about the stable mailing list