DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pravin Pathak <pravin.pathak@intel.com>
To: dev@dpdk.org
Cc: jerinj@marvell.com, mike.ximing.chen@intel.com,
	bruce.richardson@intel.com, thomas@monjalon.net,
	david.marchand@redhat.com, nipun.gupta@amd.com,
	chenbox@nvidia.com, tirthendu.sarkar@intel.com,
	Pravin Pathak <pravin.pathak@intel.com>,
	stable@dpdk.org
Subject: [PATCH v1] app/eventdev: fix number of releases sent during cleanup
Date: Sun, 22 Jun 2025 13:13:52 -0500	[thread overview]
Message-ID: <20250622181352.440499-1-pravin.pathak@intel.com> (raw)

During cleanup, only send releases for events app was
not able to enqueue. Current code is sending releases for
entire dequeue burst.

Fixes: f0b68c0b2af7 ("app/eventdev: clean up worker state before exit")
Cc: stable@dpdk.org

Signed-off-by: Pravin Pathak <pravin.pathak@intel.com>
---
 app/test-eventdev/test_perf_common.c     | 4 ++--
 app/test-eventdev/test_pipeline_common.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 4709de8b07..f77557e765 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -1833,9 +1833,9 @@ perf_worker_cleanup(struct rte_mempool *const pool, uint8_t dev_id,
 		for (i = nb_enq; i < nb_deq; i++)
 			rte_mempool_put(pool, events[i].event_ptr);
 
-		for (i = 0; i < nb_deq; i++)
+		for (i = nb_enq; i < nb_deq; i++)
 			events[i].op = RTE_EVENT_OP_RELEASE;
-		rte_event_enqueue_burst(dev_id, port_id, events, nb_deq);
+		rte_event_enqueue_burst(dev_id, port_id, events + nb_enq, nb_deq - nb_enq);
 	}
 	rte_event_port_quiesce(dev_id, port_id, perf_event_port_flush, pool);
 }
diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
index 204117ef7f..c1382ac188 100644
--- a/app/test-eventdev/test_pipeline_common.c
+++ b/app/test-eventdev/test_pipeline_common.c
@@ -684,10 +684,10 @@ pipeline_worker_cleanup(uint8_t dev, uint8_t port, struct rte_event ev[],
 				rte_pktmbuf_free(ev[i].mbuf);
 		}
 
-		for (i = 0; i < deq; i++)
+		for (i = enq; i < deq; i++)
 			ev[i].op = RTE_EVENT_OP_RELEASE;
 
-		rte_event_enqueue_burst(dev, port, ev, deq);
+		rte_event_enqueue_burst(dev, port, ev + enq, deq - enq);
 	}
 
 	rte_event_port_quiesce(dev, port, pipeline_event_port_flush, NULL);
-- 
2.39.1


                 reply	other threads:[~2025-06-22 18:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250622181352.440499-1-pravin.pathak@intel.com \
    --to=pravin.pathak@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=chenbox@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=mike.ximing.chen@intel.com \
    --cc=nipun.gupta@amd.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=tirthendu.sarkar@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).