From: Thomas F Herbert <therbert@redhat.com>
To: dev@dpdk.org
Subject: Re: [dpdk-dev] rte_eal_init() alternative?
Date: Fri, 9 Oct 2015 17:03:00 +0100 [thread overview]
Message-ID: <5617E534.4060808@redhat.com> (raw)
In-Reply-To: <56179992.3080501@redhat.com>
On 10/9/15 11:40 AM, Panu Matilainen wrote:
> On 10/09/2015 01:03 PM, Montorsi, Francesco wrote:
>> Hi Panu,
>>
>>
>>
>>> -----Original Message-----
>>> From: Panu Matilainen [mailto:pmatilai@redhat.com]
>>> Sent: venerdì 9 ottobre 2015 10:26
>>> To: Montorsi, Francesco <fmontorsi@empirix.com>; Thomas Monjalon
>>> <thomas.monjalon@6wind.com>
>>> Cc: dev@dpdk.org
>>> Subject: Re: [dpdk-dev] rte_eal_init() alternative?
>>>
>>>> Something like the attached patch.
>>>
>>> It seems the patch missed the boat :)
>>
>> Correct, sorry. I'm attaching it now.
>>
>>
>>>
>>>> Note that the attached patch exposes also a way to skip the argv/argc
>>>> configuration process by directly providing a populated configuration
>>>> structure...
>>>> Let me know what you think about it (the patch is just a draft and
>>>> needs more work).
>>>
>>> Can't comment on what I've not seen, but based on comments seen on this
>>> list, having an alternative way to initialize with structures would
>>> be welcomed
>>> by many. The downside is that those structures will need to be
>>> exposed in
>>> the API forever which means any changes there are subject to the ABI
>>> process.
>>>
>> Perhaps the init function taking a structure could be an exception
>> for ABI changes... i.e., the format of the configuration is not
>> garantueed to stay the same between different versions, and
>> applications using a shared build of DPDK libraries must avoid using
>> the configuration structure... would that be a possible solution?
>
> Sorry but no, down the path of exceptions lies madness. It'd also be
> giving the middle finger to people using DPDK as a shared library.
>
> Exported structs are always a PITA and even more so in something like
> configuration which is expected to keep expanding and/or otherwise
> changing.
>
> I'd much rather see an rte_eal_init() which takes struct *rte_cfgfile
> as the configuration argument. That, plus maybe enhance librte_cfgfile
> to allow constructing one entirely in memory + setting values in
> addition to getting.
>
> - Panu -
It is very difficult for application writers to write their own command
parsers with implementation for -h option. How about a function that
would verify the init parameters and return with a benign error if the
options are not correct.
>
>
>
>
>> Thanks,
>> Francesco
>>
>>
>>
>
--
Thomas F Herbert Red Hat
next prev parent reply other threads:[~2015-10-09 16:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 12:49 Montorsi, Francesco
2015-09-02 12:56 ` Bruce Richardson
2015-09-02 13:10 ` Thomas Monjalon
2015-09-02 18:17 ` Don Provan
2015-09-02 19:00 ` Stephen Hemminger
2015-09-02 20:50 ` Marc Sune
2015-09-02 21:08 ` Thomas Monjalon
2015-09-02 22:01 ` Wiles, Keith
2015-09-08 18:01 ` Don Provan
2015-09-11 17:15 ` Wiles, Keith
2015-10-08 14:58 ` Montorsi, Francesco
2015-10-09 8:25 ` Panu Matilainen
2015-10-09 10:03 ` Montorsi, Francesco
2015-10-09 10:13 ` Montorsi, Francesco
2015-10-09 11:12 ` Panu Matilainen
2015-10-09 10:40 ` Panu Matilainen
2015-10-09 16:03 ` Thomas F Herbert [this message]
2015-09-02 14:08 ` Jay Rolette
2015-09-02 19:23 ` Zoltan Kiss
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=5617E534.4060808@redhat.com \
--to=therbert@redhat.com \
--cc=dev@dpdk.org \
/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).