1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2016 Canonical Limited. All rights reserved.
4 dpdk-devbind Application
5 ========================
7 The ``dpdk-devbind`` tool is a Data Plane Development Kit (DPDK) utility
8 that helps binding and unbinding devices from specific drivers.
9 As well as checking their status in that regard.
12 Running the Application
13 -----------------------
15 The tool has a number of command line options:
17 .. code-block:: console
19 dpdk-devbind [options] DEVICE1 DEVICE2 ....
26 Display usage information and quit
30 Print the current status of all known network interfaces.
31 For each device, it displays the PCI domain, bus, slot and function,
32 along with a text description of the device. Depending upon whether the
33 device is being used by a kernel driver, the ``vfio-pci`` driver, or no
34 driver, other relevant information will be displayed:
35 - the Linux interface name e.g. ``if=eth0``
36 - the driver being used e.g. ``drv=vfio-pci``
37 - any suitable drivers not currently using that device e.g. ``unused=vfio-pci``
38 NOTE: if this flag is passed along with a bind/unbind option, the
39 status display will always occur after the other operations have taken
42 * ``-b driver, --bind=driver``
44 Select the driver to use or "none" to unbind the device
48 Unbind a device (Equivalent to ``-b none``)
52 By default, devices which are used by Linux - as indicated by having
53 routes in the routing table - cannot be modified. Using the ``--force``
54 flag overrides this behavior, allowing active links to be forcibly
56 WARNING: This can lead to loss of network connection and should be used
62 Due to the way VFIO works, there are certain limitations to which devices can be used with VFIO.
63 Mainly it comes down to how IOMMU groups work.
64 Any Virtual Function device can be used with VFIO on its own, but physical devices will require either all ports bound to VFIO,
65 or some of them bound to VFIO while others not being bound to anything at all.
67 If your device is behind a PCI-to-PCI bridge, the bridge will then be part of the IOMMU group in which your device is in.
68 Therefore, the bridge driver should also be unbound from the bridge PCI device for VFIO to work with devices behind the bridge.
72 While any user can run the ``dpdk-devbind.py`` script to view the status of the network ports,
73 binding or unbinding network ports requires root privileges.
79 To display current device status::
83 To bind eth1 from the current driver and move to use vfio-pci::
85 dpdk-devbind --bind=vfio-pci eth1
87 To unbind 0000:01:00.0 from using any driver::
89 dpdk-devbind -u 0000:01:00.0
91 To bind 0000:02:00.0 and 0000:02:00.1 to the ixgbe kernel driver::
93 dpdk-devbind -b ixgbe 02:00.0 02:00.1
95 To check status of all network ports, assign one to the vfio-pci driver and check status again::
97 # Check the status of the available devices.
99 Network devices using DPDK-compatible driver
100 ============================================
103 Network devices using kernel driver
104 ===================================
105 0000:0a:00.0 '82599ES 10-Gigabit' if=eth2 drv=ixgbe unused=
108 # Bind the device to vfio-pci.
109 sudo dpdk-devbind -b vfio-pci 0000:0a:00.0
112 # Recheck the status of the devices.
113 dpdk-devbind --status
114 Network devices using DPDK-compatible driver
115 ============================================
116 0000:0a:00.0 '82599ES 10-Gigabit' drv=vfio-pci unused=