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 struct rte_cryptodev_sym_session *(*cperf_sessions_create_t)( 16 struct rte_mempool *sess_mp, struct rte_mempool *sess_priv_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 int (*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, struct rte_cryptodev_sym_session *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 28 struct cperf_op_fns { 29 cperf_sessions_create_t sess_create; 30 cperf_populate_ops_t populate_ops; 31 }; 32 33 int 34 cperf_get_op_functions(const struct cperf_options *options, 35 struct cperf_op_fns *op_fns); 36 37 #endif /* _CPERF_OPS_ */ 38