1. CNXK DMA Device Driver
The cnxk
dmadev driver provides a poll-mode driver (PMD) for Marvell DPI DMA
Hardware Accelerator block found in OCTEONTX2 and OCTEONTX3 family of SoCs.
Each DMA queue is exposed as a VF function when SRIOV is enabled.
The block supports following modes of DMA transfers:
- Internal - DMA within SoC DRAM to DRAM
- Inbound - Host DRAM to SoC DRAM when SoC is in PCIe Endpoint
- Outbound - SoC DRAM to Host DRAM when SoC is in PCIe Endpoint
1.1. Prerequisites and Compilation procedure
See Marvell cnxk platform guide for setup information.
1.2. Device Setup
The dpdk-devbind.py
script, included with DPDK,
can be used to show the presence of supported hardware.
Running dpdk-devbind.py --status-dev dma
will show all the CNXK DMA devices.
1.2.1. Devices using VFIO drivers
The HW devices to be used will need to be bound to a user-space IO driver for use.
The dpdk-devbind.py
script can be used to view the state of the devices
and to bind them to a suitable DPDK-supported driver, such as vfio-pci
.
For example:
$ dpdk-devbind.py -b vfio-pci 0000:05:00.1
1.2.2. Device Probing and Initialization
To use the devices from an application, the dmadev API can be used. CNXK DMA device configuration requirements:
- Only one
vchan
is supported per device. - CNXK DMA devices do not support silent mode.
Once configured, the device can then be made ready for use
by calling the rte_dma_start()
API.
1.2.3. Performing Data Copies
Refer to the Enqueue / Dequeue APIs section of the dmadev library documentation for details on operation enqueue and submission API usage.