summaryrefslogtreecommitdiffstats
path: root/src/spdk/dpdk/app/test-compress-perf/comp_perf.h
blob: 997d46b59bade2bc6115e54c43481ff1c5d7b2e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2019 Intel Corporation
 */

#ifndef _COMP_PERF_
#define _COMP_PERF_

#include <rte_mempool.h>

struct comp_test_data;

typedef void  *(*cperf_constructor_t)(
		uint8_t dev_id,
		uint16_t qp_id,
		struct comp_test_data *options);

typedef int (*cperf_runner_t)(void *test_ctx);
typedef void (*cperf_destructor_t)(void *test_ctx);

struct cperf_test {
	cperf_constructor_t constructor;
	cperf_runner_t runner;
	cperf_destructor_t destructor;
};

/* Needed for weak functions*/

void *
cperf_throughput_test_constructor(uint8_t dev_id __rte_unused,
				 uint16_t qp_id __rte_unused,
				 struct comp_test_data *options __rte_unused);

void
cperf_throughput_test_destructor(void *arg __rte_unused);

int
cperf_throughput_test_runner(void *test_ctx __rte_unused);

void *
cperf_verify_test_constructor(uint8_t dev_id __rte_unused,
				 uint16_t qp_id __rte_unused,
				 struct comp_test_data *options __rte_unused);

void
cperf_verify_test_destructor(void *arg __rte_unused);

int
cperf_verify_test_runner(void *test_ctx __rte_unused);

#endif /* _COMP_PERF_ */