← Documents Documentation/infiniband/opa_vnic.rst GitHub 원문 ↗

Linux 6.18.37 · InfiniBand

Intel Omni-Path (OPA) VNIC

OPA 패브릭 위의 가상 이더넷 스위치, 16B 캡슐화 패킷, VEMA와 HFI1 기반 RDMA netdev 설계를 설명합니다.

Source pathDocumentation/infiniband/opa_vnic.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

opa_vnic.rst:1-159

OPA VNIC은 HFI 노드 사이의 이더넷 패킷을 Omni-Path 형식으로 캡슐화하고 가상 이더넷 스위치 ID로 VNIC 포트를 구분합니다. 하드웨어 독립 OPA VNIC/VEMA 계층이 관리와 송신 캡슐화를 맡고, HFI1 하드웨어 의존 계층이 RDMA netdev 자원과 실제 데이터 경로를 담당합니다.

문서 개요
항목내용
SourceDocumentation/infiniband/opa_vnic.rst
분량159 source lines
패킷 형식QW0..QWN, L4 type `0x78 ETHERNET`
관리 경로EM - VEMA - IB MAD
하드웨어 경로OPA_VNIC RDMA netdev - HFI1

원문 분량과 핵심 적용 대상을 요약합니다.

핵심 흐름
EM이 가상 스위치와 VNIC 구성송신 패킷 QW 정렬·OPA 캡슐화HFI 사이 전송Tail 기반 패딩·헤더 제거가상 스위치 ID로 VNIC 역다중화

문서의 주요 동작 순서를 압축해 보여 줍니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 =================================================================
2 Intel Omni-Path (OPA) Virtual Network Interface Controller (VNIC)
3 =================================================================
4
5 Intel Omni-Path (OPA) Virtual Network Interface Controller (VNIC) feature
6 supports Ethernet functionality over Omni-Path fabric by encapsulating
7 the Ethernet packets between HFI nodes.
8
9 Architecture
10 =============
11 The patterns of exchanges of Omni-Path encapsulated Ethernet packets
12 involves one or more virtual Ethernet switches overlaid on the Omni-Path
13 fabric topology. A subset of HFI nodes on the Omni-Path fabric are
14 permitted to exchange encapsulated Ethernet packets across a particular
15 virtual Ethernet switch. The virtual Ethernet switches are logical
16 abstractions achieved by configuring the HFI nodes on the fabric for
17 header generation and processing. In the simplest configuration all HFI
18 nodes across the fabric exchange encapsulated Ethernet packets over a
19 single virtual Ethernet switch. A virtual Ethernet switch, is effectively
20 an independent Ethernet network. The configuration is performed by an
21 Ethernet Manager (EM) which is part of the trusted Fabric Manager (FM)
22 application. HFI nodes can have multiple VNICs each connected to a
23 different virtual Ethernet switch. The below diagram presents a case
24 of two virtual Ethernet switches with two HFI nodes::
25
26 +-------------------+
27 | Subnet/ |
28 | Ethernet |
29 | Manager |
30 +-------------------+
31 / /
32 / /
33 / /
34 / /
35 +-----------------------------+ +------------------------------+
36 | Virtual Ethernet Switch | | Virtual Ethernet Switch |
37 | +---------+ +---------+ | | +---------+ +---------+ |
38 | | VPORT | | VPORT | | | | VPORT | | VPORT | |
39 +--+---------+----+---------+-+ +-+---------+----+---------+---+
40 | \ / |
41 | \ / |
42 | \/ |
43 | / \ |
44 | / \ |
45 +-----------+------------+ +-----------+------------+
46 | VNIC | VNIC | | VNIC | VNIC |
47 +-----------+------------+ +-----------+------------+
48 | HFI | | HFI |
49 +------------------------+ +------------------------+
50
51
52 The Omni-Path encapsulated Ethernet packet format is as described below.
53
54 ==================== ================================
55 Bits Field
56 ==================== ================================
57 Quad Word 0:
58 0-19 SLID (lower 20 bits)
59 20-30 Length (in Quad Words)
60 31 BECN bit
61 32-51 DLID (lower 20 bits)
62 52-56 SC (Service Class)
63 57-59 RC (Routing Control)
64 60 FECN bit
65 61-62 L2 (=10, 16B format)
66 63 LT (=1, Link Transfer Head Flit)
67
68 Quad Word 1:
69 0-7 L4 type (=0x78 ETHERNET)
70 8-11 SLID[23:20]
71 12-15 DLID[23:20]
72 16-31 PKEY
73 32-47 Entropy
74 48-63 Reserved
75
76 Quad Word 2:
77 0-15 Reserved
78 16-31 L4 header
79 32-63 Ethernet Packet
80
81 Quad Words 3 to N-1:
82 0-63 Ethernet packet (pad extended)
83
84 Quad Word N (last):
85 0-23 Ethernet packet (pad extended)
86 24-55 ICRC
87 56-61 Tail
88 62-63 LT (=01, Link Transfer Tail Flit)
89 ==================== ================================
90
91 Ethernet packet is padded on the transmit side to ensure that the VNIC OPA
92 packet is quad word aligned. The 'Tail' field contains the number of bytes
93 padded. On the receive side the 'Tail' field is read and the padding is
94 removed (along with ICRC, Tail and OPA header) before passing packet up
95 the network stack.
96
97 The L4 header field contains the virtual Ethernet switch id the VNIC port
98 belongs to. On the receive side, this field is used to de-multiplex the
99 received VNIC packets to different VNIC ports.
100
101 Driver Design
102 ==============
103 Intel OPA VNIC software design is presented in the below diagram.
104 OPA VNIC functionality has a HW dependent component and a HW
105 independent component.
106
107 The support has been added for IB device to allocate and free the RDMA
108 netdev devices. The RDMA netdev supports interfacing with the network
109 stack thus creating standard network interfaces. OPA_VNIC is an RDMA
110 netdev device type.
111
112 The HW dependent VNIC functionality is part of the HFI1 driver. It
113 implements the verbs to allocate and free the OPA_VNIC RDMA netdev.
114 It involves HW resource allocation/management for VNIC functionality.
115 It interfaces with the network stack and implements the required
116 net_device_ops functions. It expects Omni-Path encapsulated Ethernet
117 packets in the transmit path and provides HW access to them. It strips
118 the Omni-Path header from the received packets before passing them up
119 the network stack. It also implements the RDMA netdev control operations.
120
121 The OPA VNIC module implements the HW independent VNIC functionality.
122 It consists of two parts. The VNIC Ethernet Management Agent (VEMA)
123 registers itself with IB core as an IB client and interfaces with the
124 IB MAD stack. It exchanges the management information with the Ethernet
125 Manager (EM) and the VNIC netdev. The VNIC netdev part allocates and frees
126 the OPA_VNIC RDMA netdev devices. It overrides the net_device_ops functions
127 set by HW dependent VNIC driver where required to accommodate any control
128 operation. It also handles the encapsulation of Ethernet packets with an
129 Omni-Path header in the transmit path. For each VNIC interface, the
130 information required for encapsulation is configured by the EM via VEMA MAD
131 interface. It also passes any control information to the HW dependent driver
132 by invoking the RDMA netdev control operations::
133
134 +-------------------+ +----------------------+
135 | | | Linux |
136 | IB MAD | | Network |
137 | | | Stack |
138 +-------------------+ +----------------------+
139 | | |
140 | | |
141 +----------------------------+ |
142 | | |
143 | OPA VNIC Module | |
144 | (OPA VNIC RDMA Netdev | |
145 | & EMA functions) | |
146 | | |
147 +----------------------------+ |
148 | |
149 | |
150 +------------------+ |
151 | IB core | |
152 +------------------+ |
153 | |
154 | |
155 +--------------------------------------------+
156 | |
157 | HFI1 Driver with VNIC support |
158 | |
159 +--------------------------------------------+
160

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

OPA VNIC 아키텍처와 가상 이더넷 스위치

1-50

Intel Omni-Path(OPA) VNIC 기능은 HFI 노드 사이에서 이더넷 패킷을 캡슐화해 Omni-Path 패브릭 위에 이더넷 기능을 제공합니다.

캡슐화된 이더넷 패킷의 교환은 Omni-Path 패브릭 토폴로지 위에 겹쳐진 하나 이상의 가상 이더넷 스위치를 통해 이루어집니다. 특정 가상 스위치마다 통신을 허용할 HFI 노드 부분집합을 정할 수 있습니다.

가상 이더넷 스위치는 HFI 노드의 헤더 생성 및 처리 방식을 구성해 만드는 논리적 추상화입니다. 가장 단순한 구성에서는 모든 HFI 노드가 하나의 가상 스위치를 통해 패킷을 교환합니다. 각 가상 스위치는 사실상 독립된 이더넷 네트워크입니다.

구성은 신뢰된 Fabric Manager(FM) 애플리케이션에 포함된 Ethernet Manager(EM)가 수행합니다. 한 HFI 노드는 여러 VNIC을 가질 수 있고, 각 VNIC은 서로 다른 가상 이더넷 스위치에 연결될 수 있습니다.

두 가상 스위치의 OPA VNIC 토폴로지
Subnet/Ethernet Manager가 Virtual Ethernet Switch 1과 2를 구성각 가상 스위치가 HFI별 VPORT 두 개를 제공HFI 노드 1의 VNIC 1은 스위치 1, VNIC 2는 스위치 2에 연결HFI 노드 2의 VNIC 1은 스위치 1, VNIC 2는 스위치 2에 연결각 스위치는 두 HFI에 걸쳐 독립된 이더넷 네트워크를 형성

원문의 교차 연결 그림을 관리자, 스위치, VPORT, HFI/VNIC 계층으로 구조화했습니다.

가상 스위치 구성 요소
계층구성 요소역할 또는 연결
관리Subnet/Ethernet Manager두 가상 스위치 구성
오버레이Virtual Ethernet Switch 1HFI 1 VNIC 1과 HFI 2 VNIC 1 연결
오버레이Virtual Ethernet Switch 2HFI 1 VNIC 2와 HFI 2 VNIC 2 연결
포트VPORT가상 스위치와 각 HFI VNIC의 논리 포트
노드HFI 1, HFI 2노드마다 서로 다른 스위치에 연결된 VNIC 두 개

원문 아키텍처 그림의 노드와 연결 관계를 보존합니다.

=================================================================
Intel Omni-Path (OPA) Virtual Network Interface Controller (VNIC)
=================================================================

Intel Omni-Path (OPA) Virtual Network Interface Controller (VNIC) feature
supports Ethernet functionality over Omni-Path fabric by encapsulating
the Ethernet packets between HFI nodes.

Architecture
=============
The patterns of exchanges of Omni-Path encapsulated Ethernet packets
involves one or more virtual Ethernet switches overlaid on the Omni-Path
fabric topology. A subset of HFI nodes on the Omni-Path fabric are
permitted to exchange encapsulated Ethernet packets across a particular
virtual Ethernet switch. The virtual Ethernet switches are logical
abstractions achieved by configuring the HFI nodes on the fabric for
header generation and processing. In the simplest configuration all HFI
nodes across the fabric exchange encapsulated Ethernet packets over a
single virtual Ethernet switch. A virtual Ethernet switch, is effectively
an independent Ethernet network. The configuration is performed by an
Ethernet Manager (EM) which is part of the trusted Fabric Manager (FM)
application. HFI nodes can have multiple VNICs each connected to a
different virtual Ethernet switch. The below diagram presents a case
of two virtual Ethernet switches with two HFI nodes::

                               +-------------------+
                               |      Subnet/      |
                               |     Ethernet      |
                               |      Manager      |
                               +-------------------+
                                  /          /
                                /           /
                              /            /
                            /             /
  +-----------------------------+  +------------------------------+
  |  Virtual Ethernet Switch    |  |  Virtual Ethernet Switch     |
  |  +---------+    +---------+ |  | +---------+    +---------+   |
  |  | VPORT   |    |  VPORT  | |  | |  VPORT  |    |  VPORT  |   |
  +--+---------+----+---------+-+  +-+---------+----+---------+---+
           |                 \        /                 |
           |                   \    /                   |
           |                     \/                     |
           |                    /  \                    |
           |                  /      \                  |
       +-----------+------------+  +-----------+------------+
       |   VNIC    |    VNIC    |  |    VNIC   |    VNIC    |
       +-----------+------------+  +-----------+------------+
       |          HFI           |  |          HFI           |
       +------------------------+  +------------------------+

OPA 캡슐화 패킷 형식과 송수신 처리

51-100

OPA 캡슐화 이더넷 패킷은 64비트 Quad Word(QW) 단위로 구성됩니다. QW0과 QW1은 경로, 길이, 서비스 클래스, 링크 전송 형식, PKEY와 엔트로피를 담고 QW2부터 이더넷 패킷이 시작됩니다. 마지막 QW에는 패딩된 이더넷 데이터와 ICRC, Tail, 링크 전송 꼬리 플릿 표시가 들어갑니다.

OPA 캡슐화 패킷 비트 배치
Quad Word비트필드
QW00-19SLID (lower 20 bits)
QW020-30Length (in Quad Words)
QW031BECN bit
QW032-51DLID (lower 20 bits)
QW052-56SC (Service Class)
QW057-59RC (Routing Control)
QW060FECN bit
QW061-62L2 (=10, 16B format)
QW063LT (=1, Link Transfer Head Flit)
QW10-7L4 type (=0x78 ETHERNET)
QW18-11SLID[23:20]
QW112-15DLID[23:20]
QW116-31PKEY
QW132-47Entropy
QW148-63Reserved
QW20-15Reserved
QW216-31L4 header
QW232-63Ethernet Packet
QW3..N-10-63Ethernet packet (pad extended)
QWN0-23Ethernet packet (pad extended)
QWN24-55ICRC
QWN56-61Tail
QWN62-63LT (=01, Link Transfer Tail Flit)

원문 표의 모든 Quad Word, 비트 범위, 필드를 그대로 대응시킵니다.

송신 측은 VNIC OPA 패킷이 QW 경계에 맞도록 이더넷 패킷을 패딩하며 `Tail` 필드에 추가한 바이트 수를 기록합니다. 수신 측은 `Tail`을 읽어 패딩을 제거하고, ICRC와 Tail 및 OPA 헤더도 벗긴 다음 패킷을 네트워크 스택에 전달합니다.

L4 헤더 필드는 VNIC 포트가 속한 가상 이더넷 스위치 ID를 담습니다. 수신 측은 이 값을 이용해 받은 VNIC 패킷을 서로 다른 VNIC 포트로 역다중화합니다.

이더넷 패킷의 OPA 캡슐화와 복원
이더넷 패킷과 대상 가상 스위치 ID 준비QW 정렬에 필요한 패딩 추가, `Tail`에 패딩 바이트 수 기록OPA 헤더와 L4 type `0x78 ETHERNET`, PKEY, ICRC 구성HFI 노드 사이로 캡슐화 패킷 전송수신 시 Tail을 읽어 패딩, ICRC, Tail, OPA 헤더 제거L4 헤더의 가상 스위치 ID로 VNIC 포트 역다중화복원한 이더넷 패킷을 Linux 네트워크 스택에 전달

송신 패딩부터 수신 역다중화까지의 데이터 경로입니다.


The Omni-Path encapsulated Ethernet packet format is as described below.

==================== ================================
Bits                 Field
==================== ================================
Quad Word 0:
0-19                 SLID (lower 20 bits)
20-30                Length (in Quad Words)
31                   BECN bit
32-51                DLID (lower 20 bits)
52-56                SC (Service Class)
57-59                RC (Routing Control)
60                   FECN bit
61-62                L2 (=10, 16B format)
63                   LT (=1, Link Transfer Head Flit)

Quad Word 1:
0-7                  L4 type (=0x78 ETHERNET)
8-11                 SLID[23:20]
12-15                DLID[23:20]
16-31                PKEY
32-47                Entropy
48-63                Reserved

Quad Word 2:
0-15                 Reserved
16-31                L4 header
32-63                Ethernet Packet

Quad Words 3 to N-1:
0-63                 Ethernet packet (pad extended)

Quad Word N (last):
0-23                 Ethernet packet (pad extended)
24-55                ICRC
56-61                Tail
62-63                LT (=01, Link Transfer Tail Flit)
==================== ================================

Ethernet packet is padded on the transmit side to ensure that the VNIC OPA
packet is quad word aligned. The 'Tail' field contains the number of bytes
padded. On the receive side the 'Tail' field is read and the padding is
removed (along with ICRC, Tail and OPA header) before passing packet up
the network stack.

The L4 header field contains the virtual Ethernet switch id the VNIC port
belongs to. On the receive side, this field is used to de-multiplex the
received VNIC packets to different VNIC ports.

하드웨어 의존 및 독립 드라이버 구성

101-132

Intel OPA VNIC 소프트웨어는 하드웨어 의존 구성 요소와 하드웨어 독립 구성 요소로 나뉩니다.

IB 장치에는 RDMA netdev 장치를 할당하고 해제하는 지원이 추가되었습니다. RDMA netdev는 네트워크 스택과 연결되어 표준 네트워크 인터페이스를 만들며, `OPA_VNIC`은 RDMA netdev 장치 유형입니다.

하드웨어 의존 VNIC 기능은 HFI1 드라이버에 포함됩니다. 이 드라이버는 `OPA_VNIC` RDMA netdev를 할당하고 해제하는 verbs를 구현하고 VNIC에 필요한 하드웨어 자원을 할당하고 관리합니다.

HFI1 쪽은 네트워크 스택과 연결되고 필요한 `net_device_ops` 함수를 구현합니다. 송신 경로에서는 Omni-Path 캡슐화 이더넷 패킷을 받아 하드웨어에 제공하고, 수신 경로에서는 패킷을 네트워크 스택으로 올리기 전에 Omni-Path 헤더를 제거합니다. RDMA netdev 제어 연산도 이 계층이 구현합니다.

OPA VNIC 모듈은 하드웨어 독립 기능을 구현합니다. VNIC Ethernet Management Agent(VEMA)는 IB 코어에 IB 클라이언트로 등록하고 IB MAD 스택과 연동하며, Ethernet Manager(EM)와 VNIC netdev 사이에서 관리 정보를 교환합니다.

OPA VNIC 드라이버 책임 분리
계층주요 책임경계 인터페이스
HFI1 하드웨어 의존부`OPA_VNIC` RDMA netdev 할당·해제, HW 자원 관리Verbs, RDMA netdev control operations
HFI1 데이터 경로캡슐화 송신 패킷의 HW 접근, 수신 OPA 헤더 제거`net_device_ops`, Linux network stack
OPA VNIC 모듈하드웨어 독립 VNIC 제어와 송신 캡슐화RDMA netdev, HFI1 제어 연산
VEMAEM과 VNIC netdev의 관리 정보 교환IB client, IB MAD stack

하드웨어 의존 HFI1 계층과 하드웨어 독립 OPA VNIC 모듈의 책임을 비교합니다.

Driver Design
==============
Intel OPA VNIC software design is presented in the below diagram.
OPA VNIC functionality has a HW dependent component and a HW
independent component.

The support has been added for IB device to allocate and free the RDMA
netdev devices. The RDMA netdev supports interfacing with the network
stack thus creating standard network interfaces. OPA_VNIC is an RDMA
netdev device type.

The HW dependent VNIC functionality is part of the HFI1 driver. It
implements the verbs to allocate and free the OPA_VNIC RDMA netdev.
It involves HW resource allocation/management for VNIC functionality.
It interfaces with the network stack and implements the required
net_device_ops functions. It expects Omni-Path encapsulated Ethernet
packets in the transmit path and provides HW access to them. It strips
the Omni-Path header from the received packets before passing them up
the network stack. It also implements the RDMA netdev control operations.

The OPA VNIC module implements the HW independent VNIC functionality.
It consists of two parts. The VNIC Ethernet Management Agent (VEMA)
registers itself with IB core as an IB client and interfaces with the
IB MAD stack. It exchanges the management information with the Ethernet
Manager (EM) and the VNIC netdev. The VNIC netdev part allocates and frees
the OPA_VNIC RDMA netdev devices. It overrides the net_device_ops functions
set by HW dependent VNIC driver where required to accommodate any control
operation. It also handles the encapsulation of Ethernet packets with an
Omni-Path header in the transmit path. For each VNIC interface, the
information required for encapsulation is configured by the EM via VEMA MAD
interface. It also passes any control information to the HW dependent driver
by invoking the RDMA netdev control operations::

VEMA, RDMA netdev, HFI1 제어 흐름

133-159

VNIC netdev 부분은 `OPA_VNIC` RDMA netdev 장치를 할당하고 해제합니다. 제어 연산을 수용해야 할 때는 하드웨어 의존 드라이버가 설정한 `net_device_ops` 함수를 필요한 범위에서 재정의합니다.

송신 경로에서 OPA VNIC 모듈은 이더넷 패킷을 Omni-Path 헤더로 캡슐화합니다. 각 VNIC 인터페이스에 필요한 캡슐화 정보는 EM이 VEMA MAD 인터페이스를 통해 구성합니다. 모듈은 RDMA netdev 제어 연산을 호출해 제어 정보를 하드웨어 의존 드라이버에도 전달합니다.

OPA VNIC 드라이버 스택
IB MAD 스택이 VEMA 관리 메시지를 OPA VNIC Module에 전달Linux Network Stack이 OPA VNIC RDMA Netdev와 이더넷 패킷 교환OPA VNIC Module이 VEMA/EMA 기능과 송신 OPA 캡슐화 수행모듈이 IB core에 IB client로 등록IB core와 RDMA netdev control operations가 HFI1 Driver로 연결HFI1 Driver with VNIC support가 하드웨어 자원과 데이터 경로 처리수신 패킷은 HFI1의 OPA 헤더 제거 후 Linux Network Stack으로 전달

원문의 드라이버 설계 그림을 관리 경로와 데이터 경로가 합류하는 계층으로 다시 그렸습니다.

관리 경로와 데이터 경로
경로상위중간하위
관리IB MAD, Ethernet ManagerVEMA/EMA, IB coreHFI1 제어 연산
송신 데이터Linux Network StackOPA VNIC RDMA Netdev, OPA 헤더 캡슐화HFI1 하드웨어 접근
수신 데이터Linux Network StackVNIC 포트 역다중화HFI1 OPA 헤더 제거

드라이버 설계 그림의 상위 인터페이스와 하위 HFI1 연결을 구분합니다.


        +-------------------+ +----------------------+
        |                   | |       Linux          |
        |     IB MAD        | |      Network         |
        |                   | |       Stack          |
        +-------------------+ +----------------------+
                 |               |          |
                 |               |          |
        +----------------------------+      |
        |                            |      |
        |      OPA VNIC Module       |      |
        |  (OPA VNIC RDMA Netdev     |      |
        |     & EMA functions)       |      |
        |                            |      |
        +----------------------------+      |
                    |                       |
                    |                       |
           +------------------+             |
           |     IB core      |             |
           +------------------+             |
                    |                       |
                    |                       |
        +--------------------------------------------+
        |                                            |
        |      HFI1 Driver with VNIC support         |
        |                                            |
        +--------------------------------------------+