Signed-off-by: Balakrishna.Garapati <[email protected]>
---
example/generator/odp_generator.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/example/generator/odp_generator.c
b/example/generator/odp_generator.c
index d35f4aa..5c6c276 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -633,9 +633,13 @@ int main(int argc, char *argv[])
if (args->appl.cpu_count)
num_workers = args->appl.cpu_count;
- /* ping mode need two worker */
- if (args->appl.mode == APPL_MODE_PING)
- num_workers = 2;
+ /* ping mode need two workers */
+ if (args->appl.mode == APPL_MODE_PING) {
+ if (num_workers < 2) {
+ EXAMPLE_ERR("Need at least two worker threads\n");
+ exit(EXIT_FAILURE);
+ }
+ }
/*
* By default CPU #0 runs Linux kernel background tasks.
@@ -1032,6 +1036,8 @@ static void usage(char *progname)
" -t, --timeout only for ping mode, wait ICMP reply timeout
seconds\n"
" -i, --interval wait interval ms between sending each packet\n"
" default is 1000ms. 0 for flood mode\n"
+ " -w, --workers specify number of workers need to be assigned
to application\n"
+ " default is to assign all\n"
"\n"
"Optional OPTIONS\n"
" -h, --help Display help and exit.\n"
--
1.9.1
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp