요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
=================
PCI vNTB Function
=================
:Author: Frank Li <Frank.Li@nxp.com>
The difference between PCI NTB function and PCI vNTB function is
PCI NTB function need at two endpoint instances and connect HOST1
and HOST2.
PCI vNTB function only use one host and one endpoint(EP), use NTB
connect EP and PCI host
.. code-block:: text
+------------+ +---------------------------------------+
| | | |
+------------+ | +--------------+
| NTB | | | NTB |
| NetDev | | | NetDev |
+------------+ | +--------------+
| NTB | | | NTB |
| Transfer | | | Transfer |
+------------+ | +--------------+
| | | | |
| PCI NTB | | | |
| EPF | | | |
| Driver | | | PCI Virtual |
| | +---------------+ | NTB Driver |
| | | PCI EP NTB |<------>| |
| | | FN Driver | | |
+------------+ +---------------+ +--------------+
| | | | | |
| PCI BUS | <-----> | PCI EP BUS | | Virtual PCI |
| | PCI | | | BUS |
+------------+ +---------------+--------+--------------+
PCI RC PCI EP
Constructs used for Implementing vNTB
=====================================
1) Config Region
2) Self Scratchpad Registers
3) Peer Scratchpad Registers
4) Doorbell (DB) Registers
5) Memory Window (MW)
Config Region:
--------------
It is same as PCI NTB Function driver
Scratchpad Registers:
---------------------
It is appended after Config region.
.. code-block:: text
+--------------------------------------------------+ Base
| |
| |
| |
| Common Config Register |
| |
| |
| |
+-----------------------+--------------------------+ Base + span_offset
| | |
| Peer Span Space | Span Space |
| | |
| | |
+-----------------------+--------------------------+ Base + span_offset
| | | + span_count * 4
| | |
| Span Space | Peer Span Space |
| | |
+-----------------------+--------------------------+
Virtual PCI Pcie Endpoint
NTB Driver NTB Driver
Doorbell Registers:
-------------------
Doorbell Registers are used by the hosts to interrupt each other.
Memory Window:
--------------
Actual transfer of data between the two hosts will happen using the
memory window.
Modeling Constructs:
====================
32-bit BARs.
====== ===============
BAR NO CONSTRUCTS USED
====== ===============
BAR0 Config Region
BAR1 Doorbell
BAR2 Memory Window 1
BAR3 Memory Window 2
BAR4 Memory Window 3
BAR5 Memory Window 4
====== ===============
64-bit BARs.
====== ===============================
BAR NO CONSTRUCTS USED
====== ===============================
BAR0 Config Region + Scratchpad
BAR1
BAR2 Doorbell
BAR3
BAR4 Memory Window 1
BAR5
====== ===============================
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
PCI NTB와 vNTB의 차이
1-16저자는 Frank Li입니다. PCI NTB 기능과 PCI vNTB 기능의 차이는 endpoint와 host를 배치하는 방식에 있습니다.
PCI NTB 기능에는 endpoint 인스턴스 두 개가 필요하며 HOST1과 HOST2를 연결합니다.
PCI vNTB 기능은 host 하나와 endpoint(EP) 하나만 사용하고, NTB를 이용해 EP와 PCI host를 연결합니다.
.. SPDX-License-Identifier: GPL-2.0
=================
PCI vNTB Function
=================
:Author: Frank Li <Frank.Li@nxp.com>
The difference between PCI NTB function and PCI vNTB function is
PCI NTB function need at two endpoint instances and connect HOST1
and HOST2.
PCI vNTB function only use one host and one endpoint(EP), use NTB
connect EP and PCI host
RC·EP·virtual PCI bus 구조
17-42PCI RC의 일반 PCI bus는 PCI link로 EP의 PCI EP bus와 연결됩니다. RC 쪽 `PCI NTB EPF Driver`와 EP 쪽 `PCI EP NTB FN Driver`가 물리 endpoint 경계를 이루고, EP 내부의 `PCI Virtual NTB Driver`가 virtual PCI bus를 제공합니다.
양쪽 상위 계층에는 동일하게 `NTB Transfer`와 `NTB NetDev`가 놓입니다. 따라서 표준 NTB client는 RC와 EP의 virtual PCI 측을 서로 다른 NTB peer처럼 다룰 수 있습니다.
원문의 ASCII 그림을 계층과 연결 관계가 같은 흐름으로 재구성했습니다.
.. code-block:: text
+------------+ +---------------------------------------+
| | | |
+------------+ | +--------------+
| NTB | | | NTB |
| NetDev | | | NetDev |
+------------+ | +--------------+
| NTB | | | NTB |
| Transfer | | | Transfer |
+------------+ | +--------------+
| | | | |
| PCI NTB | | | |
| EPF | | | |
| Driver | | | PCI Virtual |
| | +---------------+ | NTB Driver |
| | | PCI EP NTB |<------>| |
| | | FN Driver | | |
+------------+ +---------------+ +--------------+
| | | | | |
| PCI BUS | <-----> | PCI EP BUS | | Virtual PCI |
| | PCI | | | BUS |
+------------+ +---------------+--------+--------------+
PCI RC PCI EP
vNTB 구현 구성 요소
43-56vNTB 구현에는 1) Config Region, 2) Self Scratchpad Registers, 3) Peer Scratchpad Registers, 4) Doorbell(DB) Registers, 5) Memory Window(MW)를 사용합니다.
Config Region은 PCI NTB Function driver의 구성 영역과 같습니다.
제어·알림·데이터 전달에 쓰이는 다섯 영역입니다.
Constructs used for Implementing vNTB
=====================================
1) Config Region
2) Self Scratchpad Registers
3) Peer Scratchpad Registers
4) Doorbell (DB) Registers
5) Memory Window (MW)
Config Region:
--------------
It is same as PCI NTB Function driver
Scratchpad register 배치
57-88Scratchpad register는 Config Region 뒤에 덧붙입니다. `Base`부터 `Base + span_offset`까지는 `Common Config Register`이고, 그 뒤 공간을 local span과 peer span이 서로 반대 방향으로 해석합니다.
Virtual PCI NTB Driver가 첫 scratchpad 구간을 `Peer Span Space`로 볼 때 PCIe Endpoint NTB Driver는 같은 구간을 `Span Space`로 봅니다. 다음 구간에서는 이 관계가 뒤바뀌며 경계는 `Base + span_offset + span_count * 4`입니다.
원문의 좌우 ASCII 배치를 주소 경계별 표로 재구성했습니다.
Scratchpad Registers:
---------------------
It is appended after Config region.
.. code-block:: text
+--------------------------------------------------+ Base
| |
| |
| |
| Common Config Register |
| |
| |
| |
+-----------------------+--------------------------+ Base + span_offset
| | |
| Peer Span Space | Span Space |
| | |
| | |
+-----------------------+--------------------------+ Base + span_offset
| | | + span_count * 4
| | |
| Span Space | Peer Span Space |
| | |
+-----------------------+--------------------------+
Virtual PCI Pcie Endpoint
NTB Driver NTB Driver
Doorbell과 Memory Window
89-99Doorbell register는 host들이 서로에게 interrupt를 발생시키는 데 사용합니다.
두 host 사이의 실제 데이터 전송은 memory window를 통해 이루어집니다.
Doorbell은 알림을, memory window는 payload를 전달합니다.
Doorbell Registers:
-------------------
Doorbell Registers are used by the hosts to interrupt each other.
Memory Window:
--------------
Actual transfer of data between the two hosts will happen using the
memory window.
32-bit BAR 모델
100-11532-bit BAR 모델에서는 여섯 BAR를 각각 하나의 구성 요소에 배정합니다. BAR0은 Config Region, BAR1은 Doorbell이고 BAR2부터 BAR5까지는 Memory Window 1부터 4입니다.
각 BAR가 독립 구성 영역을 가리킵니다.
Modeling Constructs:
====================
32-bit BARs.
====== ===============
BAR NO CONSTRUCTS USED
====== ===============
BAR0 Config Region
BAR1 Doorbell
BAR2 Memory Window 1
BAR3 Memory Window 2
BAR4 Memory Window 3
BAR5 Memory Window 4
====== ===============
64-bit BAR 모델
116-12964-bit BAR 모델에서는 BAR 쌍을 사용합니다. BAR0/BAR1 쌍은 Config Region과 Scratchpad, BAR2/BAR3 쌍은 Doorbell, BAR4/BAR5 쌍은 Memory Window 1에 배정됩니다.
빈 BAR 행은 바로 앞 64-bit BAR의 상위 절반을 뜻합니다.
64-bit BARs.
====== ===============================
BAR NO CONSTRUCTS USED
====== ===============================
BAR0 Config Region + Scratchpad
BAR1
BAR2 Doorbell
BAR3
BAR4 Memory Window 1
BAR5
====== ===============================
요약·해설
pci-vntb-function.rst:1-129vNTB는 한 개의 물리 endpoint 안에 virtual PCI bus와 NTB peer를 구성합니다. Doorbell은 interrupt, memory window는 data, scratchpad는 peer 상태 교환을 담당합니다.
32-bit BAR 모델은 최대 네 memory window를 분리하고, 64-bit 모델은 BAR 쌍으로 config·doorbell·첫 memory window를 배치합니다.