#define CPERF_HUFFMAN_ENC ("huffman-enc")
#define CPERF_LEVEL ("compress-level")
#define CPERF_WINDOW_SIZE ("window-sz")
+#define CPERF_EXTERNAL_MBUFS ("external-mbufs")
struct name_id_map {
const char *name;
" (default: range between 1 and 9)\n"
" --window-sz N: base two log value of compression window size\n"
" (e.g.: 15 => 32k, default: max supported by PMD)\n"
+ " --external-mbufs: use memzones as external buffers instead of\n"
+ " keeping the data directly in mbuf area\n"
" -h: prints this help\n",
progname);
}
{
struct name_id_map cperftest_namemap[] = {
{
- cperf_test_type_strs[CPERF_TEST_TYPE_BENCHMARK],
+ comp_perf_test_type_strs[CPERF_TEST_TYPE_BENCHMARK],
CPERF_TEST_TYPE_BENCHMARK
},
{
- cperf_test_type_strs[CPERF_TEST_TYPE_VERIFY],
+ comp_perf_test_type_strs[CPERF_TEST_TYPE_VERIFY],
CPERF_TEST_TYPE_VERIFY
}
};
return 0;
}
+static int
+parse_external_mbufs(struct comp_test_data *test_data,
+ const char *arg __rte_unused)
+{
+ test_data->use_external_mbufs = 1;
+ return 0;
+}
+
typedef int (*option_parser_t)(struct comp_test_data *test_data,
const char *arg);
{ CPERF_HUFFMAN_ENC, required_argument, 0, 0 },
{ CPERF_LEVEL, required_argument, 0, 0 },
{ CPERF_WINDOW_SIZE, required_argument, 0, 0 },
+ { CPERF_EXTERNAL_MBUFS, 0, 0, 0 },
{ NULL, 0, 0, 0 }
};
+
static int
comp_perf_opts_parse_long(int opt_idx, struct comp_test_data *test_data)
{
{ CPERF_HUFFMAN_ENC, parse_huffman_enc },
{ CPERF_LEVEL, parse_level },
{ CPERF_WINDOW_SIZE, parse_window_sz },
+ { CPERF_EXTERNAL_MBUFS, parse_external_mbufs },
};
unsigned int i;
test_data->level_lst.max = RTE_COMP_LEVEL_MAX;
test_data->level_lst.inc = 1;
test_data->test = CPERF_TEST_TYPE_BENCHMARK;
+ test_data->use_external_mbufs = 0;
}
int