Marvell CN10K DMA packet interface (DPI) driverÂķ
OverviewÂķ
DPI is a DMA packet interface hardware block in Marvellâs CN10K silicon. DPI hardware comprises a physical function (PF), its virtual functions, mailbox logic, and a set of DMA engines & DMA command queues.
DPI PF function is an administrative function which services the mailbox requests from its VF functions and provisions DMA engine resources to itâs VF functions.
mrvl_cn10k_dpi.ko misc driver loads on DPI PF device and services the mailbox commands submitted by the VF devices and accordingly initializes the DMA engines and VF deviceâs DMA command queues. Also, driver creates /dev/mrvl-cn10k-dpi node to set DMA engine and PEM (PCIe interface) port attributes like fifo length, molr, mps & mrrs.
DPI PF driver is just an administrative driver to setup its VF deviceâs queues and provisions the hardware resources, it cannot initiate any DMA operations. Only VF devices are provisioned with DMA capabilities.
Driver locationÂķ
drivers/misc/mrvl_cn10k_dpi.c
Driver IOCTLsÂķ
DPI_MPS_MRRS_CFG
ioctl that sets max payload size & max read request size parameters of
a pem port to which DMA engines are wired.
DPI_ENGINE_CFG
ioctl that sets DMA engineâs fifo sizes & max outstanding load request
thresholds.
User space code exampleÂķ
DPI VF devices are probed and accessed from user space applications using vfio-pci driver. Below is a sample dpi dma application to demonstrate on how applications use mailbox and ioctl services from DPI PF kernel driver.