27c2e74719
Add support for IMIX performance tests, where a distribution of various packet sizes can be submitted to a crypto device, testing a closer to a real world scenario. A sequence of packet sizes, selected randomly from a list of packet sizes (with "buffer-sz" parameter) with a list of the weights per packet size (using "imix" parameter), is generated (the length of this sequence is the same length as the pool, set with "pool-sz" parameter). This sequence is used repeteadly for all the crypto operations submitted to the crypto device (with "--total-ops" parameter). Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
38 lines
990 B
C
38 lines
990 B
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright(c) 2016-2017 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _CPERF_OPS_
|
|
#define _CPERF_OPS_
|
|
|
|
#include <rte_crypto.h>
|
|
|
|
#include "cperf.h"
|
|
#include "cperf_options.h"
|
|
#include "cperf_test_vectors.h"
|
|
|
|
|
|
typedef struct rte_cryptodev_sym_session *(*cperf_sessions_create_t)(
|
|
struct rte_mempool *sess_mp,
|
|
uint8_t dev_id, const struct cperf_options *options,
|
|
const struct cperf_test_vector *test_vector,
|
|
uint16_t iv_offset);
|
|
|
|
typedef int (*cperf_populate_ops_t)(struct rte_crypto_op **ops,
|
|
uint32_t src_buf_offset, uint32_t dst_buf_offset,
|
|
uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
|
|
const struct cperf_options *options,
|
|
const struct cperf_test_vector *test_vector,
|
|
uint16_t iv_offset, uint32_t *imix_idx);
|
|
|
|
struct cperf_op_fns {
|
|
cperf_sessions_create_t sess_create;
|
|
cperf_populate_ops_t populate_ops;
|
|
};
|
|
|
|
int
|
|
cperf_get_op_functions(const struct cperf_options *options,
|
|
struct cperf_op_fns *op_fns);
|
|
|
|
#endif /* _CPERF_OPS_ */
|