DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] eventdev/crypto: wrong offset used while flushing events
@ 2022-11-30 15:27 Ganapati Kundapura
  0 siblings, 0 replies; only message in thread
From: Ganapati Kundapura @ 2022-11-30 15:27 UTC (permalink / raw)
  To: dev, jerinj, s.v.naga.harish.k, abhinandan.gujjar; +Cc: jay.jayatheerthan

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

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

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>

diff --git a/lib/eventdev/rte_event_crypto_adapter.c b/lib/eventdev/rte_event_crypto_adapter.c
index 1c0a22b..fe7e9f9 100644
--- a/lib/eventdev/rte_event_crypto_adapter.c
+++ b/lib/eventdev/rte_event_crypto_adapter.c
@@ -669,7 +669,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.6.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-30 15:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 15:27 [PATCH v1] eventdev/crypto: wrong offset used while flushing events Ganapati Kundapura

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).