2019-06-25 11:12:58 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
* Copyright(c) 2016-2017 Intel Corporation
|
2017-04-21 10:43:26 +00:00
|
|
|
*/
|
|
|
|
|
2018-05-15 09:49:22 +00:00
|
|
|
#ifndef _CPERF_OPS_
|
|
|
|
#define _CPERF_OPS_
|
2017-04-21 10:43:26 +00:00
|
|
|
|
2018-05-15 09:49:22 +00:00
|
|
|
#include <rte_crypto.h>
|
2017-04-21 10:43:26 +00:00
|
|
|
|
2018-05-15 09:49:22 +00:00
|
|
|
#include "cperf.h"
|
|
|
|
#include "cperf_options.h"
|
|
|
|
#include "cperf_test_vectors.h"
|
2017-04-21 10:43:26 +00:00
|
|
|
|
2018-05-15 09:49:22 +00:00
|
|
|
|
2023-09-13 12:21:49 +00:00
|
|
|
typedef void *(*cperf_sessions_create_t)(
|
|
|
|
struct rte_mempool *sess_mp,
|
2018-05-15 09:49:22 +00:00
|
|
|
uint8_t dev_id, const struct cperf_options *options,
|
|
|
|
const struct cperf_test_vector *test_vector,
|
|
|
|
uint16_t iv_offset);
|
|
|
|
|
2023-09-13 12:21:49 +00:00
|
|
|
typedef void (*cperf_populate_ops_t)(struct rte_crypto_op **ops,
|
2018-05-15 09:49:22 +00:00
|
|
|
uint32_t src_buf_offset, uint32_t dst_buf_offset,
|
2023-09-13 12:21:49 +00:00
|
|
|
uint16_t nb_ops, void *sess,
|
2018-05-15 09:49:22 +00:00
|
|
|
const struct cperf_options *options,
|
|
|
|
const struct cperf_test_vector *test_vector,
|
2022-09-06 04:00:10 +00:00
|
|
|
uint16_t iv_offset, uint32_t *imix_idx,
|
|
|
|
uint64_t *tsc_start);
|
2018-05-15 09:49:22 +00:00
|
|
|
|
|
|
|
struct cperf_op_fns {
|
|
|
|
cperf_sessions_create_t sess_create;
|
|
|
|
cperf_populate_ops_t populate_ops;
|
|
|
|
};
|
2017-04-21 10:43:26 +00:00
|
|
|
|
|
|
|
int
|
2018-05-15 09:49:22 +00:00
|
|
|
cperf_get_op_functions(const struct cperf_options *options,
|
|
|
|
struct cperf_op_fns *op_fns);
|
2017-04-21 10:43:26 +00:00
|
|
|
|
2018-05-15 09:49:22 +00:00
|
|
|
#endif /* _CPERF_OPS_ */
|