From: Gaetan Rivet Date: Sat, 6 May 2017 22:35:46 +0000 (+0200) Subject: app/testpmd: print all or no events X-Git-Tag: spdx-start~3227 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b6b63dfd0f71c5ebf43094282fd97e1f350c0b6e;p=dpdk.git app/testpmd: print all or no events Adds the "all" option to the print-event and mask-event parameters. This option will enable or disable all event notifications from being displayed. Signed-off-by: Gaetan Rivet Acked-by: Jingjing Wu --- diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index a480d8f9b2..fbe6284c58 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -206,10 +206,10 @@ 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."); } #ifdef RTE_LIBRTE_CMDLINE @@ -536,6 +536,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; diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index 98f6d1f369..2a43214e29 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -478,10 +478,12 @@ The commandline options are: Set the logical core N to perform bitrate calculation. -* ``--print-event `` +* ``--print-event `` - Enable printing the occurrence of the designated event. + Enable printing the occurrence of the designated event. Using all will + enable all of them. -* ``--mask-event `` +* ``--mask-event `` - Disable printing the occurrence of the designated event. + Disable printing the occurrence of the designated event. Using all will + disable all of them.