dma/idxd: add skeleton for VFIO based DSA device
[dpdk.git] / doc / guides / dmadevs / idxd.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2021 Intel Corporation.
3
4 .. include:: <isonum.txt>
5
6 IDXD DMA Device Driver
7 ======================
8
9 The ``idxd`` dmadev driver provides a poll-mode driver (PMD) for Intel\ |reg|
10 Data Streaming Accelerator `(Intel DSA)
11 <https://software.intel.com/content/www/us/en/develop/articles/intel-data-streaming-accelerator-architecture-specification.html>`_.
12 This PMD can be used in conjunction with Intel\ |reg| DSA devices to offload
13 data operations, such as data copies, to hardware, freeing up CPU cycles for
14 other tasks.
15
16 Hardware Requirements
17 ----------------------
18
19 The ``dpdk-devbind.py`` script, included with DPDK, can be used to show the
20 presence of supported hardware. Running ``dpdk-devbind.py --status-dev dma``
21 will show all the DMA devices on the system, including IDXD supported devices.
22 Intel\ |reg| DSA devices, are currently (at time of writing) appearing
23 as devices with type “0b25”, due to the absence of pci-id database entries for
24 them at this point.
25
26 Compilation
27 ------------
28
29 For builds using ``meson`` and ``ninja``, the driver will be built when the
30 target platform is x86-based. No additional compilation steps are necessary.
31
32 Device Setup
33 -------------
34
35 Devices using VFIO/UIO drivers
36 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37
38 The HW devices to be used will need to be bound to a user-space IO driver for use.
39 The ``dpdk-devbind.py`` script can be used to view the state of the devices
40 and to bind them to a suitable DPDK-supported driver, such as ``vfio-pci``.
41 For example::
42
43         $ dpdk-devbind.py -b vfio-pci 6a:01.0
44
45 Device Probing and Initialization
46 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47
48 For devices bound to a suitable DPDK-supported VFIO/UIO driver, the HW devices will
49 be found as part of the device scan done at application initialization time without
50 the need to pass parameters to the application.
51
52 For Intel\ |reg| DSA devices, DPDK will automatically configure the device with the
53 maximum number of workqueues available on it, partitioning all resources equally
54 among the queues.
55 If fewer workqueues are required, then the ``max_queues`` parameter may be passed to
56 the device driver on the EAL commandline, via the ``allowlist`` or ``-a`` flag e.g.::
57
58         $ dpdk-test -a <b:d:f>,max_queues=4