diff options
author | Christophe Milard <christophe.milard@linaro.org> | 2016-04-14 14:01:36 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2016-05-23 15:06:59 +0300 |
commit | f693549ce6c1d7630e5b007798b6f255341d5f8c (patch) | |
tree | 0dfff434f9a8d775e53b708bcf02a10ca5b767aa /test | |
parent | 5793eed780a7a1ba7877a9c69f7cf27ae75b8e10 (diff) |
performance: crypto: adding helper cmd line parsing
odp_crypto now calls the helper command line parsing so that helper
can collect its options. Hence enabling process mode run.
Signed-off-by: Christophe Milard <christophe.milard@linaro.org>
Reviewed-by: Brian Brooks <brian.brooks@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/performance/odp_crypto.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/performance/odp_crypto.c b/test/performance/odp_crypto.c index 893a5a306..404984dde 100644 --- a/test/performance/odp_crypto.c +++ b/test/performance/odp_crypto.c @@ -828,7 +828,7 @@ static void parse_args(int argc, char *argv[], crypto_args_t *cargs) { int opt; int long_index; - static struct option longopts[] = { + static const struct option longopts[] = { {"algorithm", optional_argument, NULL, 'a'}, {"debug", no_argument, NULL, 'd'}, {"flight", optional_argument, NULL, 'f'}, @@ -843,6 +843,11 @@ static void parse_args(int argc, char *argv[], crypto_args_t *cargs) {NULL, 0, NULL, 0} }; + static const char *shortopts = "+a:c:df:hi:m:nl:spr"; + + /* let helper collect its own arguments (e.g. --odph_proc) */ + odph_parse_options(argc, argv, shortopts, longopts); + cargs->in_place = 0; cargs->in_flight = 1; cargs->debug_packets = 0; @@ -852,9 +857,10 @@ static void parse_args(int argc, char *argv[], crypto_args_t *cargs) cargs->reuse_packet = 0; cargs->schedule = 0; + opterr = 0; /* do not issue errors on helper options */ + while (1) { - opt = getopt_long(argc, argv, "+a:c:df:hi:m:nl:spr", - longopts, &long_index); + opt = getopt_long(argc, argv, shortopts, longopts, &long_index); if (opt == -1) break; /* No more options */ |