eal: fix parsing option --telemetry
authorSean Morrissey <sean.morrissey@intel.com>
Mon, 15 Jul 2019 10:54:34 +0000 (11:54 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 22 Jul 2019 15:58:35 +0000 (17:58 +0200)
Added telemetry to EAL long options so that when
--telemetry is passed as an EAL arg that there is
no unrecognized argument error message printed.

Fixes: 8877ac688b52 ("telemetry: introduce infrastructure")
Cc: stable@dpdk.org
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
Tested-by: John OLoughlin <john.oloughlin@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
lib/librte_eal/common/eal_common_options.c
lib/librte_eal/common/eal_options.h

index 512d508..24e36cf 100644 (file)
@@ -81,6 +81,9 @@ eal_long_options[] = {
        {OPT_LEGACY_MEM,        0, NULL, OPT_LEGACY_MEM_NUM       },
        {OPT_SINGLE_FILE_SEGMENTS, 0, NULL, OPT_SINGLE_FILE_SEGMENTS_NUM},
        {OPT_MATCH_ALLOCATIONS, 0, NULL, OPT_MATCH_ALLOCATIONS_NUM},
+#ifdef RTE_LIBRTE_TELEMETRY
+       {OPT_TELEMETRY,         0, NULL, OPT_TELEMETRY_NUM        },
+#endif
        {0,                     0, NULL, 0                        }
 };
 
index 9855429..e4c8e25 100644 (file)
@@ -69,6 +69,10 @@ enum {
        OPT_IOVA_MODE_NUM,
 #define OPT_MATCH_ALLOCATIONS  "match-allocations"
        OPT_MATCH_ALLOCATIONS_NUM,
+#ifdef RTE_LIBRTE_TELEMETRY
+       #define OPT_TELEMETRY          "telemetry"
+               OPT_TELEMETRY_NUM,
+#endif
        OPT_LONG_MAX_NUM
 };