DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
To: Jan Blunck <jblunck@infradead.org>
Cc: dev <dev@dpdk.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Maxime Coquelin <maxime.coquelin@redhat.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	David Marchand <david.marchand@6wind.com>
Subject: Re: [dpdk-dev] [PATCH 0/9] rte_bus parse API
Date: Thu, 8 Jun 2017 15:04:52 +0200	[thread overview]
Message-ID: <20170608130452.GD18840@bidouze.vm.6wind.com> (raw)
In-Reply-To: <CALe+Z03sCkLdEMFUfkBJEoRK+3rkWegWXMcCQG3nag=4AFt92A@mail.gmail.com>

On Thu, Jun 08, 2017 at 01:38:12PM +0200, Jan Blunck wrote:
> On Wed, Jun 7, 2017 at 9:55 PM, Gaëtan Rivet <gaetan.rivet@6wind.com> wrote:
> > On Wed, Jun 07, 2017 at 07:22:05PM +0200, Jan Blunck wrote:
> >> On Wed, May 24, 2017 at 5:12 PM, Gaetan Rivet <gaetan.rivet@6wind.com> wrote:
> >> > Following the evolutions announced in [1], here is the first part of
> >> > the rte_devargs rework planned for 17.08. The rationale has been partially
> >> > explained in [2].
> >> >
> >> > This first part covers the introduction of the necessary facilities in
> >> > rte_bus to allow for generic device parsing. This API is implemented for
> >> > the virtual and PCI buses. Additionally, this rte_bus evolution is being
> >> > used within rte_devargs to characterize a device type by its bus.
> >> > This work is the first of two parts to reduce the dependency of the EAL
> >> > upon specific bus implementations.
> >> >
> >> > Two public functions are added to rte_bus to help bus recognition:
> >> >
> >> > - rte_bus_from_name
> >> > - rte_bus_from_dev
> >> >
> >> > These functions are made public because the bus handle within devargs
> >> > becomes the generic device type. Recognizing device types is useful for
> >> > buses and PMDs alike.
> >> > The modified rte_devargs parsing allows declaring on the EAL command line
> >> > explicit buses to handle a device. The format is as follow:
> >> >
> >> >   --vdev="virtual:net_ring0" --vdev="net_tap0,iface=tap0"
> >> >   -w PCI:00:02.0 -w 00:03.0
> >> >
> >>
> >> I don't see the point of doing this. The --vdev parameter implicitly
> >> defines the bus by its name (--vdev aka virtual device).
> >>
> >> Why don't you add a commandline "--dev" parameter that supports a
> >> "bus=" devarg? You would need to clarify what that means for other
> >> busses than the virtual one. Is the bus switched into whitelist mode
> >> by that?
> >>
> >>
> >
> > We cannot keep the current -w, -b and --vdev parameter. Those are
> > processed by the EAL, and use specifics from the virtual and PCI buses.
> >
> > The rte_devargs rework has been to make the same functionality generic
> > to all rte_bus. As seen quickly in [2], rte_devargs has two functions:
> >
> > * Validating a device declaration
> > * Keeping the relevant device info until it has been processed.
> >
> 
> I don't agree with the validation step. This is highly
> device/driver/bus specific and I don't believe that just because you
> have created a rte_devargs it is a guarantee that the device is valid.

It is the current API. If an rte_devargs is added to the global list,
then it means that the embedded information has been validated. I
kept the same behavior but made it generic in the new version.

> Besides that it makes statically embedding rte_devargs into other
> structures impossible.

Why? In the failsafe PMD, I statically embed an rte_devargs to avoid
having to insert one in the global device list to remove it afterward.
What limitation to this do you see? I think I misunderstand what you
mean.

> As I see it rte_devargs is a key-value list
> with some keys that are generic. This would make application
> development much easier.
> 
> 

The previously encoded information was:

- Scan policy / bus (in the type field)
- Device designation (PCI location / virtual driver)
- kvargs

Beside the kvargs, none were generic, so I made them so. I
divided the type field into two separate elements as it was conflating
two concepts.

I do not understand how much simpler we can make this. The fields have
not changed, nor has the information itself. Everything has however
been genericized, which is necessary.

> > Both functionalities have been genericized. This results in all parameters
> > being able to be used with all types of devices. This is inherent to the
> > EAL becoming bus-agnostic.
> >
> > Now, it is absolutely possible to rename for example -w as --dev, as it
> > is the expected behavior from users. This however should be discussed by
> > the community, last time I talked about the possibility of switching the
> > default of the PCI bus to whitelist mode the community wasn't all that
> > enthused by the prospect.
> >
> > Finally, I do not like the idea of a special devarg just for declaring
> > explicitly buses for devices. The bus is not a device modifier, nor is
> > it a driver parameter. The bus is a way to define the location of the
> > device on the system. Adding a special "bus=" devargs means having some
> > preprocessing done on devargs upon rte_devargs allocation. This was
> > already abused by the bonding PMD with the driver= parameter. I do not
> > support this and did not want to repeat it. Passing down the device args
> > is a simple process and we should keep it as simple as possible.
> >
> > I know you do not like having the bus as part of the device name.
> > As a compromise, I made the current system flexible and allowed the legacy
> > device definition to be kept.
> >
> > However with a purely generic process, it is necessary to at least offer
> > the possibility to the user to explicitly use a bus, as nothing prevents
> > conflicting device names from existing.
> >
> >> > [2]: http://dpdk.org/ml/archives/dev/2017-May/065670.html
> >
> >> > This explicit bus designation is optional; no evolution is currently
> >> > forced on users to migrate to this new format. The separating character is
> >> > arbitrary and can be any character illegal within a bus name.
> >> > Subsequently, what is allowed within a bus name has been formally
> >> > defined and is now enforced.
> >> >
> >> > [1]: http://dpdk.org/ml/archives/dev/2017-May/065634.html
> >> > [2]: http://dpdk.org/ml/archives/dev/2017-May/065670.html
> >> >
> >> > This patchset depends on:
> >> >
> >> > bus: attach / detach API
> >> > http://dpdk.org/ml/archives/dev/2017-May/066330.html
> >> > http://dpdk.org/dev/patchwork/patch/24489/
> >> >
> >> > Gaetan Rivet (9):
> >> >   bus: fix bus name registration
> >> >   bus: verify bus name on registration
> >> >   bus: introduce parsing functionality
> >> >   vdev: implement parse bus operation
> >> >   pci: implement parse bus operation
> >> >   bus: add helper to find bus from a name
> >> >   bus: add helper to find a bus from a device name
> >> >   vdev: expose bus name
> >> >   devargs: parse bus info
> >> >
> >> >  lib/librte_eal/bsdapp/eal/rte_eal_version.map   |  8 +++
> >> >  lib/librte_eal/common/eal_common_bus.c          | 47 +++++++++++++++++
> >> >  lib/librte_eal/common/eal_common_devargs.c      | 17 +++++-
> >> >  lib/librte_eal/common/eal_common_pci.c          | 19 +++++++
> >> >  lib/librte_eal/common/eal_common_vdev.c         | 70 ++++++++++++++-----------
> >> >  lib/librte_eal/common/eal_private.h             | 16 ++++++
> >> >  lib/librte_eal/common/include/rte_bus.h         | 49 ++++++++++++++++-
> >> >  lib/librte_eal/common/include/rte_devargs.h     |  3 ++
> >> >  lib/librte_eal/common/include/rte_vdev.h        |  2 +
> >> >  lib/librte_eal/linuxapp/eal/rte_eal_version.map |  8 +++
> >> >  10 files changed, 205 insertions(+), 34 deletions(-)
> >> >
> >> > --
> >> > 2.1.4
> >> >
> >
> > --
> > Gaėtan Rivet
> > 6WIND

-- 
Gaëtan Rivet
6WIND

      reply	other threads:[~2017-06-08 13:04 UTC|newest]

Thread overview: 123+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 15:12 Gaetan Rivet
2017-05-24 15:12 ` [dpdk-dev] [PATCH 1/9] bus: fix bus name registration Gaetan Rivet
2017-05-24 15:12 ` [dpdk-dev] [PATCH 2/9] bus: verify bus name on registration Gaetan Rivet
2017-05-24 15:12 ` [dpdk-dev] [PATCH 3/9] bus: introduce parsing functionality Gaetan Rivet
2017-05-24 15:12 ` [dpdk-dev] [PATCH 4/9] vdev: implement parse bus operation Gaetan Rivet
2017-05-24 15:12 ` [dpdk-dev] [PATCH 5/9] pci: " Gaetan Rivet
2017-05-24 15:12 ` [dpdk-dev] [PATCH 6/9] bus: add helper to find bus from a name Gaetan Rivet
2017-05-24 15:12 ` [dpdk-dev] [PATCH 7/9] bus: add helper to find a bus from a device name Gaetan Rivet
2017-06-07 17:28   ` Jan Blunck
2017-06-07 20:03     ` Gaëtan Rivet
2017-06-08 10:45       ` Jan Blunck
2017-06-08 11:36         ` Gaëtan Rivet
2017-06-08 11:40           ` Jan Blunck
2017-06-08 12:51             ` Gaëtan Rivet
2017-06-10  8:50               ` Jan Blunck
2017-06-12 14:21                 ` Gaëtan Rivet
2017-05-24 15:12 ` [dpdk-dev] [PATCH 8/9] vdev: expose bus name Gaetan Rivet
2017-05-24 15:12 ` [dpdk-dev] [PATCH 9/9] devargs: parse bus info Gaetan Rivet
2017-05-24 16:15 ` [dpdk-dev] [PATCH v2 0/9] rte_bus parse API Gaetan Rivet
2017-05-24 16:15   ` [dpdk-dev] [PATCH v2 1/9] bus: fix bus name registration Gaetan Rivet
2017-05-24 16:15   ` [dpdk-dev] [PATCH v2 2/9] bus: verify bus name on registration Gaetan Rivet
2017-05-24 16:15   ` [dpdk-dev] [PATCH v2 3/9] bus: introduce parsing functionality Gaetan Rivet
2017-05-24 16:15   ` [dpdk-dev] [PATCH v2 4/9] vdev: implement parse bus operation Gaetan Rivet
2017-05-24 16:15   ` [dpdk-dev] [PATCH v2 5/9] pci: " Gaetan Rivet
2017-05-24 16:15   ` [dpdk-dev] [PATCH v2 6/9] bus: add helper to find bus from a name Gaetan Rivet
2017-05-24 16:15   ` [dpdk-dev] [PATCH v2 7/9] bus: add helper to find a bus from a device name Gaetan Rivet
2017-05-24 16:15   ` [dpdk-dev] [PATCH v2 8/9] vdev: expose bus name Gaetan Rivet
2017-05-24 16:15   ` [dpdk-dev] [PATCH v2 9/9] devargs: parse bus info Gaetan Rivet
2017-06-01 10:08   ` [dpdk-dev] [PATCH v3 0/9] rte_bus parse API Gaetan Rivet
2017-06-01 10:08     ` [dpdk-dev] [PATCH v3 1/9] bus: fix bus name registration Gaetan Rivet
2017-06-01 10:08     ` [dpdk-dev] [PATCH v3 2/9] bus: verify bus name on registration Gaetan Rivet
2017-06-01 10:08     ` [dpdk-dev] [PATCH v3 3/9] bus: introduce parsing functionality Gaetan Rivet
2017-06-01 10:08     ` [dpdk-dev] [PATCH v3 4/9] vdev: implement parse bus operation Gaetan Rivet
2017-06-01 10:08     ` [dpdk-dev] [PATCH v3 5/9] pci: " Gaetan Rivet
2017-06-01 10:08     ` [dpdk-dev] [PATCH v3 6/9] bus: add helper to find bus from a name Gaetan Rivet
2017-06-01 10:08     ` [dpdk-dev] [PATCH v3 7/9] bus: add helper to find a bus from a device name Gaetan Rivet
2017-06-01 10:08     ` [dpdk-dev] [PATCH v3 8/9] vdev: expose bus name Gaetan Rivet
2017-06-01 10:08     ` [dpdk-dev] [PATCH v3 9/9] devargs: parse bus info Gaetan Rivet
2017-06-07 23:56     ` [dpdk-dev] [PATCH v4 0/9] rte_bus parse API Gaetan Rivet
2017-06-07 23:56       ` [dpdk-dev] [PATCH v4 1/9] bus: fix bus name registration Gaetan Rivet
2017-06-07 23:56       ` [dpdk-dev] [PATCH v4 2/9] bus: verify bus name on registration Gaetan Rivet
2017-06-07 23:56       ` [dpdk-dev] [PATCH v4 3/9] bus: introduce parsing functionality Gaetan Rivet
2017-06-07 23:56       ` [dpdk-dev] [PATCH v4 4/9] vdev: implement parse bus operation Gaetan Rivet
2017-06-07 23:56       ` [dpdk-dev] [PATCH v4 5/9] pci: " Gaetan Rivet
2017-06-07 23:56       ` [dpdk-dev] [PATCH v4 6/9] bus: add helper to find a bus from a bus name Gaetan Rivet
2017-06-07 23:56       ` [dpdk-dev] [PATCH v4 7/9] bus: add helper to find a bus from a device name Gaetan Rivet
2017-06-07 23:56       ` [dpdk-dev] [PATCH v4 8/9] vdev: expose bus name Gaetan Rivet
2017-06-07 23:56       ` [dpdk-dev] [PATCH v4 9/9] devargs: parse bus info Gaetan Rivet
2017-06-20 23:30       ` [dpdk-dev] [PATCH v5 0/7] rte_bus parse API Gaetan Rivet
2017-06-20 23:30         ` [dpdk-dev] [PATCH v5 1/7] bus: fix bus name registration Gaetan Rivet
2017-06-27 15:53           ` Bruce Richardson
2017-06-27 19:19           ` Jan Blunck
2017-07-04  1:05             ` Gaëtan Rivet
2017-06-20 23:30         ` [dpdk-dev] [PATCH v5 2/7] bus: introduce parsing functionality Gaetan Rivet
2017-06-27 15:54           ` Bruce Richardson
2017-06-27 19:26           ` Jan Blunck
2017-07-04  1:35             ` Gaëtan Rivet
2017-06-20 23:30         ` [dpdk-dev] [PATCH v5 3/7] vdev: implement parse bus operation Gaetan Rivet
2017-06-27 15:59           ` Bruce Richardson
2017-06-20 23:30         ` [dpdk-dev] [PATCH v5 4/7] pci: " Gaetan Rivet
2017-06-27 16:18           ` Bruce Richardson
2017-06-20 23:30         ` [dpdk-dev] [PATCH v5 5/7] bus: add helper to find a bus from a device name Gaetan Rivet
2017-06-27 16:26           ` Bruce Richardson
2017-06-27 18:55           ` Jan Blunck
2017-06-28 17:03             ` Thomas Monjalon
2017-06-29  7:56               ` Jan Blunck
2017-06-29  8:21                 ` Thomas Monjalon
2017-06-29 10:23                 ` Gaëtan Rivet
2017-06-29 10:30                   ` Richardson, Bruce
2017-06-20 23:30         ` [dpdk-dev] [PATCH v5 6/7] vdev: expose bus name Gaetan Rivet
2017-06-20 23:30         ` [dpdk-dev] [PATCH v5 7/7] devargs: parse bus info Gaetan Rivet
2017-06-27 16:01         ` [dpdk-dev] [PATCH v5 0/7] rte_bus parse API Bruce Richardson
2017-07-04  0:58         ` [dpdk-dev] [PATCH v6 0/6] " Gaetan Rivet
2017-07-04  0:58           ` [dpdk-dev] [PATCH v6 1/6] bus: fix bus name registration Gaetan Rivet
2017-07-04 21:43             ` [dpdk-dev] [PATCH] bus: fix driver registration Thomas Monjalon
2017-07-05  5:47               ` Shreyansh Jain
2017-07-05  6:01                 ` Shreyansh Jain
2017-07-04  0:58           ` [dpdk-dev] [PATCH v6 2/6] bus: introduce parsing functionality Gaetan Rivet
2017-07-04  0:58           ` [dpdk-dev] [PATCH v6 3/6] vdev: implement parse bus operation Gaetan Rivet
2017-07-04  0:58           ` [dpdk-dev] [PATCH v6 4/6] pci: " Gaetan Rivet
2017-07-04  0:58           ` [dpdk-dev] [PATCH v6 5/6] bus: add helper to find a bus from a device name Gaetan Rivet
2017-07-04 12:28             ` Gaëtan Rivet
2017-07-04  0:58           ` [dpdk-dev] [PATCH v6 6/6] devargs: parse bus info Gaetan Rivet
2017-07-04 23:55           ` [dpdk-dev] [PATCH v7 0/6] rte_bus parse API Gaetan Rivet
2017-07-04 23:55             ` [dpdk-dev] [PATCH v7 1/6] bus: fix driver registration Gaetan Rivet
2017-07-05 13:03               ` Shreyansh Jain
2017-07-06  6:05               ` santosh
2017-07-04 23:55             ` [dpdk-dev] [PATCH v7 2/6] bus: introduce parsing functionality Gaetan Rivet
2017-07-05 13:04               ` Shreyansh Jain
2017-07-06  9:19               ` santosh
2017-07-06 12:30                 ` Gaëtan Rivet
2017-07-06 13:12                   ` santosh
2017-07-06 13:30                     ` Gaëtan Rivet
2017-07-04 23:55             ` [dpdk-dev] [PATCH v7 3/6] vdev: implement parse bus operation Gaetan Rivet
2017-07-05 13:16               ` Shreyansh Jain
2017-07-06  9:35               ` santosh
2017-07-04 23:55             ` [dpdk-dev] [PATCH v7 4/6] pci: " Gaetan Rivet
2017-07-04 23:55             ` [dpdk-dev] [PATCH v7 5/6] bus: add helper to find a bus from a device name Gaetan Rivet
2017-07-05 13:35               ` Shreyansh Jain
2017-07-05 13:45                 ` Gaëtan Rivet
2017-07-05 14:12                   ` Shreyansh Jain
2017-07-06 10:10                   ` Thomas Monjalon
2017-07-06 11:37                     ` Gaëtan Rivet
2017-07-04 23:55             ` [dpdk-dev] [PATCH v7 6/6] devargs: parse bus info Gaetan Rivet
2017-07-05 18:03               ` Stephen Hemminger
2017-07-06  9:07               ` Shreyansh Jain
2017-07-06 10:00                 ` Gaëtan Rivet
2017-07-06 13:17                   ` Shreyansh Jain
2017-07-07  0:03             ` [dpdk-dev] [PATCH v8 0/6] rte_bus parse API Gaetan Rivet
2017-07-07  0:03               ` [dpdk-dev] [PATCH v8 1/6] bus: fix driver registration Gaetan Rivet
2017-07-07  0:03               ` [dpdk-dev] [PATCH v8 2/6] bus: introduce parsing functionality Gaetan Rivet
2017-07-07  0:03               ` [dpdk-dev] [PATCH v8 3/6] vdev: implement parse bus operation Gaetan Rivet
2017-07-07  0:03               ` [dpdk-dev] [PATCH v8 4/6] pci: " Gaetan Rivet
2017-07-07  0:03               ` [dpdk-dev] [PATCH v8 5/6] bus: add helper to find a bus from a device name Gaetan Rivet
2017-07-07  0:03               ` [dpdk-dev] [PATCH v8 6/6] devargs: parse bus info Gaetan Rivet
2017-07-07  0:45                 ` Stephen Hemminger
2017-07-07  8:31                   ` Gaëtan Rivet
2017-07-08 20:31                     ` Thomas Monjalon
2017-07-08 20:30               ` [dpdk-dev] [PATCH v8 0/6] rte_bus parse API Thomas Monjalon
2017-06-07 17:22 ` [dpdk-dev] [PATCH 0/9] " Jan Blunck
2017-06-07 19:55   ` Gaëtan Rivet
2017-06-08 11:38     ` Jan Blunck
2017-06-08 13:04       ` Gaëtan Rivet [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=20170608130452.GD18840@bidouze.vm.6wind.com \
    --to=gaetan.rivet@6wind.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    --cc=jblunck@infradead.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=stephen@networkplumber.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).