2. OCTEON TX2 NPA Mempool Driver

The OCTEON TX2 NPA PMD (librte_mempool_octeontx2) provides mempool driver support for the integrated mempool device found in Marvell OCTEON TX2 SoC family.

More information about OCTEON TX2 SoC can be found at Marvell Official Website.

2.1. Features

OCTEON TX2 NPA PMD supports:

  • Up to 128 NPA LFs
  • 1M Pools per LF
  • HW mempool manager
  • Ethdev Rx buffer allocation in HW to save CPU cycles in the Rx path.
  • Ethdev Tx buffer recycling in HW to save CPU cycles in the Tx path.

2.2. Prerequisites and Compilation procedure

See Marvell OCTEON TX2 Platform Guide for setup information.

2.3. Pre-Installation Configuration

2.3.1. Compile time Config Options

The following option can be modified in the config file.

  • CONFIG_RTE_LIBRTE_OCTEONTX2_MEMPOOL (default y)

    Toggle compilation of the librte_mempool_octeontx2 driver.

2.3.2. Runtime Config Options

  • Maximum number of mempools per application (default 128)

    The maximum number of mempools per application needs to be configured on HW during mempool driver initialization. HW can support up to 1M mempools, Since each mempool costs set of HW resources, the max_pools devargs parameter is being introduced to configure the number of mempools required for the application. For example:

    -w 0002:02:00.0,max_pools=512
    

    With the above configuration, the driver will set up only 512 mempools for the given application to save HW resources.

Note

Since this configuration is per application, the end user needs to provide max_pools parameter to the first PCIe device probed by the given application.

2.3.3. Debugging Options

Table 2.4 OCTEON TX2 mempool debug options
# Component EAL log command
1 NPA –log-level=’pmd.mempool.octeontx2,8’

2.3.4. Standalone mempool device

The usertools/dpdk-devbind.py script shall enumerate all the mempool devices available in the system. In order to avoid, the end user to bind the mempool device prior to use ethdev and/or eventdev device, the respective driver configures an NPA LF and attach to the first probed ethdev or eventdev device. In case, if end user need to run mempool as a standalone device (without ethdev or eventdev), end user needs to bind a mempool device using usertools/dpdk-devbind.py

Example command to run mempool_autotest test with standalone OCTEONTX2 NPA device:

echo "mempool_autotest" | build/app/test -c 0xf0 --mbuf-pool-ops-name="octeontx2_npa"