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