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_BENCHMARK,
28 CPERF_TEST_TYPE_VERIFY
42 uint8_t list[MAX_LIST];
45 struct comp_test_data {
46 char driver_name[RTE_DEV_NAME_MAX_LEN];
47 char input_file[PATH_MAX];
48 enum cperf_test_type test;
58 uint16_t max_sgl_segs;
60 enum rte_comp_huffman huffman_enc;
61 enum comp_operation test_op;
63 struct range_list level_lst;
67 enum cleanup_st cleanup;
68 int perf_comp_force_stop;
72 comp_perf_options_parse(struct comp_test_data *test_data, int argc,
76 comp_perf_options_default(struct comp_test_data *test_data);
79 comp_perf_options_check(struct comp_test_data *test_data);