mempool/octeontx2: add devargs to lock context in cache
[dpdk.git] / doc / guides / mempool / octeontx2.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2019 Marvell International Ltd.
3
4 OCTEON TX2 NPA Mempool Driver
5 =============================
6
7 The OCTEON TX2 NPA PMD (**librte_mempool_octeontx2**) provides mempool
8 driver support for the integrated mempool device found in **Marvell OCTEON TX2** SoC family.
9
10 More information about OCTEON TX2 SoC can be found at `Marvell Official Website
11 <https://www.marvell.com/embedded-processors/infrastructure-processors/>`_.
12
13 Features
14 --------
15
16 OCTEON TX2 NPA PMD supports:
17
18 - Up to 128 NPA LFs
19 - 1M Pools per LF
20 - HW mempool manager
21 - Ethdev Rx buffer allocation in HW to save CPU cycles in the Rx path.
22 - Ethdev Tx buffer recycling in HW to save CPU cycles in the Tx path.
23
24 Prerequisites and Compilation procedure
25 ---------------------------------------
26
27    See :doc:`../platform/octeontx2` for setup information.
28
29 Pre-Installation Configuration
30 ------------------------------
31
32 Compile time Config Options
33 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
35 The following option can be modified in the ``config`` file.
36
37 - ``CONFIG_RTE_LIBRTE_OCTEONTX2_MEMPOOL`` (default ``y``)
38
39   Toggle compilation of the ``librte_mempool_octeontx2`` driver.
40
41 Runtime Config Options
42 ~~~~~~~~~~~~~~~~~~~~~~
43
44 - ``Maximum number of mempools per application`` (default ``128``)
45
46   The maximum number of mempools per application needs to be configured on
47   HW during mempool driver initialization. HW can support up to 1M mempools,
48   Since each mempool costs set of HW resources, the ``max_pools`` ``devargs``
49   parameter is being introduced to configure the number of mempools required
50   for the application.
51   For example::
52
53     -w 0002:02:00.0,max_pools=512
54
55   With the above configuration, the driver will set up only 512 mempools for
56   the given application to save HW resources.
57
58 .. note::
59
60    Since this configuration is per application, the end user needs to
61    provide ``max_pools`` parameter to the first PCIe device probed by the given
62    application.
63
64 - ``Lock NPA contexts in NDC``
65
66    Lock NPA aura and pool contexts in NDC cache.
67    The device args take hexadecimal bitmask where each bit represent the
68    corresponding aura/pool id.
69
70    For example::
71
72       -w 0002:02:00.0,npa_lock_mask=0xf
73
74 Debugging Options
75 ~~~~~~~~~~~~~~~~~
76
77 .. _table_octeontx2_mempool_debug_options:
78
79 .. table:: OCTEON TX2 mempool debug options
80
81    +---+------------+-------------------------------------------------------+
82    | # | Component  | EAL log command                                       |
83    +===+============+=======================================================+
84    | 1 | NPA        | --log-level='pmd\.mempool.octeontx2,8'                |
85    +---+------------+-------------------------------------------------------+
86
87 Standalone mempool device
88 ~~~~~~~~~~~~~~~~~~~~~~~~~
89
90    The ``usertools/dpdk-devbind.py`` script shall enumerate all the mempool devices
91    available in the system. In order to avoid, the end user to bind the mempool
92    device prior to use ethdev and/or eventdev device, the respective driver
93    configures an NPA LF and attach to the first probed ethdev or eventdev device.
94    In case, if end user need to run mempool as a standalone device
95    (without ethdev or eventdev), end user needs to bind a mempool device using
96    ``usertools/dpdk-devbind.py``
97
98    Example command to run ``mempool_autotest`` test with standalone OCTEONTX2 NPA device::
99
100      echo "mempool_autotest" | build/app/test -c 0xf0 --mbuf-pool-ops-name="octeontx2_npa"