[dpdk-dev,1/2] eal: internalize devargs parsing
Checks
Commit Message
This is going to get cleaned up in future releases so lets not expose
this API unnecessarily.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
doc/guides/rel_notes/deprecation.rst | 2 +-
lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 -
lib/librte_eal/common/eal_common_devargs.c | 2 +-
lib/librte_eal/common/include/rte_devargs.h | 20 --------------------
lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 -
5 files changed, 2 insertions(+), 24 deletions(-)
Comments
09/07/2017 11:28, Jan Blunck:
> This is going to get cleaned up in future releases so lets not expose
> this API unnecessarily.
>
> Signed-off-by: Jan Blunck <jblunck@infradead.org>
> ---
> --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> @@ -211,7 +211,6 @@ DPDK_17.08 {
> EXPERIMENTAL {
> global:
>
> - rte_eal_devargs_parse;
> rte_eal_hotplug_add;
> rte_eal_hotplug_remove;
We need to expose it temporarily as experimental in order to let
the failsafe driver calling it.
When reworked in 17.11, this function or an equivalent should allow
failsafe (and maybe bonding) to parse slave declaration.
On Sun, Jul 9, 2017 at 6:28 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> 09/07/2017 11:28, Jan Blunck:
>> This is going to get cleaned up in future releases so lets not expose
>> this API unnecessarily.
>>
>> Signed-off-by: Jan Blunck <jblunck@infradead.org>
>> ---
>> --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
>> +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
>> @@ -211,7 +211,6 @@ DPDK_17.08 {
>> EXPERIMENTAL {
>> global:
>>
>> - rte_eal_devargs_parse;
>> rte_eal_hotplug_add;
>> rte_eal_hotplug_remove;
>
> We need to expose it temporarily as experimental in order to let
> the failsafe driver calling it.
> When reworked in 17.11, this function or an equivalent should allow
> failsafe (and maybe bonding) to parse slave declaration.
There is no need for the failsafe PMD to parse it to a rte_devargs
because it can just pass the string to the hotplug API.
On Sun, Jul 9, 2017 at 6:46 AM, Jan Blunck <jblunck@infradead.org> wrote:
> On Sun, Jul 9, 2017 at 6:28 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
>> 09/07/2017 11:28, Jan Blunck:
>>> This is going to get cleaned up in future releases so lets not expose
>>> this API unnecessarily.
>>>
>>> Signed-off-by: Jan Blunck <jblunck@infradead.org>
>>> ---
>>> --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
>>> +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
>>> @@ -211,7 +211,6 @@ DPDK_17.08 {
>>> EXPERIMENTAL {
>>> global:
>>>
>>> - rte_eal_devargs_parse;
>>> rte_eal_hotplug_add;
>>> rte_eal_hotplug_remove;
>>
>> We need to expose it temporarily as experimental in order to let
>> the failsafe driver calling it.
>> When reworked in 17.11, this function or an equivalent should allow
>> failsafe (and maybe bonding) to parse slave declaration.
>
> There is no need for the failsafe PMD to parse it to a rte_devargs
> because it can just pass the string to the hotplug API.
Just in case it isn't clear enough: the failsafe PMD is using the
rte_devargs structure to get the bus name. The bus name is explicitly
given in the hotplug API. There is really no need to deal with
rte_devargs here.
On Sun, Jul 09, 2017 at 06:56:25AM -0400, Jan Blunck wrote:
> On Sun, Jul 9, 2017 at 6:46 AM, Jan Blunck <jblunck@infradead.org> wrote:
> > On Sun, Jul 9, 2017 at 6:28 AM, Thomas Monjalon <thomas@monjalon.net> wrote:
> >> 09/07/2017 11:28, Jan Blunck:
> >>> This is going to get cleaned up in future releases so lets not expose
> >>> this API unnecessarily.
> >>>
> >>> Signed-off-by: Jan Blunck <jblunck@infradead.org>
> >>> ---
> >>> --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> >>> +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> >>> @@ -211,7 +211,6 @@ DPDK_17.08 {
> >>> EXPERIMENTAL {
> >>> global:
> >>>
> >>> - rte_eal_devargs_parse;
> >>> rte_eal_hotplug_add;
> >>> rte_eal_hotplug_remove;
> >>
> >> We need to expose it temporarily as experimental in order to let
> >> the failsafe driver calling it.
> >> When reworked in 17.11, this function or an equivalent should allow
> >> failsafe (and maybe bonding) to parse slave declaration.
> >
> > There is no need for the failsafe PMD to parse it to a rte_devargs
> > because it can just pass the string to the hotplug API.
>
> Just in case it isn't clear enough: the failsafe PMD is using the
> rte_devargs structure to get the bus name. The bus name is explicitly
> given in the hotplug API. There is really no need to deal with
> rte_devargs here.
The fail-safe PMD uses the rte_devargs parsing helper to find the
bus name from a device argument handled to it.
As you point out, the bus name is explicitly given in the hotplug API.
In order to be able to explicitly give the bus name, the caller has to
know it. This is done by parsing devargs and using the result.
@@ -63,4 +63,4 @@ Deprecation Notices
* eal: the following function is deprecated starting from 17.08 and will
be removed in 17.11:
- - ``rte_eal_parse_devargs_str``, replaced by ``rte_eal_devargs_parse``
+ - ``rte_eal_parse_devargs_str``
@@ -206,7 +206,6 @@ DPDK_17.08 {
EXPERIMENTAL {
global:
- rte_eal_devargs_parse;
rte_eal_hotplug_add;
rte_eal_hotplug_remove;
@@ -83,7 +83,7 @@ bus_name_cmp(const struct rte_bus *bus, const void *name)
return strncmp(bus->name, name, strlen(bus->name));
}
-int
+static int
rte_eal_devargs_parse(const char *dev, struct rte_devargs *da)
{
struct rte_bus *bus = NULL;
@@ -119,26 +119,6 @@ int rte_eal_parse_devargs_str(const char *devargs_str,
char **drvname, char **drvargs);
/**
- * Parse a device string.
- *
- * Verify that a bus is capable of handling the device passed
- * in argument. Store which bus will handle the device, its name
- * and the eventual device parameters.
- *
- * @param dev
- * The device declaration string.
- * @param da
- * The devargs structure holding the device information.
- *
- * @return
- * - 0 on success.
- * - Negative errno on error.
- */
-int
-rte_eal_devargs_parse(const char *dev,
- struct rte_devargs *da);
-
-/**
* Add a device to the user device list
*
* For PCI devices, the format of arguments string is "PCI_ADDR" or
@@ -211,7 +211,6 @@ DPDK_17.08 {
EXPERIMENTAL {
global:
- rte_eal_devargs_parse;
rte_eal_hotplug_add;
rte_eal_hotplug_remove;