test: move to app directory
[dpdk.git] / doc / guides / cryptodevs / qat.rst
index 67b84b3..9207bfa 100644 (file)
@@ -7,7 +7,7 @@ Intel(R) QuickAssist (QAT) Crypto Poll Mode Driver
 QAT documentation consists of three parts:
 
 * Details of the symmetric crypto service below.
-* Details of the `compression service <http://dpdk.org/doc/guides/compressdevs/qat_comp.html>`_
+* Details of the `compression service <http://doc.dpdk.org/guides/compressdevs/qat_comp.html>`_
   in the compressdev drivers section.
 * Details of building the common QAT infrastructure and the PMDs to support the
   above services. See :ref:`building_qat` below.
@@ -23,6 +23,7 @@ hardware accelerator devices:
 * ``Intel QuickAssist Technology C62x``
 * ``Intel QuickAssist Technology C3xxx``
 * ``Intel QuickAssist Technology D15xx``
+* ``Intel QuickAssist Technology C4xxx``
 
 
 Features
@@ -62,10 +63,12 @@ Hash algorithms:
 * ``RTE_CRYPTO_AUTH_KASUMI_F9``
 * ``RTE_CRYPTO_AUTH_AES_GMAC``
 * ``RTE_CRYPTO_AUTH_ZUC_EIA3``
+* ``RTE_CRYPTO_AUTH_AES_CMAC``
 
 Supported AEAD algorithms:
 
 * ``RTE_CRYPTO_AEAD_AES_GCM``
+* ``RTE_CRYPTO_AEAD_AES_CCM``
 
 
 Limitations
@@ -76,10 +79,9 @@ Limitations
 * SNOW 3G (UIA2) and ZUC (EIA3) supported only if hash length and offset fields are byte-multiple.
 * No BSD support as BSD QAT kernel driver not available.
 * ZUC EEA3/EIA3 is not supported by dh895xcc devices
-* Maximum additional authenticated data (AAD) for GCM is 240 bytes long.
+* Maximum additional authenticated data (AAD) for GCM is 240 bytes long and must be passed to the device in a buffer rounded up to the nearest block-size multiple (x16) and padded with zeros.
 * Queue pairs are not thread-safe (that is, within a single queue pair, RX and TX from different lcores is not supported).
 
-
 Extra notes on KASUMI F9
 ~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -121,7 +123,7 @@ Configuring and Building the DPDK QAT PMDs
 
 
 Further information on configuring, building and installing DPDK is described
-`here <http://dpdk.org/doc/guides/linux_gsg/build_dpdk.html>`_.
+`here <http://doc.dpdk.org/guides/linux_gsg/build_dpdk.html>`_.
 
 
 Quick instructions for QAT cryptodev PMD are as follows:
@@ -142,6 +144,8 @@ Quick instructions for QAT compressdev PMD are as follows:
        make
 
 
+.. _building_qat_config:
+
 Build Configuration
 ~~~~~~~~~~~~~~~~~~~
 
@@ -153,6 +157,7 @@ These are the build configuration options affecting QAT, and their default value
        CONFIG_RTE_LIBRTE_PMD_QAT_SYM=n
        CONFIG_RTE_PMD_QAT_MAX_PCI_DEVICES=48
        CONFIG_RTE_PMD_QAT_COMP_SGL_MAX_SEGMENTS=16
+       CONFIG_RTE_PMD_QAT_COMP_IM_BUFFER_SIZE=65536
 
 CONFIG_RTE_LIBRTE_PMD_QAT must be enabled for any QAT PMD to be built.
 
@@ -165,14 +170,30 @@ options and is built by default.
 The number of VFs per PF varies - see table below. If multiple QAT packages are
 installed on a platform then CONFIG_RTE_PMD_QAT_MAX_PCI_DEVICES should be
 adjusted to the number of VFs which the QAT common code will need to handle.
-Note, there is a separate config item for max cryptodevs CONFIG_RTE_CRYPTO_MAX_DEVS,
-if necessary this should be adjusted to handle the total of QAT and other devices
-which the process will use.
+Note, there are separate config items for max cryptodevs CONFIG_RTE_CRYPTO_MAX_DEVS
+and max compressdevs CONFIG_RTE_COMPRESS_MAX_DEVS, if necessary these should be
+adjusted to handle the total of QAT and other devices which the process will use.
 
 QAT allocates internal structures to handle SGLs. For the compression service
 CONFIG_RTE_PMD_QAT_COMP_SGL_MAX_SEGMENTS can be changed if more segments are needed.
 An extra (max_inflight_ops x 16) bytes per queue_pair will be used for every increment.
 
+QAT compression PMD needs intermediate buffers to support Deflate compression
+with Dynamic Huffman encoding. CONFIG_RTE_PMD_QAT_COMP_IM_BUFFER_SIZE
+specifies the size of a single buffer, the PMD will allocate a multiple of these,
+plus some extra space for associated meta-data. For GEN2 devices, 20 buffers are
+allocated while for GEN1 devices, 12 buffers are allocated, plus 1472 bytes overhead.
+
+.. Note::
+
+       If the compressed output of a Deflate operation using Dynamic Huffman
+        Encoding is too big to fit in an intermediate buffer, then the
+        operation will return RTE_COMP_OP_STATUS_ERROR and an error will be
+        displayed. Options for the application in this case
+        are to split the input data into smaller chunks and resubmit
+        in multiple operations or to configure QAT with
+        larger intermediate buffers.
+
 
 Device and driver naming
 ~~~~~~~~~~~~~~~~~~~~~~~~
@@ -190,7 +211,7 @@ Device and driver naming
 
        The qat crypto device name is in the format of the slave parameter passed to the crypto scheduler.
 
-* The qat compressdev driver name is "qat".
+* The qat compressdev driver name is "compress_qat".
   The rte_compressdev_devices_get() returns the devices exposed by this driver.
 
 * Each qat compression device has a unique name, in format
@@ -253,6 +274,8 @@ to check that the driver and device supports the service you require.
    +-----+----------+---------------+---------------+------------+--------+------+--------+--------+-----------+-------------+
    | 2   | D15xx    | p             | qat_d15xx     | d15xx      | 6f54   | 1    | 6f55   | 16     | Yes       | No          |
    +-----+----------+---------------+---------------+------------+--------+------+--------+--------+-----------+-------------+
+   | 3   | C4xxx    | p             | qat_c4xxx     | c4xxx      | 18a0   | 1    | 18a1   | 128    | Yes       | No          |
+   +-----+----------+---------------+---------------+------------+--------+------+--------+--------+-----------+-------------+
 
 
 The ``Driver`` column indicates either the Linux kernel version in which
@@ -507,7 +530,7 @@ Testing
 QAT crypto PMD can be tested by running the test application::
 
     make defconfig
-    make test-build -j
+    make -j
     cd ./build/app
     ./test -l1 -n1 -w <your qat bdf>
     RTE>>cryptodev_qat_autotest
@@ -516,7 +539,7 @@ QAT compression PMD can be tested by running the test application::
 
     make defconfig
     sed -i 's,\(CONFIG_RTE_COMPRESSDEV_TEST\)=n,\1=y,' build/.config
-    make test-build -j
+    make -j
     cd ./build/app
     ./test -l1 -n1 -w <your qat bdf>
     RTE>>compressdev_autotest