xref: /dpdk/app/test-crypto-perf/cperf_ops.h (revision 3f3fc3308bd099b304695f30103c21f755c7689c)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2016-2017 Intel Corporation
3  */
4 
5 #ifndef _CPERF_OPS_
6 #define _CPERF_OPS_
7 
8 #include <rte_crypto.h>
9 
10 #include "cperf.h"
11 #include "cperf_options.h"
12 #include "cperf_test_vectors.h"
13 
14 
15 typedef void *(*cperf_sessions_create_t)(
16 		struct rte_mempool *sess_mp,
17 		uint8_t dev_id, const struct cperf_options *options,
18 		const struct cperf_test_vector *test_vector,
19 		uint16_t iv_offset);
20 
21 typedef void (*cperf_populate_ops_t)(struct rte_crypto_op **ops,
22 		uint32_t src_buf_offset, uint32_t dst_buf_offset,
23 		uint16_t nb_ops, void *sess,
24 		const struct cperf_options *options,
25 		const struct cperf_test_vector *test_vector,
26 		uint16_t iv_offset, uint32_t *imix_idx,
27 		uint64_t *tsc_start);
28 
29 struct cperf_op_fns {
30 	cperf_sessions_create_t sess_create;
31 	cperf_populate_ops_t populate_ops;
32 };
33 
34 int
35 cperf_get_op_functions(const struct cperf_options *options,
36 		struct cperf_op_fns *op_fns);
37 
38 #endif /* _CPERF_OPS_ */
39