From cdefd3d3f8f7effdd2bb78f5e893226d875d1464 Mon Sep 17 00:00:00 2001 From: paul luse Date: Tue, 8 Dec 2020 11:32:49 -0500 Subject: [PATCH] examples/accel_perf: move some code around in prep for batching First in a series of patches to change how batching is implemented. Signed-off-by: paul luse Change-Id: Iaee780cd948beee66a37528fdad6fc6841ea642b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5486 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- examples/accel/perf/accel_perf.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/examples/accel/perf/accel_perf.c b/examples/accel/perf/accel_perf.c index bfdbc42cb..dd530b73f 100644 --- a/examples/accel/perf/accel_perf.c +++ b/examples/accel/perf/accel_perf.c @@ -60,7 +60,19 @@ static struct worker_thread *g_workers = NULL; static int g_num_workers = 0; static pthread_mutex_t g_workers_lock = PTHREAD_MUTEX_INITIALIZER; uint64_t g_capabilites; -struct ap_task; + +struct worker_thread; +static void accel_done(void *ref, int status); + +struct ap_task { + void *src; + void *dst; + void *dst2; + struct worker_thread *worker; + int status; + int expected_status; /* used for the compare operation */ + TAILQ_ENTRY(ap_task) link; +}; struct worker_thread { struct spdk_io_channel *ch; @@ -77,16 +89,6 @@ struct worker_thread { struct spdk_poller *stop_poller; }; -struct ap_task { - void *src; - void *dst; - void *dst2; - struct worker_thread *worker; - int status; - int expected_status; /* used for compare */ - TAILQ_ENTRY(ap_task) link; -}; - static void dump_user_config(struct spdk_app_opts *opts) {