1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
5 #ifndef _COMP_PERF_OPS_
6 #define _COMP_PERF_OPS_
9 #define MIN_COMPRESSED_BUF_SIZE 8
10 #define EXPANSE_RATIO 1.1
11 #define MAX_MBUF_DATA_SIZE (UINT16_MAX - RTE_PKTMBUF_HEADROOM)
12 #define MAX_SEG_SIZE ((int)(MAX_MBUF_DATA_SIZE / EXPANSE_RATIO))
14 extern const char *comp_perf_test_type_strs[];
16 /* Cleanup state machine */
26 enum cperf_test_type {
27 CPERF_TEST_TYPE_THROUGHPUT,
28 CPERF_TEST_TYPE_VERIFY,
43 uint8_t list[MAX_LIST];
46 struct comp_test_data {
47 char driver_name[RTE_DEV_NAME_MAX_LEN];
48 char input_file[PATH_MAX];
49 enum cperf_test_type test;
59 uint16_t max_sgl_segs;
62 enum rte_comp_huffman huffman_enc;
63 enum comp_operation test_op;
65 struct range_list level_lst;
67 int use_external_mbufs;
70 enum cleanup_st cleanup;
71 int perf_comp_force_stop;
73 uint32_t cyclecount_delay;
77 comp_perf_options_parse(struct comp_test_data *test_data, int argc,
81 comp_perf_options_default(struct comp_test_data *test_data);
84 comp_perf_options_check(struct comp_test_data *test_data);