From: Bruce Richardson <bruce.richardson@intel.com>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH v2 1/2] doc: add devargs documentation
Date: Fri, 19 Dec 2025 13:57:51 +0000 [thread overview]
Message-ID: <aUVZ34pv5pJ0m9fl@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <e3241bd4c2224616c60b7f4b0145d37ebf612344.1766150746.git.anatoly.burakov@intel.com>
On Fri, Dec 19, 2025 at 01:25:55PM +0000, Anatoly Burakov wrote:
> Currently, the devargs syntax documentation is missing from the
> programmer's guide, and is only documented implicitly through the devargs
> API headers. Add a detailed description of the two supported devargs
> syntaxes.
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>
> Notes:
> v2:
> - Made generic syntax the primary syntax
> - Removed summary
> - Moved index link to after ethdev/index
>
> doc/guides/prog_guide/dev_args.rst | 234 +++++++++++++++++++++++++++++
> doc/guides/prog_guide/index.rst | 1 +
> 2 files changed, 235 insertions(+)
> create mode 100644 doc/guides/prog_guide/dev_args.rst
>
> diff --git a/doc/guides/prog_guide/dev_args.rst b/doc/guides/prog_guide/dev_args.rst
> new file mode 100644
> index 0000000000..a8025d383b
> --- /dev/null
> +++ b/doc/guides/prog_guide/dev_args.rst
> @@ -0,0 +1,234 @@
> +.. SPDX-License-Identifier: BSD-3-Clause
> + Copyright(c) 2025 Intel Corporation.
> +
> +.. _device_arguments:
> +
> +Device Arguments
> +================
> +
> +Introduction
> +------------
> +
> +Device arguments (devargs) provide a standardized way to specify and configure devices in DPDK applications.
> +Devargs are used both at EAL initialization time (via command-line options) and at runtime (via hotplug APIs) to identify devices and pass configuration parameters to them.
> +
> +A devargs string can specify identifiers and arguments at multiple levels:
> +
> +* **Bus identifier and arguments**: Which bus handles the device (e.g., ``pci``, ``vdev``) and bus-level parameters
> +* **Class identifier and arguments**: Device class (e.g., ``eth``, ``crypto``) and class-level parameters
> +* **Driver identifier and arguments**: The specific driver and its driver-specific parameters
> +
> +DPDK supports two devargs syntaxes:
> +
> +1. **Multi-layer syntax** - Generic syntax for device filtering by bus, class, or driver.
> +2. **Simplified syntax** - Legacy simplified syntax.
> +
> +
> +Devargs Syntax
> +--------------
> +
> +Generic Syntax
> +~~~~~~~~~~~~~~
> +
> +Generic devargs syntax is meant to cover all use cases supported by devargs infrastructure, such as passing arguments to various layers or matching multiple devices.
> +The basic syntax format is as follows:
> +
> +.. code-block:: none
> +
> + bus=<busname>,<bus_args>/class=<classname>,<class_args>/driver=<drvname>,<driver_args>
> +
> +This allows the user to specify:
> +
> +* ``bus`` layer: bus identifier, as well as bus-level arguments
> +* ``class`` layer: class identifier, as well as class-level arguments
> +* ``driver`` layer: driver identifier, as well as driver-specific parameters
> +
> +.. note::
> + By default, multi-layer syntax is driver-centric and will apply to all devices using a particular bus, class, and driver combination.
> + To target a specific device, a device-identifying argument can be provided to the bus layer. The specific key depends on the bus:
> + for PCI use ``addr=`` (e.g. ``bus=pci,addr=0000:02:00.0``), for most other buses use ``name=`` (e.g. ``bus=vdev,name=net_ring0``).
> +
> +**Example**:
> +
> +.. code-block:: none
> +
> + bus=pci/class=eth/driver=ice,representor=[0-3]
> +
> +The above example will pass "representor=[0-3]" devarg to each device matching the provided criteria (PCI bus, Ethernet class, in use by ``ice`` driver).
> +
> +Simplified syntax
> +~~~~~~~~~~~~~~~~~
> +
> +In cases where the full syntax is not required, devargs can be used with simplified format that targets specific devices only:
> +
> +.. code-block:: none
> +
> + [bus:]device_identifier[,arg1=val1,arg2=val2,...]
> +
> +Where:
> +
> +* ``bus:`` is an optional prefix specifying the bus name (pci, vdev, auxiliary, etc.)
> +* ``device_identifier`` uniquely identifies the device on its bus
> +* ``arg1=val1,arg2=val2,...`` are optional driver-specific configuration parameters
> +
> +The arguments are provided to the driver, but the driver name itself is inferred from the device and does not need to be specified.
> +
> +**Examples**:
> +
> +.. code-block:: none
> +
> + 0000:02:00.0 # PCI device, no arguments
> + 0000:02:00.0,txq_inline=128 # PCI device with driver arguments
I would look to include some examples with the "0000:" omitted at the start
of the PCI addresses, since that shortened form should work.
/Bruce
prev parent reply other threads:[~2025-12-19 13:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 12:13 [PATCH v1 " Anatoly Burakov
2025-11-14 12:13 ` [PATCH v1 2/2] doc: add device hotplug documentation Anatoly Burakov
2025-11-30 15:44 ` [PATCH v1 1/2] doc: add devargs documentation Thomas Monjalon
2025-12-02 17:35 ` Burakov, Anatoly
2025-12-19 13:25 ` [PATCH v2 " Anatoly Burakov
2025-12-19 13:25 ` [PATCH v2 2/2] doc: add device hotplug documentation Anatoly Burakov
2025-12-19 14:01 ` Morten Brørup
2025-12-19 13:57 ` Bruce Richardson [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=aUVZ34pv5pJ0m9fl@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=anatoly.burakov@intel.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).