On 6/30/25 11:52 AM, David Marchand via dev wrote: > Once upon a time, there was no driverctl, yet some crazy DPDK guys > were using UIO for userspace packet processing. > They came with their dpdk-devbind.py script and others started > copy/pasting how to use it everywhere. > > Time has passed, and driverctl is now widespread. > driverctl offers persistency (across reboots) of the PCI device > configuration. > > Prefer it and drop documentation about dpdk-devbind.py: the DPDK > documentation already provides plenty examples and is more likely to be > up to date for users who want to rely on it (besides, if any modification > in this tool was to occur, the DPDK documentation is a better place where > to look at). > > Also use more standard tools like ethtool to identify the PCI device > backing a kernel netdev. > > Signed-off-by: David Marchand <david.march...@redhat.com> > --- > Documentation/howto/dpdk.rst | 8 +++-- > Documentation/intro/install/dpdk.rst | 19 ++++++----- > Documentation/topics/dpdk/phy.rst | 40 +++++------------------- > Documentation/topics/dpdk/vhost-user.rst | 4 +-- > 4 files changed, 25 insertions(+), 46 deletions(-) > > diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst > index 73e630b07f..40a7e8fd8b 100644 > --- a/Documentation/howto/dpdk.rst > +++ b/Documentation/howto/dpdk.rst > @@ -228,15 +228,17 @@ described in :ref:`dpdk-testpmd`. Once compiled, run > the application:: > > When you finish testing, bind the vNICs back to kernel:: > > - $ $DPDK_DIR/usertools/dpdk-devbind.py --bind=virtio-pci 0000:00:03.0 > - $ $DPDK_DIR/usertools/dpdk-devbind.py --bind=virtio-pci 0000:00:04.0 > + $ driverctl unset-override 0000:00:03.0 > + $ driverctl unset-override 0000:00:04.0
Not a problem of this patch, but the section above seems awkward and out of place after commit e69e4f5bac5a ("doc: Split dpdk, dpdk-advanced into multiple docs") that moved the initial bind commands to vhost-user.rst... > > .. note:: > > Valid PCI IDs must be passed in above example. The PCI IDs can be retrieved > like so:: > > - $ $DPDK_DIR/usertools/dpdk-devbind.py --status > + $ driverctl -v list-devices | grep -iE '(ethernet|network)' > + 0000:03:00.0 virtio-pci (Virtio network device) > + 0000:04:00.0 virtio-pci (Virtio network device) > > More information on the dpdkvhostuserclient ports can be found in > :doc:`/topics/dpdk/vhost-user`. > diff --git a/Documentation/intro/install/dpdk.rst > b/Documentation/intro/install/dpdk.rst > index 6cff4d81e0..47d79335b2 100644 > --- a/Documentation/intro/install/dpdk.rst > +++ b/Documentation/intro/install/dpdk.rst > @@ -249,14 +249,17 @@ To ensure VT-d is enabled in the kernel, run:: > > If VT-d is not enabled in the kernel, enable it now. > > -Once VT-d is correctly configured, load the required modules and bind the NIC > -to the VFIO driver:: > - > - $ modprobe vfio-pci > - $ /usr/bin/chmod a+x /dev/vfio > - $ /usr/bin/chmod 0666 /dev/vfio/* > - $ $DPDK_DIR/usertools/dpdk-devbind.py --bind=vfio-pci eth1 > - $ $DPDK_DIR/usertools/dpdk-devbind.py --status > +Once VT-d is correctly configured, bind the NIC to the VFIO driver:: > + > + $ ethtool -i enp0s3 | grep bus-info > + bus-info: 0000:01:00.0 > + > + $ driverctl -v list-devices | grep -iE '(ethernet|network)' > + 0000:01:00.0 virtio-pci (Virtio network device) > + $ driverctl set-override 0000:01:00.0 vfio-pci > + $ driverctl -v list-devices | grep -iE '(ethernet|network)' > + 0000:01:00.0 vfio-pci [*] (Virtio network device) > + > > Setup OVS > ~~~~~~~~~ > diff --git a/Documentation/topics/dpdk/phy.rst > b/Documentation/topics/dpdk/phy.rst > index 41b2c9132f..5d9a99013e 100644 > --- a/Documentation/topics/dpdk/phy.rst > +++ b/Documentation/topics/dpdk/phy.rst > @@ -72,11 +72,13 @@ driver for the devices in kernel space. > There are two different tools for binding drivers: :command:`driverctl` which > is a generic tool for persistently configuring alternative device drivers, > and > :command:`dpdk-devbind` which is a DPDK-specific tool and whose changes do > not > -persist across reboots. In addition, there are two options available for this > -kernel space driver - VFIO (Virtual Function I/O) and UIO (Userspace I/O) - > -along with a number of drivers for each option. We will demonstrate examples > of > -both tools and will use the ``vfio-pci`` driver, which is the more secure, > -robust driver of those available. More information can be found in the > +persist across reboots. > +In addition, there are two options available for this kernel space driver > +- VFIO (Virtual Function I/O) and UIO (Userspace I/O) - along with a number > +of drivers for each option. > +We will demonstrate use of the generic tool and will use the ``vfio-pci`` > +driver, which is the more secure, robust driver of those available. > +More details and information about the alternatives can be found in the > `DPDK drivers documentation`_. One problem with vfio-pci driver is that it can't be used by default in VMs that have no IOMMU. Should we mention this and also refer users to the 'VFIO no-IOMMU mode' section of the DPDK docs for this use case? > > To list devices using :command:`driverctl`, run:: > @@ -89,34 +91,6 @@ You can then bind one or more of these devices using the > same tool:: > > $ driverctl set-override 0000:07:00.0 vfio-pci > > -Alternatively, to list devices using :command:`dpdk-devbind`, run:: > - > - $ dpdk-devbind --status > - Network devices using DPDK-compatible driver > - ============================================ > - <none> > - > - Network devices using kernel driver > - =================================== > - 0000:07:00.0 'I350 Gigabit Network Connection 1521' if=enp7s0f0 drv=igb > unused=igb_uio > - 0000:07:00.1 'I350 Gigabit Network Connection 1521' if=enp7s0f1 drv=igb > unused=igb_uio > - > - Other Network devices > - ===================== > - ... > - > -Once again, you can then bind one or more of these devices using the same > -tool:: > - > - $ dpdk-devbind --bind=vfio-pci 0000:07:00.0 > - > -.. versionchanged:: 2.6.0 > - > - Open vSwitch 2.6.0 added support for DPDK 16.07, which in turn renamed the > - former ``dpdk_nic_bind`` tool to ``dpdk-devbind``. > - > -For more information, refer to the `DPDK drivers documentation`_. > - > .. _DPDK drivers documentation: > https://doc.dpdk.org/guides-24.11/linux_gsg/linux_drivers.html > > .. _dpdk-phy-multiqueue: > diff --git a/Documentation/topics/dpdk/vhost-user.rst > b/Documentation/topics/dpdk/vhost-user.rst > index 20e8eb245b..76a5ec6638 100644 > --- a/Documentation/topics/dpdk/vhost-user.rst > +++ b/Documentation/topics/dpdk/vhost-user.rst > @@ -415,8 +415,8 @@ Setup huge pages and DPDK devices using UIO:: > $ mount -t hugetlbfs hugetlbfs /dev/hugepages # only if not already > mounted > $ modprobe uio > $ insmod $DPDK_BUILD/kmod/igb_uio.ko > - $ $DPDK_DIR/usertools/dpdk-devbind.py --status > - $ $DPDK_DIR/usertools/dpdk-devbind.py -b igb_uio 00:03.0 00:04.0 > + $ driverctl set-override 0000:00:03.0 igb_uio > + $ driverctl set-override 0000:00:04.0 igb_uio > > .. note:: > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev