From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id B9A64A0679 for ; Tue, 2 Apr 2019 12:01:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96151378B; Tue, 2 Apr 2019 12:01:55 +0200 (CEST) Received: from mail-ua1-f67.google.com (mail-ua1-f67.google.com [209.85.222.67]) by dpdk.org (Postfix) with ESMTP id A950A316B for ; Tue, 2 Apr 2019 12:01:54 +0200 (CEST) Received: by mail-ua1-f67.google.com with SMTP id g8so4160503uaj.0 for ; Tue, 02 Apr 2019 03:01:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sdBOhd4QFNV+rmlXyAyhcedGTrBpzmTfWRy2G6LNuac=; b=ttsawDmJaJlnVBQPcAWAKlfyUL4vSaqnJSGQ/F5rAicvdntXSu6jMUSUB9TgQR19sJ nLx4s+EO1MEchr0+o8XL5SAKW/cmOXnzX+7xoWUZbVNDDYf6fOJ5gMV1eVVv0kfnRQOV HtslJWu+FHyUmpJH0J+UU1oyIgJjCTj6p5skCH234WW7ZD0JMcsJJkKwAHLSfLNcuvnt jEZdqFxs7J5TYAPUF6uUzDNUn/i+SHcjwLP/T7Dhtf4bCiiw8bCFBFuieMIDhfBPuMjS Z/Sz/kZ1hq/VZUXAIHj2UYEsoJR8blQQNVMYowKsEc1kXdnfBiqFvqZQ9WnOChYpSInJ 8WfA== X-Gm-Message-State: APjAAAVdSXB0+Q14yYiwhKDdBhaum/8QNl5cuAmAY94HjKUEBsxIDIXG 9AJkqUoAPW4Li3gogKoyFshgqF7wRvDTOtO/xy3n86CQxfE= X-Google-Smtp-Source: APXvYqw4c0l4fQWnzQNbdqKfRlmXpfana4pErsvTjTCmf3T5iGCJ8upd7uPJ9TGD7SI3lmbvGcIr/GgLneUKm0Zpzb4= X-Received: by 2002:ab0:73d3:: with SMTP id m19mr40083233uaq.46.1554199314121; Tue, 02 Apr 2019 03:01:54 -0700 (PDT) MIME-Version: 1.0 References: <20190402043318.20382-3-vipin.varghese@intel.com> <20190402091836.35779-1-vipin.varghese@intel.com> <20190402091836.35779-3-vipin.varghese@intel.com> In-Reply-To: <20190402091836.35779-3-vipin.varghese@intel.com> From: David Marchand Date: Tue, 2 Apr 2019 12:01:43 +0200 Message-ID: To: Vipin Varghese Cc: dev , "Kovacevic, Marko" , reshma.pattan@intel.com, "Wiles, Keith" , "Mcnamara, John" , stephen1.byrne@intel.com, amit.tamboli@intel.com, sanjay.padubidri@intel.com, amol.patel@intel.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v5 2/2] app/pdump: enhance to support multi-core capture X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190402100143.-vSXzdxmcPsmC1gPQguqKF4pI6bQxfL5Rn57YY3lYgs@z> On Tue, Apr 2, 2019 at 11:18 AM Vipin Varghese wrote: > @@ -28,6 +28,9 @@ > #include > > #define CMD_LINE_OPT_PDUMP "pdump" > +#define CMD_LINE_OPT_PDUMP_NUM 1 > +#define CMD_LINE_OPT_MULTI "multi" > +#define CMD_LINE_OPT_MULTI_NUM 2 > #define PDUMP_PORT_ARG "port" > #define PDUMP_PCI_ARG "device_id" > #define PDUMP_QUEUE_ARG "queue" > You'd better map to integers that do not collide with ascii characters (even if non printable). So values >= 256 are better. This is the reason for the comment here: https://git.dpdk.org/dpdk/tree/lib/librte_eal/common/eal_options.h#n19 @@ -139,12 +142,14 @@ struct parse_val { > static int num_tuples; > static struct rte_eth_conf port_conf_default; > static volatile uint8_t quit_signal; > +static uint8_t multiple_core_capture; > > /**< display usage */ > static void > pdump_usage(const char *prgname) > { > - printf("usage: %s [EAL options] -- --pdump " > + printf("usage: %s [EAL options] -- [--%s] " > + "--%s " > "'(port= | device_id= name>)," > "(queue=)," > "(rx-dev= |" > @@ -152,7 +157,7 @@ pdump_usage(const char *prgname) > "[ring-size=default:16384]," > "[mbuf-size=default:2176]," > "[total-num-mbufs= mbufs>default:65535]'\n", > - prgname); > + prgname, CMD_LINE_OPT_MULTI, CMD_LINE_OPT_PDUMP); > } > > static int > You can concatenate the macro. - printf("usage: %s [EAL options] -- --pdump " + printf("usage: %s [EAL options] -- [--"CMD_LINE_OPT_MULTI"] " + "--"CMD_LINE_OPT_PDUMP" " -- David Marchand