patch 'eventdev/crypto: fix circular buffer full case' has been queued to stable release 22.11.4
Xueming Li
xuemingl at nvidia.com
Sun Oct 22 16:21:25 CEST 2023
Hi,
FYI, your patch has been queued to stable release 22.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/15/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=ba2ec17a2f57a88e89d12d88a9fc4ca0a4084ae3
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From ba2ec17a2f57a88e89d12d88a9fc4ca0a4084ae3 Mon Sep 17 00:00:00 2001
From: Ganapati Kundapura <ganapati.kundapura at intel.com>
Date: Thu, 3 Aug 2023 03:32:29 -0500
Subject: [PATCH] eventdev/crypto: fix circular buffer full case
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 6c3c888656fcb0ec419d751f90c0c2a18b5b709a ]
crypto ops from the circular buffer are not getting flushed
to crypto dev when crypto dev becomes busy and circular buffer
gets full.
Fix it by flushing ops from circular buffer when circular buffer
is full instead of returning without flushing.
Fixes: 2ae84b39ae7b ("eventdev/crypto: store operations in circular buffer")
Signed-off-by: Ganapati Kundapura <ganapati.kundapura at intel.com>
---
lib/eventdev/rte_event_crypto_adapter.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 4e1dbefb8e..ea50e405a8 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -240,9 +240,18 @@ eca_circular_buffer_flush_to_cdev(struct crypto_ops_circular_buffer *bufp,
n = *tailp - *headp;
else if (*tailp < *headp)
n = bufp->size - *headp;
- else {
- *nb_ops_flushed = 0;
- return 0; /* buffer empty */
+ else { /* head == tail case */
+ /* when head == tail,
+ * circ buff is either full(tail pointer roll over) or empty
+ */
+ if (bufp->count != 0) {
+ /* circ buffer is full */
+ n = bufp->count;
+ } else {
+ /* circ buffer is empty */
+ *nb_ops_flushed = 0;
+ return 0; /* buffer empty */
+ }
}
*nb_ops_flushed = rte_cryptodev_enqueue_burst(cdev_id, qp_id,
--
2.25.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-10-22 22:17:36.470556900 +0800
+++ 0056-eventdev-crypto-fix-circular-buffer-full-case.patch 2023-10-22 22:17:34.266723700 +0800
@@ -1 +1 @@
-From 6c3c888656fcb0ec419d751f90c0c2a18b5b709a Mon Sep 17 00:00:00 2001
+From ba2ec17a2f57a88e89d12d88a9fc4ca0a4084ae3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6c3c888656fcb0ec419d751f90c0c2a18b5b709a ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 52a28e52d6..1b435c9f0e 100644
+index 4e1dbefb8e..ea50e405a8 100644
@@ -25 +27 @@
-@@ -248,9 +248,18 @@ eca_circular_buffer_flush_to_cdev(struct crypto_ops_circular_buffer *bufp,
+@@ -240,9 +240,18 @@ eca_circular_buffer_flush_to_cdev(struct crypto_ops_circular_buffer *bufp,
More information about the stable
mailing list