app/testpmd: print all or no events
authorGaetan Rivet <gaetan.rivet@6wind.com>
Sat, 6 May 2017 22:35:46 +0000 (00:35 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 10 May 2017 16:44:55 +0000 (18:44 +0200)
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 <gaetan.rivet@6wind.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
app/test-pmd/parameters.c
doc/guides/testpmd_app_ug/run_app.rst

index a480d8f..fbe6284 100644 (file)
@@ -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 <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv>: "
-              "enable print of designated event");
-       printf("  --mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv>: "
-              "disable print of designated event");
+       printf("  --print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|all>: "
+              "enable print of designated event or all of them.");
+       printf("  --mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|all>: "
+              "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;
index 98f6d1f..2a43214 100644 (file)
@@ -478,10 +478,12 @@ The commandline options are:
 
     Set the logical core N to perform bitrate calculation.
 
-*   ``--print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv>``
+*   ``--print-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|all>``
 
-    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 <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv>``
+*   ``--mask-event <unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|all>``
 
-    Disable printing the occurrence of the designated event.
+    Disable printing the occurrence of the designated event. Using all will
+    disable all of them.