8568fdb150c4189240b4edb81b294b95ca4ea012
[dpdk.git] / doc / guides / mempool / cnxk.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(C) 2021 Marvell.
3
4 cnxk NPA Mempool Driver
5 =======================
6
7 The cnxk NPA PMD (**librte_mempool_cnxk**) provides mempool driver support for
8 the integrated mempool device found in **Marvell OCTEON CN9K/CN10K** SoC family.
9
10 More information about cnxk SoC can be found at `Marvell Official Website
11 <https://www.marvell.com/embedded-processors/infrastructure-processors/>`_.
12
13 Features
14 --------
15
16 cnxk 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 CN9k NPA supports:
25
26 - Burst alloc of up to 32 pointers.
27
28 Prerequisites and Compilation procedure
29 ---------------------------------------
30
31    See :doc:`../platform/cnxk` for setup information.
32
33 Pre-Installation Configuration
34 ------------------------------
35
36
37 Runtime Config Options
38 ~~~~~~~~~~~~~~~~~~~~~~
39
40 - ``Maximum number of mempools per application`` (default ``128``)
41
42   The maximum number of mempools per application needs to be configured on
43   HW during mempool driver initialization. HW can support up to 1M mempools,
44   Since each mempool costs set of HW resources, the ``max_pools`` ``devargs``
45   parameter is being introduced to configure the number of mempools required
46   for the application.
47   For example::
48
49     -a 0002:02:00.0,max_pools=512
50
51   With the above configuration, the driver will set up only 512 mempools for
52   the given application to save HW resources.
53
54 .. note::
55
56    Since this configuration is per application, the end user needs to
57    provide ``max_pools`` parameter to the first PCIe device probed by the given
58    application.
59
60 Debugging Options
61 ~~~~~~~~~~~~~~~~~
62
63 .. _table_cnxk_mempool_debug_options:
64
65 .. table:: cnxk mempool debug options
66
67    +---+------------+-------------------------------------------------------+
68    | # | Component  | EAL log command                                       |
69    +===+============+=======================================================+
70    | 1 | NPA        | --log-level='pmd\.mempool.cnxk,8'                     |
71    +---+------------+-------------------------------------------------------+
72
73 Standalone mempool device
74 ~~~~~~~~~~~~~~~~~~~~~~~~~
75
76    The ``usertools/dpdk-devbind.py`` script shall enumerate all the mempool
77    devices available in the system. In order to avoid, the end user to bind the
78    mempool device prior to use ethdev and/or eventdev device, the respective
79    driver configures an NPA LF and attach to the first probed ethdev or eventdev
80    device. In case, if end user need to run mempool as a standalone device
81    (without ethdev or eventdev), end user needs to bind a mempool device using
82    ``usertools/dpdk-devbind.py``