patch 'eventdev/crypto: fix offset used while flushing events' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 07:58:41 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

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/01/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=e1ca28205f1b781a12ec52c49fbd5c63ab07db2b

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From e1ca28205f1b781a12ec52c49fbd5c63ab07db2b Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura at intel.com>
Date: Wed, 7 Dec 2022 00:49:43 -0600
Subject: [PATCH] eventdev/crypto: fix offset used while flushing events
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit da73a2a0d10f270acf3bb9c90f79545d27e8f562 ]

Events enqueued to eventdev from the beginning of the circular buffer.
This leads to invalid or already freed events getting enqueued to eventdev
from the circular buffer.

Fixed by enqueuing the events to eventdev from the head pointer of
circular buffer.

Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura at intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar at intel.com>
---
 lib/eventdev/rte_event_crypto_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index b10595fbbb..535b087e0d 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -681,7 +681,7 @@ eca_circular_buffer_flush_to_evdev(struct event_crypto_adapter *adapter,
 	else
 		return 0;  /* buffer empty */

-	nb_ops_flushed =  eca_ops_enqueue_burst(adapter, ops, n);
+	nb_ops_flushed =  eca_ops_enqueue_burst(adapter, &ops[*headp], n);
 	bufp->count -= nb_ops_flushed;
 	if (!bufp->count) {
 		*headp = 0;
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:41.440554900 +0800
+++ 0014-eventdev-crypto-fix-offset-used-while-flushing-event.patch	2023-02-27 14:08:40.729237000 +0800
@@ -1 +1 @@
-From da73a2a0d10f270acf3bb9c90f79545d27e8f562 Mon Sep 17 00:00:00 2001
+From e1ca28205f1b781a12ec52c49fbd5c63ab07db2b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit da73a2a0d10f270acf3bb9c90f79545d27e8f562 ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index eaff5778a6..c08984b8cf 100644
+index b10595fbbb..535b087e0d 100644
@@ -26 +28 @@
-@@ -669,7 +669,7 @@ eca_circular_buffer_flush_to_evdev(struct event_crypto_adapter *adapter,
+@@ -681,7 +681,7 @@ eca_circular_buffer_flush_to_evdev(struct event_crypto_adapter *adapter,


More information about the stable mailing list