Commit 0267f8a9 authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

examples/idxd: Deal with queued tasks during drain



If a task is on the resubmit list, make sure to clear it out during the
drain phase or the queue depth will never go to 0.

Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Change-Id: I859a03d76865d404ce43e38cfb34c27ca436e537
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11208


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarDong Yi <dongx.yi@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent fc48cf86
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -502,11 +502,13 @@ _get_task(struct idxd_chan_entry *t)
	return task;
}

static int idxd_chan_poll(struct idxd_chan_entry *chan);

static void
drain_io(struct idxd_chan_entry *t)
{
	while (t->current_queue_depth > 0) {
		spdk_idxd_process_events(t->ch);
		idxd_chan_poll(t);
	}
}