doc: improve configuration examples in idxd guide
[dpdk.git] / doc / guides / dmadevs / idxd.rst
index d4a210b..bdfd3e7 100644 (file)
@@ -55,7 +55,6 @@ such as priority or queue depth, need to be set for each queue.
 To assign an engine to a group::
 
         $ accel-config config-engine dsa0/engine0.0 --group-id=0
-        $ accel-config config-engine dsa0/engine0.1 --group-id=1
 
 To assign work queues to groups for passing descriptors to the engines a similar accel-config command can be used.
 However, the work queues also need to be configured depending on the use case.
@@ -71,7 +70,7 @@ Example configuration for a work queue::
 
         $ accel-config config-wq dsa0/wq0.0 --group-id=0 \
            --mode=dedicated --priority=10 --wq-size=8 \
-           --type=user --name=dpdk_app1
+           --max-batch-size=512 --type=user --name=dpdk_app1
 
 Once the devices have been configured, they need to be enabled::
 
@@ -82,6 +81,32 @@ Check the device configuration::
 
         $ accel-config list
 
+Every Intel\ |reg| DSA instance supports multiple queues and each should be similarly configured.
+As a further example, the following set of commands will configure and enable 4 queues on instance 0,
+giving each an equal share of resources::
+
+        # configure 4 groups, each with one engine
+        accel-config config-engine dsa0/engine0.0 --group-id=0
+        accel-config config-engine dsa0/engine0.1 --group-id=1
+        accel-config config-engine dsa0/engine0.2 --group-id=2
+        accel-config config-engine dsa0/engine0.3 --group-id=3
+
+        # configure 4 queues, putting each in a different group, so each
+        # is backed by a single engine
+        accel-config config-wq dsa0/wq0.0 --group-id=0 --type=user --wq-size=32 \
+            --priority=10 --max-batch-size=1024 --mode=dedicated --name=dpdk_app1
+        accel-config config-wq dsa0/wq0.1 --group-id=1 --type=user --wq-size=32 \
+            --priority=10 --max-batch-size=1024 --mode=dedicated --name=dpdk_app1
+        accel-config config-wq dsa0/wq0.2 --group-id=2 --type=user --wq-size=32 \
+            --priority=10 --max-batch-size=1024 --mode=dedicated --name=dpdk_app1
+        accel-config config-wq dsa0/wq0.3 --group-id=3 --type=user --wq-size=32 \
+            --priority=10 --max-batch-size=1024 --mode=dedicated --name=dpdk_app1
+
+        # enable device and queues
+        accel-config enable-device dsa0
+        accel-config enable-wq dsa0/wq0.0 dsa0/wq0.1 dsa0/wq0.2 dsa0/wq0.3
+
+
 Devices using VFIO/UIO drivers
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -117,6 +142,16 @@ the value used as the DPDK ``--file-prefix`` parameter may be used as a workqueu
 name prefix, instead of ``dpdk_``, allowing each DPDK application instance to only
 use a subset of configured queues.
 
+Additionally, the -a (allowlist) or -b (blocklist) commandline parameters
+are also available to further restrict the device list that will be used.
+If the -a option is used, then any device that passes the ``dpdk_``
+or ``--file-prefix`` prefix condition must also be present in the allow list.
+Similarly, when the block list is used,
+any device that passes the prefix condition must not be in the block list.
+For example, to only use ``wq0.3``, assuming the name prefix condition is met::
+
+       $ dpdk-test -a wq0.3
+
 Once probed successfully, irrespective of kernel driver, the device will appear as a ``dmadev``,
 that is a "DMA device type" inside DPDK, and can be accessed using APIs from the
 ``rte_dmadev`` library.