1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
5 #ifndef _COMP_PERF_OPS_
6 #define _COMP_PERF_OPS_
8 #define MAX_DRIVER_NAME 64
9 #define MAX_INPUT_FILE_NAME 64
11 #define MIN_COMPRESSED_BUF_SIZE 8
12 #define EXPANSE_RATIO 1.05
13 #define MAX_MBUF_DATA_SIZE (UINT16_MAX - RTE_PKTMBUF_HEADROOM)
14 #define MAX_SEG_SIZE ((int)(MAX_MBUF_DATA_SIZE / EXPANSE_RATIO))
27 uint8_t list
[MAX_LIST
];
30 struct comp_test_data
{
33 struct rte_mbuf
**comp_bufs
;
34 struct rte_mbuf
**decomp_bufs
;
38 uint8_t *compressed_data
;
39 uint8_t *decompressed_data
;
40 struct rte_mempool
*comp_buf_pool
;
41 struct rte_mempool
*decomp_buf_pool
;
42 struct rte_mempool
*op_pool
;
49 uint16_t max_sgl_segs
;
50 enum rte_comp_huffman huffman_enc
;
51 enum comp_operation test_op
;
53 struct range_list level
;
54 /* Store TSC duration for all levels (including level 0) */
55 uint64_t comp_tsc_duration
[RTE_COMP_LEVEL_MAX
+ 1];
56 uint64_t decomp_tsc_duration
[RTE_COMP_LEVEL_MAX
+ 1];
58 size_t decomp_data_sz
;
63 double decomp_tsc_byte
;
67 comp_perf_options_parse(struct comp_test_data
*test_data
, int argc
,
71 comp_perf_options_default(struct comp_test_data
*test_data
);
74 comp_perf_options_check(struct comp_test_data
*test_data
);