X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Feal_common_options.c;h=bb6c131776fce3e523754d5ff761137306330886;hb=3d26a70ae33853ac4116b135e55f3d475f148939;hp=eaba611fae7187ed9c095483382433d627018d11;hpb=05c4105738d8a03b28b511656f127408bddfad17;p=dpdk.git diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index eaba611fae..bb6c131776 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -34,6 +34,7 @@ #include "eal_options.h" #include "eal_filesystem.h" #include "eal_private.h" +#include "eal_trace.h" #define BITS_PER_HEX 4 #define LCORE_OPT_LST 1 @@ -67,6 +68,7 @@ eal_long_options[] = { {OPT_IOVA_MODE, 1, NULL, OPT_IOVA_MODE_NUM }, {OPT_LCORES, 1, NULL, OPT_LCORES_NUM }, {OPT_LOG_LEVEL, 1, NULL, OPT_LOG_LEVEL_NUM }, + {OPT_TRACE, 1, NULL, OPT_TRACE_NUM }, {OPT_MASTER_LCORE, 1, NULL, OPT_MASTER_LCORE_NUM }, {OPT_MBUF_POOL_OPS_NAME, 1, NULL, OPT_MBUF_POOL_OPS_NAME_NUM}, {OPT_NO_HPET, 0, NULL, OPT_NO_HPET_NUM }, @@ -1418,6 +1420,16 @@ eal_parse_common_option(int opt, const char *optarg, } break; } + + case OPT_TRACE_NUM: { + if (eal_trace_args_save(optarg) < 0) { + RTE_LOG(ERR, EAL, "invalid parameters for --" + OPT_TRACE "\n"); + return -1; + } + break; + } + case OPT_LCORES_NUM: if (eal_parse_lcores(optarg) < 0) { RTE_LOG(ERR, EAL, "invalid parameter for --" @@ -1693,6 +1705,10 @@ eal_common_usage(void) " --"OPT_LOG_LEVEL"= Set global log level\n" " --"OPT_LOG_LEVEL"=:\n" " Set specific log level\n" + " --"OPT_TRACE"=\n" + " Enable trace based on regular expression trace name.\n" + " By default, the trace is disabled.\n" + " User must specify this option to enable trace.\n" " -v Display version information on startup\n" " -h, --help This help\n" " --"OPT_IN_MEMORY" Operate entirely in memory. This will\n"