From: "John W. Linville" <linville@tuxdriver.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 07/11 1/2] vdev: new registration API
Date: Mon, 14 Apr 2014 10:10:31 -0400 [thread overview]
Message-ID: <20140414141030.GB27324@tuxdriver.com> (raw)
In-Reply-To: <4737854.PZKb5HIIVb@xps13>
On Mon, Apr 14, 2014 at 03:45:31PM +0200, Thomas Monjalon wrote:
> Hi John,
>
> 2014-04-14 09:20, John W. Linville:
> > On Sat, Apr 12, 2014 at 08:05:22AM +0200, Thomas Monjalon wrote:
> > > 11/04/2014 20:08, Richardson, Bruce :
> > > > The ring PMD is probably best treated separately from the other PMDs as
> > > > it's not really a device poll-mode driver. Instead, it's a general
> > > > library that presents an API to make a ring, or set of rings, appear as
> > > > a poll-mode driver ethdev. The EAL command to have one created at
> > > > startup time was just an addon after-the-fact in case someone might
> > > > find it useful :-). However, it's primary purpose was to allow
> > > > applications to be written which could use physical NICs or rings
> > > > interchangeably. For example, an app with multiple stages in a
> > > > pipeline, where each stage just reads from an ethdev without caring if
> > > > it's actually reading from a port or from packets sent from another
> > > > lcore/function etc. Another example might be where an application
> > > > wishes to sometimes loop packets back to itself, in this case it uses
> > > > the C API to create an additional ring ethdev which it uses as output
> > > > port for any packets it wants looped back - no special handling needed,
> > > > everything is an ethdev to it on which it calls rx_burst or tx_burst.
> > > > It's also likely that in future we will develop other libraries which
> > > > wish to present their functionality via rx_burst/tx_burst functions
> > > > i.e. as an ethdev.
> > >
> > > I think you are describing a vdev and you want to be able to instantiate
> > > this vdev in your application code. Right?
> > > So why not make a generic API to be able to instantiate a vdev?
> >
> > Treating vdevs as something inherently different from the
> > hardware-backed PMDs continues to be the wrong approach.
> >
> > Ordinarily the whole point of having an abstraction that looks like
> > a hardware device is so that applications can use either hardware
> > or that abstraction without having to know the difference. Forcing
> > applications to be vdev-aware defeats the whole purpose of wrapping
> > those constructs inside a PMD in the first place.
>
> I think there is a misunderstanding here.
So it seems.
> From the user's point of view, it must be possible to create some virtual
> devices instead of using real ones. That's --vdev option. Then the device is
> handled as any other one thanks to its PMD.
Except that it isn't, or at least it wasn't -- hence my patch to make
rte_pmd_init_all initialize _all_ PMDs rather than just the hardware
ones. I hope that will be remedied once all the dust settles with
the patchsets currently in flight.
> From the application's point of view, all devices must be handled with the
> same API (ethdev). But sometimes, application wants to force creation of
> virtual devices like pmd_ring. So we need an API for this creation part. Then
> the device is still handled with the generic ethdev API.
>
> Do you still see any problem with this approach?
>
> Hope it's clear.
To me, it seems like a strange thing to do. But I am ambivalent
about such an API if others want it.
My main concern on this topic is that applications can be blissfully
unaware of whether they are using virtual devices or not. If someone
actually wants to know about that, then feel free to sell them the rope.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2014-04-14 14:15 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 17:25 [dpdk-dev] [PATCH 00/11] eal: allow virtual pmd drivers as shared lib Olivier Matz
2014-02-28 17:25 ` [dpdk-dev] [PATCH 01/11] mk: use whole-archive option when creating dpdk binaries Olivier Matz
2014-04-10 13:58 ` Thomas Monjalon
2014-02-28 17:25 ` [dpdk-dev] [PATCH 02/11] devices-args: introduce rte_devargs in eal Olivier Matz
2014-02-28 21:39 ` Stephen Hemminger
2014-03-01 12:02 ` Olivier MATZ
2014-03-01 12:14 ` [dpdk-dev] [PATCH v2 " Olivier Matz
2014-04-10 13:59 ` Thomas Monjalon
2014-02-28 17:25 ` [dpdk-dev] [PATCH 03/11] devices-args: use rte_devargs and remove old whitelist code Olivier Matz
2014-03-01 12:14 ` [dpdk-dev] [PATCH v2 " Olivier Matz
2014-04-10 14:01 ` Thomas Monjalon
2014-02-28 17:25 ` [dpdk-dev] [PATCH 04/11] devices-args: add a dump_devargs command in basic test application Olivier Matz
2014-04-10 14:02 ` Thomas Monjalon
2014-02-28 17:25 ` [dpdk-dev] [PATCH 05/11] pci: rename device_list as pci_device_list Olivier Matz
2014-04-10 14:03 ` Thomas Monjalon
2014-02-28 17:25 ` [dpdk-dev] [PATCH 06/11] vdev: rename eal_common_nonpci_devs.c as eal_common_vdev.c Olivier Matz
2014-04-10 14:39 ` Thomas Monjalon
2014-04-11 7:36 ` [dpdk-dev] [PATCH v2 06/11] vdev: rename nonpci_devs as vdev Olivier Matz
2014-04-11 11:25 ` Thomas Monjalon
2014-04-11 11:45 ` [dpdk-dev] [PATCH v3 " Olivier Matz
2014-04-11 12:37 ` Thomas Monjalon
2014-02-28 17:25 ` [dpdk-dev] [PATCH 07/11] vdev: allow external registration of virtual device drivers Olivier Matz
2014-04-10 14:55 ` Thomas Monjalon
2014-04-11 7:36 ` [dpdk-dev] [PATCH v2 07/11 1/2] vdev: new registration API Olivier Matz
2014-04-11 7:36 ` [dpdk-dev] [PATCH v2 07/11 2/2] vdev: allow external registration of virtual device drivers Olivier Matz
2014-04-11 14:31 ` Thomas Monjalon
2014-04-11 10:49 ` [dpdk-dev] [PATCH v2 07/11 1/2] vdev: new registration API Neil Horman
2014-04-11 13:11 ` Thomas Monjalon
2014-04-11 15:50 ` Neil Horman
2014-04-11 16:18 ` Thomas Monjalon
2014-04-11 17:44 ` Neil Horman
2014-04-11 20:08 ` Richardson, Bruce
2014-04-12 6:05 ` Thomas Monjalon
2014-04-12 11:03 ` Neil Horman
2014-04-12 11:23 ` Richardson, Bruce
2014-04-12 14:06 ` Neil Horman
2014-04-14 13:20 ` John W. Linville
2014-04-14 13:45 ` Thomas Monjalon
2014-04-14 13:54 ` Neil Horman
2014-04-14 14:10 ` John W. Linville [this message]
2014-04-14 14:39 ` Thomas Monjalon
2014-04-11 14:31 ` Thomas Monjalon
2014-02-28 17:25 ` [dpdk-dev] [PATCH 08/11] device-args: use a comma instead of semicolon to separate key/values Olivier Matz
2014-04-10 14:05 ` Thomas Monjalon
2014-02-28 17:25 ` [dpdk-dev] [PATCH 09/11] device-args: replace use-device eal option by pci-whitelist and vdev Olivier Matz
2014-03-01 12:14 ` [dpdk-dev] [PATCH v2 " Olivier Matz
2014-04-10 14:06 ` Thomas Monjalon
2014-03-03 17:14 ` [dpdk-dev] [PATCH " Richardson, Bruce
2014-03-04 13:09 ` Olivier MATZ
2014-03-04 13:14 ` Richardson, Bruce
2014-03-24 22:39 ` Thomas Monjalon
2014-02-28 17:25 ` [dpdk-dev] [PATCH 10/11] device-args: allow to provide per pci device command line arguments Olivier Matz
2014-03-01 12:14 ` [dpdk-dev] [PATCH v2 " Olivier Matz
2014-04-10 14:06 ` Thomas Monjalon
2014-02-28 17:25 ` [dpdk-dev] [PATCH 11/11] testpmd: add several dump commands, useful for debug Olivier Matz
2014-03-01 12:15 ` [dpdk-dev] [PATCH v2 " Olivier Matz
2014-04-10 14:08 ` Thomas Monjalon
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=20140414141030.GB27324@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.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).