From b6b63dfd0f71c5ebf43094282fd97e1f350c0b6e Mon Sep 17 00:00:00 2001 From: Gaetan Rivet Date: Sun, 7 May 2017 00:35:46 +0200 Subject: [PATCH] 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 --- app/test-pmd/parameters.c | 10 ++++++---- doc/guides/testpmd_app_ug/run_app.rst | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) 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. -- 2.20.1