crypto/octeontx2: add PMD skeleton
[dpdk.git] / doc / guides / cryptodevs / octeontx2.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2019 Marvell International Ltd.
3
4
5 Marvell OCTEON TX2 Crypto Poll Mode Driver
6 ==========================================
7
8 The OCTEON TX2 crypto poll mode driver provides support for offloading
9 cryptographic operations to cryptographic accelerator units on the
10 **OCTEON TX2** :sup:`®` family of processors (CN9XXX).
11
12 More information about OCTEON TX2 SoCs may be obtained from `<https://www.marvell.com>`_
13
14 Features
15 --------
16
17 The OCTEON TX2 crypto PMD has support for:
18
19 Installation
20 ------------
21
22 The OCTEON TX2 crypto PMD may be compiled natively on an OCTEON TX2 platform or
23 cross-compiled on an x86 platform.
24
25 Enable OCTEON TX2 crypto PMD in your config file:
26
27 * ``CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_CRYPTO=y``
28
29 Refer to :doc:`../platform/octeontx2` for instructions to build your DPDK
30 application.
31
32 .. note::
33
34    The OCTEON TX2 crypto PMD uses services from the kernel mode OCTEON TX2
35    crypto PF driver in linux. This driver is included in the OCTEON TX SDK.
36
37 Initialization
38 --------------
39
40 List the CPT PF devices available on your OCTEON TX2 platform:
41
42 .. code-block:: console
43
44     lspci -d:a0fd
45
46 ``a0fd`` is the CPT PF device id. You should see output similar to:
47
48 .. code-block:: console
49
50     0002:10:00.0 Class 1080: Device 177d:a0fd
51
52 Set ``sriov_numvfs`` on the CPT PF device, to create a VF:
53
54 .. code-block:: console
55
56     echo 1 > /sys/bus/pci/drivers/octeontx2-cpt/0002:10:00.0/sriov_numvfs
57
58 Bind the CPT VF device to the vfio_pci driver:
59
60 .. code-block:: console
61
62     echo '177d a0fe' > /sys/bus/pci/drivers/vfio-pci/new_id
63     echo 0002:10:00.1 > /sys/bus/pci/devices/0002:10:00.1/driver/unbind
64     echo 0002:10:00.1 > /sys/bus/pci/drivers/vfio-pci/bind
65
66 Another way to bind the VF would be to use the ``dpdk-devbind.py`` script:
67
68 .. code-block:: console
69
70     cd <dpdk directory>
71     ./usertools/dpdk-devbind.py -u 0002:10:00.1
72     ./usertools/dpdk-devbind.py -b vfio-pci 0002:10.00.1
73
74 .. note::
75
76     Ensure that sufficient huge pages are available for your application::
77
78         echo 8 > /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages
79
80     Refer to :ref:`linux_gsg_hugepages` for more details.
81
82 Debugging Options
83 -----------------
84
85 .. _table_octeontx2_crypto_debug_options:
86
87 .. table:: OCTEON TX2 crypto PMD debug options
88
89     +---+------------+-------------------------------------------------------+
90     | # | Component  | EAL log command                                       |
91     +===+============+=======================================================+
92     | 1 | CPT        | --log-level='pmd\.crypto\.octeontx2,8'                |
93     +---+------------+-------------------------------------------------------+