X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Fparameters.c;h=354a94cb6397e5b0dd39d1258a42b092104c724e;hb=15b4beab8a300a5d74b4a0913a9f2faaa33f0ecf;hp=a480d8f9b2a69f43f412e9fa4f64da8546e5b45f;hpb=c9cafcc82de8f1e8fb562509e24c905f0321ecb8;p=dpdk.git diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index a480d8f9b2..354a94cb63 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -41,7 +41,6 @@ #include #include #include -#include #include #include @@ -89,6 +88,7 @@ usage(char* progname) "[--cmdline-file=FILENAME] " #endif "[--help|-h] | [--auto-start|-a] | [" + "--tx-first | --stats-period=PERIOD | " "--coremask=COREMASK --portmask=PORTMASK --numa " "--mbuf-size= | --total-num-mbufs= | " "--nb-cores= | --nb-ports= | " @@ -109,6 +109,10 @@ usage(char* progname) printf(" --auto-start: start forwarding on init " "[always when non-interactive].\n"); printf(" --help: display this message and quit.\n"); + printf(" --tx-first: start forwarding sending a burst first " + "(only if interactive is disabled).\n"); + printf(" --stats-period=PERIOD: statistics will be shown " + "every PERIOD seconds (only if interactive is disabled).\n"); printf(" --nb-cores=N: set the number of forwarding cores " "(1 <= N <= %d).\n", nb_lcores); printf(" --nb-ports=N: set the number of forwarding ports " @@ -206,10 +210,12 @@ usage(char* progname) printf(" --no-rmv-interrupt: disable device removal interrupt.\n"); printf(" --bitrate-stats=N: set the logical core N to perform " "bit-rate calculation.\n"); - printf(" --print-event : " - "enable print of designated event"); - printf(" --mask-event : " - "disable print of designated event"); + printf(" --print-event : " + "enable print of designated event or all of them."); + printf(" --mask-event : " + "disable print of designated event or all of them."); + printf(" --flow-isolate-all: " + "requests flow API isolated mode on all ports at initialization time."); } #ifdef RTE_LIBRTE_CMDLINE @@ -536,6 +542,8 @@ parse_event_printing_config(const char *optarg, int enable) mask = UINT32_C(1) << RTE_ETH_EVENT_MACSEC; else if (!strcmp(optarg, "intr_rmv")) mask = UINT32_C(1) << RTE_ETH_EVENT_INTR_RMV; + else if (!strcmp(optarg, "all")) + mask = ~UINT32_C(0); else { fprintf(stderr, "Invalid event: %s\n", optarg); return -1; @@ -564,6 +572,8 @@ launch_args_parse(int argc, char** argv) { "eth-peers-configfile", 1, 0, 0 }, { "eth-peer", 1, 0, 0 }, #endif + { "tx-first", 0, 0, 0 }, + { "stats-period", 1, 0, 0 }, { "ports", 1, 0, 0 }, { "nb-cores", 1, 0, 0 }, { "nb-ports", 1, 0, 0 }, @@ -621,6 +631,7 @@ launch_args_parse(int argc, char** argv) { "tx-queue-stats-mapping", 1, 0, 0 }, { "rx-queue-stats-mapping", 1, 0, 0 }, { "no-flush-rx", 0, 0, 0 }, + { "flow-isolate-all", 0, 0, 0 }, { "txpkts", 1, 0, 0 }, { "disable-link-check", 0, 0, 0 }, { "no-lsc-interrupt", 0, 0, 0 }, @@ -672,6 +683,23 @@ launch_args_parse(int argc, char** argv) printf("Auto-start selected\n"); auto_start = 1; } + if (!strcmp(lgopts[opt_idx].name, "tx-first")) { + printf("Ports to start sending a burst of " + "packets first\n"); + tx_first = 1; + } + if (!strcmp(lgopts[opt_idx].name, "stats-period")) { + char *end = NULL; + unsigned int n; + + n = strtoul(optarg, &end, 10); + if ((optarg[0] == '\0') || (end == NULL) || + (*end != '\0')) + break; + + stats_period = n; + break; + } if (!strcmp(lgopts[opt_idx].name, "eth-peers-configfile")) { if (init_peer_eth_addrs(optarg) != 0) @@ -1079,6 +1107,8 @@ launch_args_parse(int argc, char** argv) lsc_interrupt = 0; if (!strcmp(lgopts[opt_idx].name, "no-rmv-interrupt")) rmv_interrupt = 0; + if (!strcmp(lgopts[opt_idx].name, "flow-isolate-all")) + flow_isolate_all = 1; if (!strcmp(lgopts[opt_idx].name, "print-event")) if (parse_event_printing_config(optarg, 1)) { rte_exit(EXIT_FAILURE,