1.. SPDX-License-Identifier: BSD-3-Clause 2 Copyright(c) 2021 Marvell International Ltd. 3 4.. include:: <isonum.txt> 5 6CNXK DMA Device Driver 7====================== 8 9The ``cnxk`` dmadev driver provides a poll-mode driver (PMD) for Marvell DPI DMA 10Hardware Accelerator block found in OCTEON 9 and OCTEON 10 family of SoCs. 11Each DMA queue is exposed as a VF function when SRIOV is enabled. 12 13The block supports following modes of DMA transfers: 14 15#. Internal - DMA within SoC DRAM to DRAM 16#. Inbound - Host DRAM to SoC DRAM when SoC is in PCIe Endpoint 17#. Outbound - SoC DRAM to Host DRAM when SoC is in PCIe Endpoint 18 19Prerequisites and Compilation procedure 20--------------------------------------- 21 22See :doc:`../platform/cnxk` for setup information. 23 24Device Setup 25------------- 26 27The ``dpdk-devbind.py`` script, included with DPDK, 28can be used to show the presence of supported hardware. 29Running ``dpdk-devbind.py --status-dev dma`` will show all the CNXK DMA devices. 30 31Devices using VFIO drivers 32~~~~~~~~~~~~~~~~~~~~~~~~~~ 33 34The HW devices to be used will need to be bound to a user-space IO driver for use. 35The ``dpdk-devbind.py`` script can be used to view the state of the devices 36and to bind them to a suitable DPDK-supported driver, such as ``vfio-pci``. 37For example:: 38 39 $ dpdk-devbind.py -b vfio-pci 0000:05:00.1 40 41Device Probing and Initialization 42~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 43 44To use the devices from an application, the dmadev API can be used. 45CNXK DMA device configuration requirements: 46 47* Only one ``vchan`` is supported per device. 48* CNXK DMA devices do not support silent mode. 49 50Once configured, the device can then be made ready for use 51by calling the ``rte_dma_start()`` API. 52 53Performing Data Copies 54~~~~~~~~~~~~~~~~~~~~~~ 55 56Refer to the :ref:`Enqueue / Dequeue APIs <dmadev_enqueue_dequeue>` section 57of the dmadev library documentation 58for details on operation enqueue and submission API usage. 59