test/crypto: refactor unit tests into one combined array
[dpdk.git] / app / test-pmd / parameters.c
index deca7a6..6340104 100644 (file)
@@ -841,6 +841,8 @@ launch_args_parse(int argc, char** argv)
                                        mp_alloc_type = MP_ALLOC_XMEM;
                                else if (!strcmp(optarg, "xmemhuge"))
                                        mp_alloc_type = MP_ALLOC_XMEM_HUGE;
+                               else if (!strcmp(optarg, "xbuf"))
+                                       mp_alloc_type = MP_ALLOC_XBUF;
                                else
                                        rte_exit(EXIT_FAILURE,
                                                "mp-alloc %s invalid - must be: "
@@ -1363,12 +1365,19 @@ launch_args_parse(int argc, char** argv)
                        break;
                default:
                        usage(argv[0]);
+                       printf("Invalid option: %s\n", argv[optind]);
                        rte_exit(EXIT_FAILURE,
                                 "Command line is incomplete or incorrect\n");
                        break;
                }
        }
 
+       if (optind != argc) {
+               usage(argv[0]);
+               printf("Invalid parameter: %s\n", argv[optind]);
+               rte_exit(EXIT_FAILURE, "Command line is incorrect\n");
+       }
+
        /* Set offload configuration from command line parameters. */
        rx_mode.offloads = rx_offloads;
        tx_mode.offloads = tx_offloads;