요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
===============================================
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
=============
:c:macro::`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.
:c:macro::`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.
https://github.com/MarvellEmbeddedProcessors/dpi-sample-app
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
문서 식별
1-6이 문서는 GPL-2.0 SPDX license를 따르며 Marvell CN10K DMA Packet Interface(DPI) driver를 설명합니다.
.. SPDX-License-Identifier: GPL-2.0
===============================================
Marvell CN10K DMA packet interface (DPI) driver
===============================================
PF 관리 기능과 VF DMA
7-26DPI는 Marvell CN10K silicon에 포함된 DMA packet interface hardware block입니다. Hardware는 physical function(PF), virtual function(VF), mailbox logic, DMA engine 집합과 DMA command queue로 구성됩니다.
DPI PF는 VF의 mailbox request를 처리하고 VF에 DMA engine resource를 provision하는 administrative function입니다.
`mrvl_cn10k_dpi.ko` misc driver는 DPI PF device에 load됩니다. VF device가 제출한 mailbox command를 처리하고 그에 맞게 DMA engine과 VF의 DMA command queue를 initialize합니다.
Driver는 `/dev/mrvl-cn10k-dpi` node도 만들어 DMA engine과 PEM(PCIe interface) port의 FIFO length, MOLR, MPS, MRRS 같은 attribute를 설정합니다.
PF driver 자체는 VF queue와 hardware resource를 설정하는 관리 driver일 뿐 DMA operation을 시작할 수 없습니다. DMA capability는 VF device에만 provision됩니다.
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 source 위치
27-32Driver source는 `drivers/misc/mrvl_cn10k_dpi.c`에 있습니다.
Driver location
===============
drivers/misc/mrvl_cn10k_dpi.c
IOCTL
33-43| IOCTL | 설정 대상 |
|---|---|
| `DPI_MPS_MRRS_CFG` | DMA engine이 연결된 PEM port의 maximum payload size와 maximum read request size |
| `DPI_ENGINE_CFG` | DMA engine의 FIFO size와 maximum outstanding load request threshold |
Driver IOCTLs
=============
:c:macro::`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.
:c:macro::`DPI_ENGINE_CFG`
ioctl that sets DMA engine's fifo sizes & max outstanding load request
thresholds.
Userspace 접근 예제
44-52DPI VF device는 `vfio-pci` driver를 통해 probe되며 userspace application에서 접근합니다. VF application이 DPI PF kernel driver의 mailbox·ioctl service를 사용하는 방법은 `https://github.com/MarvellEmbeddedProcessors/dpi-sample-app`의 sample DPI DMA application에서 확인할 수 있습니다.
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.
https://github.com/MarvellEmbeddedProcessors/dpi-sample-app
요약·해설
mrvl_cn10k_dpi.rst:1-52PF는 VF의 mailbox와 resource provisioning만 담당하고 직접 DMA를 시작하지 않습니다. 실제 DMA capability는 VF에 있으며 userspace는 vfio-pci로 VF를 사용합니다.
PF kernel driver는 제어 plane, VF userspace application은 DMA data plane 역할을 합니다.