X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-bbdev%2Fmain.c;h=ff65173fdb0b67154ac03e6e1a9857af827e0646;hb=f979702337c69c7b73a78a10cbfb700c74b3b508;hp=8a421157ad44c800185191edc0b7c62bb5417bc2;hpb=d819c08327f329836bd3d791df0999ece19db7fa;p=dpdk.git diff --git a/app/test-bbdev/main.c b/app/test-bbdev/main.c index 8a421157ad..ff65173fdb 100644 --- a/app/test-bbdev/main.c +++ b/app/test-bbdev/main.c @@ -29,6 +29,8 @@ static struct test_params { unsigned int num_ops; unsigned int burst_sz; unsigned int num_lcores; + double snr; + unsigned int iter_max; char test_vector_filename[PATH_MAX]; bool init_device; } test_params; @@ -140,6 +142,18 @@ get_num_lcores(void) return test_params.num_lcores; } +double +get_snr(void) +{ + return test_params.snr; +} + +unsigned int +get_iter_max(void) +{ + return test_params.iter_max; +} + bool get_init_device(void) { @@ -180,12 +194,15 @@ parse_args(int argc, char **argv, struct test_params *tp) { "test-cases", 1, 0, 'c' }, { "test-vector", 1, 0, 'v' }, { "lcores", 1, 0, 'l' }, + { "snr", 1, 0, 's' }, + { "iter_max", 6, 0, 't' }, { "init-device", 0, 0, 'i'}, { "help", 0, 0, 'h' }, { NULL, 0, 0, 0 } }; + tp->iter_max = DEFAULT_ITER; - while ((opt = getopt_long(argc, argv, "hin:b:c:v:l:", lgopts, + while ((opt = getopt_long(argc, argv, "hin:b:c:v:l:s:t:", lgopts, &option_index)) != EOF) switch (opt) { case 'n': @@ -237,6 +254,16 @@ parse_args(int argc, char **argv, struct test_params *tp) sizeof(tp->test_vector_filename), "%s", optarg); break; + case 's': + TEST_ASSERT(strlen(optarg) > 0, + "SNR is not provided"); + tp->snr = strtod(optarg, NULL); + break; + case 't': + TEST_ASSERT(strlen(optarg) > 0, + "Iter_max is not provided"); + tp->iter_max = strtol(optarg, NULL, 10); + break; case 'l': TEST_ASSERT(strlen(optarg) > 0, "Num of lcores is not provided");