app/compress-perf: remove magic numbers
This patch fixes some minor problems like 'magic numbers', spelling mistakes, enumes naming. Signed-off-by: Artur Trybula <arturx.trybula@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Shally Verma <shallyv@marvell.com>
This commit is contained in:
parent
d6cec11311
commit
8c7a31317b
@ -5,8 +5,6 @@
|
||||
#ifndef _COMP_PERF_OPS_
|
||||
#define _COMP_PERF_OPS_
|
||||
|
||||
#define MAX_DRIVER_NAME 64
|
||||
#define MAX_INPUT_FILE_NAME 64
|
||||
#define MAX_LIST 32
|
||||
#define MIN_COMPRESSED_BUF_SIZE 8
|
||||
#define EXPANSE_RATIO 1.05
|
||||
@ -25,7 +23,7 @@ enum cleanup_st {
|
||||
ST_DURING_TEST
|
||||
};
|
||||
|
||||
enum cperf_perf_test_type {
|
||||
enum cperf_test_type {
|
||||
CPERF_TEST_TYPE_BENCHMARK,
|
||||
CPERF_TEST_TYPE_VERIFY
|
||||
};
|
||||
@ -45,9 +43,9 @@ struct range_list {
|
||||
};
|
||||
|
||||
struct comp_test_data {
|
||||
char driver_name[64];
|
||||
char input_file[64];
|
||||
enum cperf_perf_test_type test;
|
||||
char driver_name[RTE_DEV_NAME_MAX_LEN];
|
||||
char input_file[PATH_MAX];
|
||||
enum cperf_test_type test;
|
||||
|
||||
uint8_t *input_data;
|
||||
size_t input_data_sz;
|
||||
|
@ -99,7 +99,7 @@ parse_cperf_test_type(struct comp_test_data *test_data, const char *arg)
|
||||
return -1;
|
||||
}
|
||||
|
||||
test_data->test = (enum cperf_perf_test_type)id;
|
||||
test_data->test = (enum cperf_test_type)id;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -614,8 +614,8 @@ comp_perf_options_default(struct comp_test_data *test_data)
|
||||
test_data->huffman_enc = RTE_COMP_HUFFMAN_DYNAMIC;
|
||||
test_data->test_op = COMPRESS_DECOMPRESS;
|
||||
test_data->window_sz = -1;
|
||||
test_data->level_lst.min = 1;
|
||||
test_data->level_lst.max = 9;
|
||||
test_data->level_lst.min = RTE_COMP_LEVEL_MIN;
|
||||
test_data->level_lst.max = RTE_COMP_LEVEL_MAX;
|
||||
test_data->level_lst.inc = 1;
|
||||
test_data->test = CPERF_TEST_TYPE_BENCHMARK;
|
||||
}
|
||||
|
@ -7,11 +7,12 @@
|
||||
#include <rte_log.h>
|
||||
#include <rte_compressdev.h>
|
||||
|
||||
#include "comp_perf_options.h"
|
||||
#include "comp_perf_test_verify.h"
|
||||
#include "comp_perf_test_benchmark.h"
|
||||
#include "comp_perf.h"
|
||||
#include "comp_perf_options.h"
|
||||
#include "comp_perf_test_benchmark.h"
|
||||
#include "comp_perf_test_common.h"
|
||||
#include "comp_perf_test_verify.h"
|
||||
|
||||
|
||||
#define DIV_CEIL(a, b) ((a) / (b) + ((a) % (b) != 0))
|
||||
|
||||
@ -49,7 +50,7 @@ find_buf_size(uint32_t input_size)
|
||||
* power of 2 but also should be enough to store incompressible data
|
||||
*/
|
||||
|
||||
/* We're looking for nearest power of 2 buffer size, which is greather
|
||||
/* We're looking for nearest power of 2 buffer size, which is greater
|
||||
* than input_size
|
||||
*/
|
||||
uint32_t size =
|
||||
|
Loading…
x
Reference in New Issue
Block a user