요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. include:: <isonum.txt>
===================================
DPAA2 DPIO (Data Path I/O) Overview
===================================
:Copyright: |copy| 2016-2018 NXP
This document provides an overview of the Freescale DPAA2 DPIO
drivers
Introduction
============
A DPAA2 DPIO (Data Path I/O) is a hardware object that provides
interfaces to enqueue and dequeue frames to/from network interfaces
and other accelerators. A DPIO also provides hardware buffer
pool management for network interfaces.
This document provides an overview the Linux DPIO driver, its
subcomponents, and its APIs.
See
Documentation/networking/device_drivers/ethernet/freescale/dpaa2/overview.rst
for a general overview of DPAA2 and the general DPAA2 driver architecture
in Linux.
Driver Overview
---------------
The DPIO driver is bound to DPIO objects discovered on the fsl-mc bus and
provides services that:
A. allow other drivers, such as the Ethernet driver, to enqueue and dequeue
frames for their respective objects
B. allow drivers to register callbacks for data availability notifications
when data becomes available on a queue or channel
C. allow drivers to manage hardware buffer pools
The Linux DPIO driver consists of 3 primary components--
DPIO object driver-- fsl-mc driver that manages the DPIO object
DPIO service-- provides APIs to other Linux drivers for services
QBman portal interface-- sends portal commands, gets responses::
fsl-mc other
bus drivers
| |
+---+----+ +------+-----+
|DPIO obj| |DPIO service|
| driver |---| (DPIO) |
+--------+ +------+-----+
|
+------+-----+
| QBman |
| portal i/f |
+------------+
|
hardware
The diagram below shows how the DPIO driver components fit with the other
DPAA2 Linux driver components::
+------------+
| OS Network |
| Stack |
+------------+ +------------+
| Allocator |. . . . . . . | Ethernet |
|(DPMCP,DPBP)| | (DPNI) |
+-.----------+ +---+---+----+
. . ^ |
. . <data avail, | |<enqueue,
. . tx confirm> | | dequeue>
+-------------+ . | |
| DPRC driver | . +--------+ +------------+
| (DPRC) | . . |DPIO obj| |DPIO service|
+----------+--+ | driver |-| (DPIO) |
| +--------+ +------+-----+
|<dev add/remove> +------|-----+
| | QBman |
+----+--------------+ | portal i/f |
| MC-bus driver | +------------+
| | |
| /soc/fsl-mc | |
+-------------------+ |
|
=========================================|=========|========================
+-+--DPIO---|-----------+
| | |
| QBman Portal |
+-----------------------+
============================================================================
DPIO Object Driver (dpio-driver.c)
----------------------------------
The dpio-driver component registers with the fsl-mc bus to handle objects of
type "dpio". The implementation of probe() handles basic initialization
of the DPIO including mapping of the DPIO regions (the QBman SW portal)
and initializing interrupts and registering irq handlers. The dpio-driver
registers the probed DPIO with dpio-service.
DPIO service (dpio-service.c, dpaa2-io.h)
------------------------------------------
The dpio service component provides queuing, notification, and buffers
management services to DPAA2 drivers, such as the Ethernet driver. A system
will typically allocate 1 DPIO object per CPU to allow queuing operations
to happen simultaneously across all CPUs.
Notification handling
dpaa2_io_service_register()
dpaa2_io_service_deregister()
dpaa2_io_service_rearm()
Queuing
dpaa2_io_service_pull_fq()
dpaa2_io_service_pull_channel()
dpaa2_io_service_enqueue_fq()
dpaa2_io_service_enqueue_qd()
dpaa2_io_store_create()
dpaa2_io_store_destroy()
dpaa2_io_store_next()
Buffer pool management
dpaa2_io_service_release()
dpaa2_io_service_acquire()
QBman portal interface (qbman-portal.c)
---------------------------------------
The qbman-portal component provides APIs to do the low level hardware
bit twiddling for operations such as:
- initializing Qman software portals
- building and sending portal commands
- portal interrupt configuration and processing
The qbman-portal APIs are not public to other drivers, and are
only used by dpio-service.
Other (dpaa2-fd.h, dpaa2-global.h)
----------------------------------
Frame descriptor and scatter-gather definitions and the APIs used to
manipulate them are defined in dpaa2-fd.h.
Dequeue result struct and parsing APIs are defined in dpaa2-global.h.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
DPAA2 DPIO 소개
1-26이 문서는 `isonum.txt`를 포함해 저작권 기호를 사용하며, 저작권은 © 2016-2018 NXP에 있습니다.
DPAA2 DPIO(Data Path I/O) 개요
이 문서는 Freescale DPAA2 DPIO 드라이버의 전체 구조를 개괄합니다.
소개
DPAA2 DPIO(Data Path I/O)는 네트워크 인터페이스와 다른 가속기로 프레임을 enqueue하거나 그곳에서 dequeue하기 위한 인터페이스를 제공하는 하드웨어 객체입니다. DPIO는 네트워크 인터페이스용 하드웨어 버퍼 풀 관리 기능도 제공합니다.
여기서는 Linux DPIO 드라이버와 그 하위 구성 요소, 외부에 제공하는 API를 설명합니다.
DPAA2의 일반 개요와 Linux의 전체 DPAA2 드라이버 아키텍처는 `Documentation/networking/device_drivers/ethernet/freescale/dpaa2/overview.rst`를 참고하십시오.
.. include:: <isonum.txt>
===================================
DPAA2 DPIO (Data Path I/O) Overview
===================================
:Copyright: |copy| 2016-2018 NXP
This document provides an overview of the Freescale DPAA2 DPIO
drivers
Introduction
============
A DPAA2 DPIO (Data Path I/O) is a hardware object that provides
interfaces to enqueue and dequeue frames to/from network interfaces
and other accelerators. A DPIO also provides hardware buffer
pool management for network interfaces.
This document provides an overview the Linux DPIO driver, its
subcomponents, and its APIs.
See
Documentation/networking/device_drivers/ethernet/freescale/dpaa2/overview.rst
for a general overview of DPAA2 and the general DPAA2 driver architecture
in Linux.
드라이버 역할과 세 구성 요소
27-62드라이버 개요
DPIO 드라이버는 `fsl-mc` 버스에서 발견된 DPIO 객체에 바인딩되며 다음 서비스를 제공합니다.
- A. Ethernet 드라이버 같은 다른 드라이버가 각자의 객체에 프레임을 enqueue하고 dequeue할 수 있게 합니다.
- B. 큐 또는 채널에 데이터가 도착했을 때 데이터 가용성 알림을 받을 callback을 드라이버가 등록할 수 있게 합니다.
- C. 드라이버가 하드웨어 버퍼 풀을 관리할 수 있게 합니다.
Linux DPIO 드라이버는 세 가지 주요 구성 요소로 이루어집니다.
| 구성 요소 | 책임 |
|---|---|
| DPIO object driver | DPIO 객체를 관리하는 `fsl-mc` 드라이버 |
| DPIO service | 다른 Linux 드라이버에 DPIO 서비스를 제공하는 API 계층 |
| QBman portal interface | portal 명령을 보내고 응답을 받는 저수준 인터페이스 |
세 구성 요소의 연결은 다음과 같습니다.
원문의 첫 번째 ASCII 도식을 객체 관리, 서비스 API, 하드웨어 portal 순서로 다시 구성했습니다.
Driver Overview
---------------
The DPIO driver is bound to DPIO objects discovered on the fsl-mc bus and
provides services that:
A. allow other drivers, such as the Ethernet driver, to enqueue and dequeue
frames for their respective objects
B. allow drivers to register callbacks for data availability notifications
when data becomes available on a queue or channel
C. allow drivers to manage hardware buffer pools
The Linux DPIO driver consists of 3 primary components--
DPIO object driver-- fsl-mc driver that manages the DPIO object
DPIO service-- provides APIs to other Linux drivers for services
QBman portal interface-- sends portal commands, gets responses::
fsl-mc other
bus drivers
| |
+---+----+ +------+-----+
|DPIO obj| |DPIO service|
| driver |---| (DPIO) |
+--------+ +------+-----+
|
+------+-----+
| QBman |
| portal i/f |
+------------+
|
hardware
DPAA2 통합 구조와 DPIO 객체 드라이버
63-106다음 구조는 DPIO 드라이버 구성 요소가 다른 DPAA2 Linux 드라이버와 어떻게 결합되는지를 보여 줍니다.
원문의 두 번째 ASCII 도식을 제어 경로와 데이터 경로로 나누어 다시 구성했습니다.
DPIO 객체 드라이버(`dpio-driver.c`)
`dpio-driver` 구성 요소는 `fsl-mc` 버스에 등록되어 `dpio` 유형 객체를 처리합니다.
`probe()` 구현은 DPIO 영역, 즉 QBman software portal을 매핑하고 인터럽트를 초기화하며 IRQ handler를 등록하는 등 DPIO의 기본 초기화를 수행합니다.
초기화가 끝나면 `dpio-driver`는 probe한 DPIO를 `dpio-service`에 등록합니다.
The diagram below shows how the DPIO driver components fit with the other
DPAA2 Linux driver components::
+------------+
| OS Network |
| Stack |
+------------+ +------------+
| Allocator |. . . . . . . | Ethernet |
|(DPMCP,DPBP)| | (DPNI) |
+-.----------+ +---+---+----+
. . ^ |
. . <data avail, | |<enqueue,
. . tx confirm> | | dequeue>
+-------------+ . | |
| DPRC driver | . +--------+ +------------+
| (DPRC) | . . |DPIO obj| |DPIO service|
+----------+--+ | driver |-| (DPIO) |
| +--------+ +------+-----+
|<dev add/remove> +------|-----+
| | QBman |
+----+--------------+ | portal i/f |
| MC-bus driver | +------------+
| | |
| /soc/fsl-mc | |
+-------------------+ |
|
=========================================|=========|========================
+-+--DPIO---|-----------+
| | |
| QBman Portal |
+-----------------------+
============================================================================
DPIO Object Driver (dpio-driver.c)
----------------------------------
The dpio-driver component registers with the fsl-mc bus to handle objects of
type "dpio". The implementation of probe() handles basic initialization
of the DPIO including mapping of the DPIO regions (the QBman SW portal)
and initializing interrupts and registering irq handlers. The dpio-driver
registers the probed DPIO with dpio-service.
DPIO 서비스 API, QBman portal과 공용 데이터 정의
107-161DPIO service(`dpio-service.c`, `dpaa2-io.h`)
DPIO service 구성 요소는 Ethernet 드라이버 같은 DPAA2 드라이버에 큐 처리, 알림, 버퍼 관리 서비스를 제공합니다. 모든 CPU에서 큐 연산을 동시에 수행할 수 있도록 시스템은 보통 CPU마다 DPIO 객체 하나를 할당합니다.
알림 처리
- `dpaa2_io_service_register()`
- `dpaa2_io_service_deregister()`
- `dpaa2_io_service_rearm()`
큐 처리
- `dpaa2_io_service_pull_fq()`
- `dpaa2_io_service_pull_channel()`
- `dpaa2_io_service_enqueue_fq()`
- `dpaa2_io_service_enqueue_qd()`
- `dpaa2_io_store_create()`
- `dpaa2_io_store_destroy()`
- `dpaa2_io_store_next()`
버퍼 풀 관리
- `dpaa2_io_service_release()`
- `dpaa2_io_service_acquire()`
QBman portal interface(`qbman-portal.c`)
`qbman-portal` 구성 요소는 다음 연산에 필요한 저수준 하드웨어 비트 조작 API를 제공합니다.
- QMan software portal 초기화
- portal 명령 생성과 전송
- portal 인터럽트 구성과 처리
`qbman-portal` API는 다른 드라이버에 공개되지 않으며 `dpio-service`만 사용합니다.
기타 정의(`dpaa2-fd.h`, `dpaa2-global.h`)
frame descriptor와 scatter-gather 정의, 그리고 이를 조작하는 API는 `dpaa2-fd.h`에 정의되어 있습니다.
dequeue 결과 구조체와 parsing API는 `dpaa2-global.h`에 정의되어 있습니다.
DPIO service (dpio-service.c, dpaa2-io.h)
------------------------------------------
The dpio service component provides queuing, notification, and buffers
management services to DPAA2 drivers, such as the Ethernet driver. A system
will typically allocate 1 DPIO object per CPU to allow queuing operations
to happen simultaneously across all CPUs.
Notification handling
dpaa2_io_service_register()
dpaa2_io_service_deregister()
dpaa2_io_service_rearm()
Queuing
dpaa2_io_service_pull_fq()
dpaa2_io_service_pull_channel()
dpaa2_io_service_enqueue_fq()
dpaa2_io_service_enqueue_qd()
dpaa2_io_store_create()
dpaa2_io_store_destroy()
dpaa2_io_store_next()
Buffer pool management
dpaa2_io_service_release()
dpaa2_io_service_acquire()
QBman portal interface (qbman-portal.c)
---------------------------------------
The qbman-portal component provides APIs to do the low level hardware
bit twiddling for operations such as:
- initializing Qman software portals
- building and sending portal commands
- portal interrupt configuration and processing
The qbman-portal APIs are not public to other drivers, and are
only used by dpio-service.
Other (dpaa2-fd.h, dpaa2-global.h)
----------------------------------
Frame descriptor and scatter-gather definitions and the APIs used to
manipulate them are defined in dpaa2-fd.h.
Dequeue result struct and parsing APIs are defined in dpaa2-global.h.
요약·해설
dpio-driver.rst:1-161DPIO는 DPAA2에서 프레임 큐와 버퍼 풀을 CPU가 이용하도록 연결하는 하드웨어 객체입니다. Linux 드라이버는 객체 수명 관리를 담당하는 `dpio-driver`, 다른 드라이버에 안정된 API를 제공하는 `dpio-service`, QBman portal을 직접 조작하는 `qbman-portal`의 세 층으로 책임을 나눕니다.
Ethernet을 비롯한 DPAA2 드라이버가 DPIO를 통해 사용하는 기능입니다.
원문의 첫 번째 ASCII 도식을 책임 경계 중심으로 다시 구성했습니다.
원문의 두 번째 ASCII 도식에서 제어 경로와 프레임 경로를 분리했습니다.
`probe()`가 fsl-mc 객체를 사용할 수 있는 DPIO 서비스로 전환합니다.
보통 CPU마다 DPIO 객체 하나를 배치해 큐 연산을 병렬화합니다.
공개 서비스 API는 알림, 큐, 버퍼 풀 세 범주로 나뉩니다.
저수준 API는 dpio-service 내부 구현으로만 사용됩니다.
프레임과 dequeue 결과의 형식은 별도 헤더가 담당합니다.