patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "O Mahony, Billy" <billy.o.mahony@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>,
	"Kovacevic, Marko" <marko.kovacevic@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Burakov, Anatoly" <anatoly.burakov@intel.com>,
	"Varghese, Vipin" <vipin.varghese@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v3] eal: add error check for core options
Date: Thu, 22 Feb 2018 10:10:00 +0000	[thread overview]
Message-ID: <03135AEA779D444E90975C2703F148DC58C93237@IRSMSX107.ger.corp.intel.com> (raw)
In-Reply-To: <20180202153306.GA7932@bricha3-MOBL3.ger.corp.intel.com>

> > +.. Note::
> > +    At a given instance only one core option ``--lcores``, ``-l`` or ``-c`` can be
> used.
> > +
> > +

Hi Marko,

I always found the n different way to specify cores perplexing. I always suspected they were mutually exclusive but that was far from clear from the docs and it never was important enough to me to try out the various options. Taking the time to add clear documentation makes everyone's work more efficient and less frustrating. 

So thank you and keep up the good work :)

Billy. 

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
> Sent: Friday, February 2, 2018 3:33 PM
> To: Kovacevic, Marko <marko.kovacevic@intel.com>
> Cc: dev@dpdk.org; Burakov, Anatoly <anatoly.burakov@intel.com>; Varghese,
> Vipin <vipin.varghese@intel.com>; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3] eal: add error check for core options
> 
> On Fri, Feb 02, 2018 at 02:51:28PM +0000, Marko Kovacevic wrote:
> > Error information on current core usage list, mask or map were
> > incomplete. Added states to differentiate core usage and to inform
> > user.
> >
> > Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
> > Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> This is fine as-is - one comment below for future consideration.
> >
> > ---
> >
> > V3:
> >  - Changed to reflect the coding guidelines - Bruce
> >  - update the documentation for better clarity - Bruce
> >  - Added back the reviewer information - Anatoly
> >
> > V2:
> >  - Cleaned up the logging for error cases - Anatoly
> > ---
> >  doc/guides/testpmd_app_ug/run_app.rst      |  4 ++++
> >  lib/librte_eal/common/eal_common_options.c | 36
> > +++++++++++++++++++++++++++---
> >  2 files changed, 37 insertions(+), 3 deletions(-)
> >
> > diff --git a/doc/guides/testpmd_app_ug/run_app.rst
> > b/doc/guides/testpmd_app_ug/run_app.rst
> > index 46da1df..85e725f 100644
> > --- a/doc/guides/testpmd_app_ug/run_app.rst
> > +++ b/doc/guides/testpmd_app_ug/run_app.rst
> > @@ -62,6 +62,10 @@ See the DPDK Getting Started Guides for more
> information on these options.
> >      The grouping ``()`` can be omitted for single element group.
> >      The ``@`` can be omitted if cpus and lcores have the same value.
> >
> > +.. Note::
> > +    At a given instance only one core option ``--lcores``, ``-l`` or ``-c`` can be
> used.
> > +
> > +
> >  *   ``--master-lcore ID``
> >
> >      Core ID that is used as master.
> > diff --git a/lib/librte_eal/common/eal_common_options.c
> > b/lib/librte_eal/common/eal_common_options.c
> > index b6d2762..66f0868 100644
> > --- a/lib/librte_eal/common/eal_common_options.c
> > +++ b/lib/librte_eal/common/eal_common_options.c
> > @@ -57,6 +57,9 @@
> >  #include "eal_filesystem.h"
> >
> >  #define BITS_PER_HEX 4
> > +#define LCORE_OPT_LST 1
> > +#define LCORE_OPT_MSK 2
> > +#define LCORE_OPT_MAP 3
> >
> >  const char
> >  eal_short_options[] =
> > @@ -1028,7 +1031,16 @@ eal_parse_common_option(int opt, const char
> *optarg,
> >  			RTE_LOG(ERR, EAL, "invalid coremask\n");
> >  			return -1;
> >  		}
> > -		core_parsed = 1;
> > +
> > +		if (core_parsed) {
> > +			RTE_LOG(ERR, EAL, "Option -c is ignored, because (%s)
> is set!\n",
> > +				(core_parsed == LCORE_OPT_LST) ? "-l" :
> > +				(core_parsed == LCORE_OPT_MAP) ? "--lcore" :
> > +				"-c");
> 
> This block is repeated in slightly different forms 3 times. It should probably be
> replaced using a function or macro to return the appropriate string based on
> core_parsed value.
> 
> Thanks,
> /Bruce

      reply	other threads:[~2018-02-22 10:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180201170732.3225-1-marko.kovacevic@intel.com>
2018-02-02 14:51 ` [dpdk-stable] " Marko Kovacevic
2018-02-02 15:33   ` Bruce Richardson
2018-02-22 10:10     ` O Mahony, Billy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03135AEA779D444E90975C2703F148DC58C93237@IRSMSX107.ger.corp.intel.com \
    --to=billy.o.mahony@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=marko.kovacevic@intel.com \
    --cc=stable@dpdk.org \
    --cc=vipin.varghese@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).