mrvl_cn10k_dpi.rst 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ===============================================
  3. Marvell CN10K DMA packet interface (DPI) driver
  4. ===============================================
  5. Overview
  6. ========
  7. DPI is a DMA packet interface hardware block in Marvell's CN10K silicon.
  8. DPI hardware comprises a physical function (PF), its virtual functions,
  9. mailbox logic, and a set of DMA engines & DMA command queues.
  10. DPI PF function is an administrative function which services the mailbox
  11. requests from its VF functions and provisions DMA engine resources to
  12. it's VF functions.
  13. mrvl_cn10k_dpi.ko misc driver loads on DPI PF device and services the
  14. mailbox commands submitted by the VF devices and accordingly initializes
  15. the DMA engines and VF device's DMA command queues. Also, driver creates
  16. /dev/mrvl-cn10k-dpi node to set DMA engine and PEM (PCIe interface) port
  17. attributes like fifo length, molr, mps & mrrs.
  18. DPI PF driver is just an administrative driver to setup its VF device's
  19. queues and provisions the hardware resources, it cannot initiate any
  20. DMA operations. Only VF devices are provisioned with DMA capabilities.
  21. Driver location
  22. ===============
  23. drivers/misc/mrvl_cn10k_dpi.c
  24. Driver IOCTLs
  25. =============
  26. :c:macro::`DPI_MPS_MRRS_CFG`
  27. ioctl that sets max payload size & max read request size parameters of
  28. a pem port to which DMA engines are wired.
  29. :c:macro::`DPI_ENGINE_CFG`
  30. ioctl that sets DMA engine's fifo sizes & max outstanding load request
  31. thresholds.
  32. User space code example
  33. =======================
  34. DPI VF devices are probed and accessed from user space applications using
  35. vfio-pci driver. Below is a sample dpi dma application to demonstrate on
  36. how applications use mailbox and ioctl services from DPI PF kernel driver.
  37. https://github.com/MarvellEmbeddedProcessors/dpi-sample-app