Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH v2] test: queue_perf: fix queue destroy step in pair mode #2164

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions test/performance/odp_queue_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,24 +397,23 @@ static int create_queues(test_global_t *global)

static int destroy_queues(test_global_t *global)
{
odp_event_t ev;
uint32_t i, j;
uint32_t i;
int ret = 0;
test_options_t *test_options = &global->options;
uint32_t num_queue = test_options->num_queue;
uint32_t num_event = test_options->num_event;
odp_queue_t *queue = global->queue;
odp_pool_t pool = global->pool;

for (i = 0; i < num_queue; i++) {
if (queue[i] == ODP_QUEUE_INVALID)
break;

for (j = 0; j < num_event; j++) {
ev = odp_queue_deq(queue[i]);
while (1) {
odp_event_t ev = odp_queue_deq(queue[i]);

if (ev != ODP_EVENT_INVALID)
odp_event_free(ev);
if (ev == ODP_EVENT_INVALID)
break;
odp_event_free(ev);
}

if (odp_queue_destroy(queue[i])) {
Expand Down