doc: fix names of UIO drivers
[dpdk.git] / doc / guides / cryptodevs / qat.rst
index f77ce91..96f5ab6 100644 (file)
@@ -127,7 +127,7 @@ Limitations
   optimisations in the GEN3 device. And if a GCM session is initialised on a
   GEN3 device, then attached to an op sent to a GEN1/GEN2 device, it will not be
   enqueued to the device and will be marked as failed. The simplest way to
-  mitigate this is to use the bdf whitelist to avoid mixing devices of different
+  mitigate this is to use the PCI allowlist to avoid mixing devices of different
   generations in the same process if planning to use for GCM.
 * The mixed algo feature on GEN2 is not supported by all kernel drivers. Check
   the notes under the Available Kernel Drivers table below for specific details.
@@ -237,7 +237,7 @@ adjusted to the number of VFs which the QAT common code will need to handle.
         QAT VF may expose two crypto devices, sym and asym, it may happen that the
         number of devices will be bigger than MAX_DEVS and the process will show an error
         during PMD initialisation. To avoid this problem RTE_CRYPTO_MAX_DEVS may be
-        increased or -w, pci-whitelist domain:bus:devid:func option may be used.
+        increased or -a, allow domain:bus:devid:func option may be used.
 
 
 QAT compression PMD needs intermediate buffers to support Deflate compression
@@ -275,7 +275,7 @@ return 0 (thereby avoiding an MMIO) if the device is congested and number of pac
 possible to enqueue is smaller.
 To use this feature the user must set the parameter on process start as a device additional parameter::
 
-  -w 03:01.1,qat_sym_enq_threshold=32,qat_comp_enq_threshold=16
+  -a 03:01.1,qat_sym_enq_threshold=32,qat_comp_enq_threshold=16
 
 All parameters can be used with the same device regardless of order. Parameters are separated
 by comma. When the same parameter is used more than once first occurrence of the parameter
@@ -435,7 +435,7 @@ Check that the VFs are available for use. For example ``lspci -d:37c9`` should
 list 48 VF devices available for a ``C62x`` device.
 
 To complete the installation follow the instructions in
-`Binding the available VFs to the DPDK UIO driver`_.
+`Binding the available VFs to the vfio-pci driver`_.
 
 .. Note::
 
@@ -506,7 +506,8 @@ Confirm the presence of 48 VF devices - 16 per PF::
     lspci -d:37c9
 
 
-To complete the installation - follow instructions in `Binding the available VFs to the DPDK UIO driver`_.
+To complete the installation - follow instructions in
+`Binding the available VFs to the vfio-pci driver`_.
 
 .. Note::
 
@@ -556,10 +557,21 @@ To complete the installation - follow instructions in `Binding the available VFs
       sudo yum install kernel-devel-`uname -r`
 
 
-Binding the available VFs to the DPDK UIO driver
+Binding the available VFs to the vfio-pci driver
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Unbind the VFs from the stock driver so they can be bound to the uio driver.
+Note:
+
+* Please note that due to security issues, the usage of older DPDK igb_uio
+  driver is not recommended. This document shows how to use the more secure
+  vfio-pci driver.
+* If QAT fails to bind to vfio-pci on Linux kernel 5.9+, please see the
+  QATE-39220 and QATE-7495 issues in
+  `01.org doc <https://01.org/sites/default/files/downloads/336211-015-qatsoftwareforlinux-rn-hwv1.7-final.pdf>`_
+  which details the constraint about trusted guests and add `disable_denylist=1`
+  to the vfio-pci params to use QAT. See also `this patch description <https://lkml.org/lkml/2020/7/23/1155>`_.
+
+Unbind the VFs from the stock driver so they can be bound to the vfio-pci driver.
 
 For an Intel(R) QuickAssist Technology DH895xCC device
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -567,10 +579,10 @@ For an Intel(R) QuickAssist Technology DH895xCC device
 The unbind command below assumes ``BDFs`` of ``03:01.00-03:04.07``, if your
 VFs are different adjust the unbind command below::
 
+    cd to the top-level DPDK directory
     for device in $(seq 1 4); do \
         for fn in $(seq 0 7); do \
-            echo -n 0000:03:0${device}.${fn} > \
-            /sys/bus/pci/devices/0000\:03\:0${device}.${fn}/driver/unbind; \
+            usertools/dpdk-devbind.py -u 0000:03:0${device}.${fn}; \
         done; \
     done
 
@@ -581,16 +593,12 @@ The unbind command below assumes ``BDFs`` of ``1a:01.00-1a:02.07``,
 ``3d:01.00-3d:02.07`` and ``3f:01.00-3f:02.07``, if your VFs are different
 adjust the unbind command below::
 
+    cd to the top-level DPDK directory
     for device in $(seq 1 2); do \
         for fn in $(seq 0 7); do \
-            echo -n 0000:1a:0${device}.${fn} > \
-            /sys/bus/pci/devices/0000\:1a\:0${device}.${fn}/driver/unbind; \
-
-            echo -n 0000:3d:0${device}.${fn} > \
-            /sys/bus/pci/devices/0000\:3d\:0${device}.${fn}/driver/unbind; \
-
-            echo -n 0000:3f:0${device}.${fn} > \
-            /sys/bus/pci/devices/0000\:3f\:0${device}.${fn}/driver/unbind; \
+            usertools/dpdk-devbind.py -u 0000:1a:0${device}.${fn}; \
+            usertools/dpdk-devbind.py -u 0000:3d:0${device}.${fn}; \
+            usertools/dpdk-devbind.py -u 0000:3f:0${device}.${fn}; \
         done; \
     done
 
@@ -600,31 +608,29 @@ For Intel(R) QuickAssist Technology C3xxx or 200xx or D15xx device
 The unbind command below assumes ``BDFs`` of ``01:01.00-01:02.07``, if your
 VFs are different adjust the unbind command below::
 
+    cd to the top-level DPDK directory
     for device in $(seq 1 2); do \
         for fn in $(seq 0 7); do \
-            echo -n 0000:01:0${device}.${fn} > \
-            /sys/bus/pci/devices/0000\:01\:0${device}.${fn}/driver/unbind; \
+            usertools/dpdk-devbind.py -u 0000:01:0${device}.${fn}; \
         done; \
     done
 
-Bind to the DPDK uio driver
+Bind to the vfio-pci driver
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Install the DPDK igb_uio driver, bind the VF PCI Device id to it and use lspci
-to confirm the VF devices are now in use by igb_uio kernel driver,
+Load the vfio-pci driver, bind the VF PCI Device id to it using the
+``dpdk-devbind.py`` script then use the ``--status`` option
+to confirm the VF devices are now in use by vfio-pci kernel driver,
 e.g. for the C62x device::
 
-    modprobe uio
-    insmod igb_uio.ko
-    echo "8086 37c9" > /sys/bus/pci/drivers/igb_uio/new_id
-    lspci -vvd:37c9
-
-
-Another way to bind the VFs to the DPDK UIO driver is by using the
-``dpdk-devbind.py`` script::
-
     cd to the top-level DPDK directory
-    ./usertools/dpdk-devbind.py -b igb_uio 0000:03:01.1
+    modprobe vfio-pci
+    usertools/dpdk-devbind.py -b vfio-pci 0000:03:01.1
+    usertools/dpdk-devbind.py --status
+
+Use ``modprobe vfio-pci disable_denylist=1`` from kernel 5.9 onwards.
+See note in the section `Binding the available VFs to the vfio-pci driver`_
+above.
 
 Testing
 ~~~~~~~
@@ -632,19 +638,19 @@ Testing
 QAT SYM crypto PMD can be tested by running the test application::
 
     cd ./<build_dir>/app/test
-    ./dpdk-test -l1 -n1 -w <your qat bdf>
+    ./dpdk-test -l1 -n1 -a <your qat bdf>
     RTE>>cryptodev_qat_autotest
 
 QAT ASYM crypto PMD can be tested by running the test application::
 
     cd ./<build_dir>/app/test
-    ./dpdk-test -l1 -n1 -w <your qat bdf>
+    ./dpdk-test -l1 -n1 -a <your qat bdf>
     RTE>>cryptodev_qat_asym_autotest
 
 QAT compression PMD can be tested by running the test application::
 
     cd ./<build_dir>/app/test
-    ./dpdk-test -l1 -n1 -w <your qat bdf>
+    ./dpdk-test -l1 -n1 -a <your qat bdf>
     RTE>>compressdev_autotest
 
 
@@ -653,15 +659,15 @@ Debugging
 
 There are 2 sets of trace available via the dynamic logging feature:
 
-* pmd.qat_dp exposes trace on the data-path.
-* pmd.qat_general exposes all other trace.
+* pmd.qat.dp exposes trace on the data-path.
+* pmd.qat.general exposes all other trace.
 
 pmd.qat exposes both sets of traces.
 They can be enabled using the log-level option (where 8=maximum log level) on
 the process cmdline, e.g. using any of the following::
 
-    --log-level="pmd.qat_general,8"
-    --log-level="pmd.qat_dp,8"
+    --log-level="pmd.qat.general,8"
+    --log-level="pmd.qat.dp,8"
     --log-level="pmd.qat,8"
 
 .. Note::
@@ -672,4 +678,4 @@ the process cmdline, e.g. using any of the following::
     Also the dynamic global log level overrides both sets of trace, so e.g. no
     QAT trace would display in this case::
 
-       --log-level="7" --log-level="pmd.qat_general,8"
+       --log-level="7" --log-level="pmd.qat.general,8"