DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Govindharajan, Hariprasad" <hariprasad.govindharajan@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>
Cc: David Marchand <david.marchand@redhat.com>,
	Thomas Monjalon <thomas@monjalon.net>, dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] eal: add eal_parse_optionlist to parse user input
Date: Fri, 31 Jan 2020 14:42:15 +0000
Message-ID: <BYAPR11MB2648523469C4EB0B8BA60EEA84070@BYAPR11MB2648.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200129111937.031a16a6@hermes.lan>

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Wednesday, January 29, 2020 7:20 PM
> To: Yigit, Ferruh <ferruh.yigit@intel.com>
> Cc: David Marchand <david.marchand@redhat.com>; Thomas Monjalon
> <thomas@monjalon.net>; Govindharajan, Hariprasad
> <hariprasad.govindharajan@intel.com>; dev <dev@dpdk.org>
> Subject: Re: [dpdk-dev] [PATCH 2/2] eal: add eal_parse_optionlist to parse
> user input
> 
> On Wed, 29 Jan 2020 18:07:05 +0000
> Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> 
> > On 1/29/2020 5:44 PM, David Marchand wrote:
> > > On Tue, Jan 28, 2020 at 6:35 PM Ferruh Yigit <ferruh.yigit@intel.com>
> wrote:
> > >> On 1/27/2020 10:30 AM, Hariprasad Govindharajan wrote:
> > >>> In current version, there is a function which parses the corelist
> > >>> based on user value. A new generic function eal_parse_optionlist
> > >>> is added which will parse corelist as well as similar user input
> > >>> so that we can use it as a public API too.
> > >>>
> > >>> Signed-off-by: Hariprasad Govindharajan
> > >>> <hariprasad.govindharajan@intel.com>
> > >>
> > >> Hi David,
> > >>
> > >> Overall this patchset is to add '--portlist' command to testpmd and
> > >> remove existing 64 port limitation.
> > >>
> > >> And in this patch re-uses the exiting parser function in eal and
> > >> converts it to API, question is if eal is good place to have this API, what
> do you think about it?
> > >
> > > Exporting string parsers from the EAL has little value.
> > > Ok we avoid code duplication (and I can see other places in the tree
> > > where it might be used), but in the end we will have to maintain
> > > this API in the ABI when it enters the stable ABI.
> > >
> > > I am for avoiding this.
> > >
> > >
> >
> > The same function can be used in some sample applications too (which
> > are using port mask), so instead of duplicating it multiple times, it
> > would be nice to have this function somewhere that applications can use.
> >
> > Does it makes sense to have a rte_util.c (under in eal or as a
> > separate library) to have this kind of application helper functions?
> 
> It makes sense to have a rte library that handles arbitrary size bitvector and
> has string handling functions. Kind of like what kernel has for the cpuset
> parsing.  This could be used for cpus in EAL and port-masks or other arrays in
> applications.
> 
> But just doing copy/paste of existing code without thinking about how API
> should work is a bad idea.

[Govindharajan, Hariprasad] 
Hi,

PLEASE IGNORE MY PREVIOUS EMAIL.

I am planning to move the existing parser function to the testpmd file instead of keeping it in the eal and will revert the eal back.

Also, I am planning to create an util file in eal with this parser and do a RFC.

@Stephen Hemminger, We already investigated the existing function and then decided to re-use it as seen in the patch. For creating an API, is there any other specific requirements that should be addressed? Please clarify us.

Thanks
G Hariprasad

      parent reply	other threads:[~2020-01-31 14:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-27 10:30 [dpdk-dev] [PATCH 0/2] app/testpmd: add portlist option to the testpmd Hariprasad Govindharajan
2020-01-27 10:30 ` [dpdk-dev] [PATCH 1/2] " Hariprasad Govindharajan
2020-01-31 16:22   ` [dpdk-dev] [PATCH v2] " Hariprasad Govindharajan
2020-01-31 17:41   ` [dpdk-dev] [PATCH v3] " Hariprasad Govindharajan
2020-02-03 16:53   ` [dpdk-dev] [PATCH v4] " Hariprasad Govindharajan
2020-02-04 16:48   ` [dpdk-dev] [PATCH v5] " Hariprasad Govindharajan
2020-02-05 10:42     ` Ferruh Yigit
2020-02-06 15:03   ` [dpdk-dev] [PATCH v6] " Hariprasad Govindharajan
2020-02-10 17:19   ` [dpdk-dev] [PATCH v7] app/testpmd: add portlist option Hariprasad Govindharajan
2020-02-11 12:00     ` Burakov, Anatoly
2020-02-11 15:37       ` Govindharajan, Hariprasad
2020-02-11 15:52   ` [dpdk-dev] [PATCH v8] " Hariprasad Govindharajan
2020-02-11 16:51     ` Burakov, Anatoly
2020-02-12 10:25       ` Govindharajan, Hariprasad
2020-02-12 10:29   ` [dpdk-dev] [PATCH v9] " Hariprasad Govindharajan
2020-02-12 13:03     ` Burakov, Anatoly
2020-02-12 13:59       ` Ferruh Yigit
2020-02-12 17:27         ` Lipiec, Herakliusz
2020-02-13 11:31           ` Ferruh Yigit
2020-01-27 10:30 ` [dpdk-dev] [PATCH 2/2] eal: add eal_parse_optionlist to parse user input Hariprasad Govindharajan
2020-01-28 17:35   ` Ferruh Yigit
2020-01-29 17:44     ` David Marchand
2020-01-29 18:07       ` Ferruh Yigit
2020-01-29 19:19         ` Stephen Hemminger
2020-01-31 11:25           ` Govindharajan, Hariprasad
2020-01-31 14:42           ` Govindharajan, Hariprasad [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=BYAPR11MB2648523469C4EB0B8BA60EEA84070@BYAPR11MB2648.namprd11.prod.outlook.com \
    --to=hariprasad.govindharajan@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git