DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, kevin.laatz@intel.com, sunil.pai.g@intel.com,
	jiayu.hu@intel.com
Subject: Re: [dpdk-dev] [PATCH v4 08/12] raw/ioat: add bus driver for device scanning automatically
Date: Tue, 4 May 2021 13:07:25 +0100	[thread overview]
Message-ID: <YJE4/RsuHDcMWiN/@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <3569712.0Jme0LqbK9@thomas>

On Mon, May 03, 2021 at 11:32:04PM +0200, Thomas Monjalon wrote:
> 30/04/2021 17:06, Bruce Richardson:
> > Rather than using a vdev with args, DPDK can scan and initialize the
> > devices automatically using a bus-type driver. This bus does not need to
> > worry about registering device drivers, rather it can initialize the
> > devices directly on probe.
> > 
> > The device instances (queues) to use are detected from /dev with the
> > additional info about them got from /sys.
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> > --- a/doc/guides/rawdevs/ioat.rst
> > +++ b/doc/guides/rawdevs/ioat.rst
> > @@ -78,7 +78,7 @@ Example configuration for a work queue::
> >  
> >          $ accel-config config-wq dsa0/wq0.0 --group-id=0 \
> >             --mode=dedicated --priority=10 --wq-size=8 \
> > -           --type=user --name=app1
> > +           --type=user --name=dpdk_app1
> 
> It looks to belong to commit "make workqueue name configurable in script".
> 

It could, but I think it better belongs here, because this is the commit
where it's important that the name of the queue has the appropriate prefix.

> >  Once the devices have been configured, they need to be enabled::
> >  
> > @@ -114,15 +114,18 @@ the device driver on the EAL commandline, via the ``allowlist`` or ``-a`` flag e
> >  
> >  	$ dpdk-test -a <b:d:f>,max_queues=4
> >  
> > -If the device is bound to the IDXD kernel driver (and previously configured with sysfs),
> > -then a specific work queue needs to be passed to the application via a vdev parameter.
> > -This vdev parameter take the driver name and work queue name as parameters.
> > -For example, to use work queue 0 on Intel\ |reg| DSA instance 0::
> > -
> > -        $ dpdk-test --no-pci --vdev=rawdev_idxd,wq=0.0
> > -
> > -Once probed successfully, the device will appear as a ``rawdev``, that is a
> > -"raw device type" inside DPDK, and can be accessed using APIs from the
> > +For devices bound to the IDXD kernel driver,
> > +the DPDK ioat driver will automatically perform a scan for available workqueues to use.
> > +Any workqueues found listed in ``/dev/dsa`` on the system will be checked in ``/sys``,
> > +and any which have ``dpdk_`` prefix in their name will be automatically probed by the
> > +driver to make them available to the application.
> > +Alternatively, to support use by multiple DPDK processes simultaneously,
> > +the value used as the DPDK ``--file-prefix`` parameter may be used as a workqueue name prefix,
> > +instead of ``dpdk_``,
> > +allowing each DPDK application instance to only use a subset of configured queues.
> > +
> > +Once probed successfully, irrespective of kernel driver, the device will appear as a ``rawdev``,
> > +that is a "raw device type" inside DPDK, and can be accessed using APIs from the
> >  ``rte_rawdev`` library.
> [...]
> > --- a/drivers/raw/ioat/meson.build
> > +++ b/drivers/raw/ioat/meson.build
> > @@ -4,13 +4,13 @@
> >  build = dpdk_conf.has('RTE_ARCH_X86')
> >  reason = 'only supported on x86'
> >  sources = files(
> > +        'idxd_bus.c',
> >          'idxd_pci.c',
> > -        'idxd_vdev.c',
> >          'ioat_common.c',
> >          'ioat_rawdev.c',
> >          'ioat_rawdev_test.c',
> >  )
> > -deps += ['bus_pci', 'bus_vdev', 'mbuf', 'rawdev']
> > +deps += ['bus_pci', 'mbuf', 'rawdev']
> 
> OK to remove the vdev dependency by creating a bus singleton.
> 
> You may want to allow iterating devices of the bus
> by implementing .dev_iterate callback.
> 

I was wondering about that. What is the expected use-case in general for
such iteration?

  reply	other threads:[~2021-05-04 12:07 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 18:20 [dpdk-dev] [PATCH v1 0/6] ioat driver updates Bruce Richardson
2021-03-18 18:20 ` [dpdk-dev] [PATCH v1 1/6] raw/ioat: support limiting queues for idxd PCI device Bruce Richardson
2021-04-26  9:52   ` [dpdk-dev] [PATCH v2 00/12] ioat driver updates Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 01/12] raw/ioat: add unit tests for completion batching Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 02/12] raw/ioat: support limiting queues for idxd PCI device Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 03/12] raw/ioat: add component prefix to log messages Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 04/12] raw/ioat: add explicit padding to descriptor struct Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 05/12] raw/ioat: fix script for configuring small number of queues Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 06/12] raw/ioat: make workqueue name configurable in script Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 07/12] raw/ioat: allow perform operations function to return error Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 08/12] raw/ioat: add bus driver for device scanning automatically Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 09/12] raw/ioat: move idxd functions to separate file Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 10/12] raw/ioat: rework SW ring layout Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 11/12] raw/ioat: add API to query remaining ring space Bruce Richardson
2021-04-26  9:52     ` [dpdk-dev] [PATCH v2 12/12] raw/ioat: report status of completed jobs Bruce Richardson
2021-03-18 18:20 ` [dpdk-dev] [PATCH v1 2/6] raw/ioat: add component prefix to log messages Bruce Richardson
2021-03-18 18:20 ` [dpdk-dev] [PATCH v1 3/6] raw/ioat: add explicit padding to descriptor struct Bruce Richardson
2021-03-18 18:20 ` [dpdk-dev] [PATCH v1 4/6] raw/ioat: rework SW ring layout Bruce Richardson
2021-03-18 18:20 ` [dpdk-dev] [PATCH v1 5/6] raw/ioat: add api to query remaining ring space Bruce Richardson
2021-03-29  7:51   ` Pai G, Sunil
2021-03-18 18:20 ` [dpdk-dev] [PATCH v1 6/6] raw/ioat: add bus driver for device scanning automatically Bruce Richardson
2021-04-30 11:17 ` [dpdk-dev] [PATCH v3 00/12] ioat driver updates Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 01/12] raw/ioat: add unit tests for completion batching Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 02/12] raw/ioat: support limiting queues for idxd PCI device Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 03/12] raw/ioat: add component prefix to log messages Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 04/12] raw/ioat: add explicit padding to descriptor struct Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 05/12] raw/ioat: fix script for configuring small number of queues Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 06/12] raw/ioat: make workqueue name configurable in script Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 07/12] raw/ioat: allow perform operations function to return error Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 08/12] raw/ioat: add bus driver for device scanning automatically Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 09/12] raw/ioat: move idxd functions to separate file Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 10/12] raw/ioat: rework SW ring layout Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 11/12] raw/ioat: add API to query remaining ring space Bruce Richardson
2021-04-30 11:17   ` [dpdk-dev] [PATCH v3 12/12] raw/ioat: report status of completed jobs Bruce Richardson
2021-04-30 15:06 ` [dpdk-dev] [PATCH v4 00/12] ioat driver updates Bruce Richardson
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 01/12] raw/ioat: add unit tests for completion batching Bruce Richardson
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 02/12] raw/ioat: support limiting queues for idxd PCI device Bruce Richardson
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 03/12] raw/ioat: add component prefix to log messages Bruce Richardson
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 04/12] raw/ioat: add explicit padding to descriptor struct Bruce Richardson
2021-05-03 21:20     ` Thomas Monjalon
2021-05-04 12:04       ` Bruce Richardson
2021-05-04 12:16         ` Thomas Monjalon
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 05/12] raw/ioat: fix script for configuring small number of queues Bruce Richardson
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 06/12] raw/ioat: make workqueue name configurable in script Bruce Richardson
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 07/12] raw/ioat: allow perform operations function to return error Bruce Richardson
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 08/12] raw/ioat: add bus driver for device scanning automatically Bruce Richardson
2021-05-03 21:32     ` Thomas Monjalon
2021-05-04 12:07       ` Bruce Richardson [this message]
2021-05-04 12:19         ` Thomas Monjalon
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 09/12] raw/ioat: move idxd functions to separate file Bruce Richardson
2021-05-03 21:35     ` Thomas Monjalon
2021-05-04 12:08       ` Bruce Richardson
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 10/12] raw/ioat: rework SW ring layout Bruce Richardson
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 11/12] raw/ioat: add API to query remaining ring space Bruce Richardson
2021-04-30 15:06   ` [dpdk-dev] [PATCH v4 12/12] raw/ioat: report status of completed jobs Bruce Richardson
2021-05-04 13:14 ` [dpdk-dev] [PATCH v5 00/12] ioat driver updates Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 01/12] raw/ioat: add unit tests for completion batching Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 02/12] raw/ioat: support limiting queues for idxd PCI device Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 03/12] raw/ioat: add component prefix to log messages Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 04/12] raw/ioat: expand descriptor struct to full 64 bytes Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 05/12] raw/ioat: fix script for configuring small number of queues Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 06/12] raw/ioat: make workqueue name configurable in script Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 07/12] raw/ioat: allow perform operations function to return error Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 08/12] raw/ioat: add bus driver for device scanning automatically Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 09/12] raw/ioat: move idxd functions to separate file Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 10/12] raw/ioat: rework SW ring layout Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 11/12] raw/ioat: add API to query remaining ring space Bruce Richardson
2021-05-04 13:14   ` [dpdk-dev] [PATCH v5 12/12] raw/ioat: report status of completed jobs Bruce Richardson
2021-05-04 16:17   ` [dpdk-dev] [PATCH v5 00/12] ioat driver updates 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=YJE4/RsuHDcMWiN/@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.com \
    --cc=kevin.laatz@intel.com \
    --cc=sunil.pai.g@intel.com \
    --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
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).