요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
==================
IP over InfiniBand
==================
The ib_ipoib driver is an implementation of the IP over InfiniBand
protocol as specified by RFC 4391 and 4392, issued by the IETF ipoib
working group. It is a "native" implementation in the sense of
setting the interface type to ARPHRD_INFINIBAND and the hardware
address length to 20 (earlier proprietary implementations
masqueraded to the kernel as ethernet interfaces).
Partitions and P_Keys
=====================
When the IPoIB driver is loaded, it creates one interface for each
port using the P_Key at index 0. To create an interface with a
different P_Key, write the desired P_Key into the main interface's
/sys/class/net/<intf name>/create_child file. For example::
echo 0x8001 > /sys/class/net/ib0/create_child
This will create an interface named ib0.8001 with P_Key 0x8001. To
remove a subinterface, use the "delete_child" file::
echo 0x8001 > /sys/class/net/ib0/delete_child
The P_Key for any interface is given by the "pkey" file, and the
main interface for a subinterface is in "parent."
Child interface create/delete can also be done using IPoIB's
rtnl_link_ops, where children created using either way behave the same.
Datagram vs Connected modes
===========================
The IPoIB driver supports two modes of operation: datagram and
connected. The mode is set and read through an interface's
/sys/class/net/<intf name>/mode file.
In datagram mode, the IB UD (Unreliable Datagram) transport is used
and so the interface MTU has is equal to the IB L2 MTU minus the
IPoIB encapsulation header (4 bytes). For example, in a typical IB
fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes.
In connected mode, the IB RC (Reliable Connected) transport is used.
Connected mode takes advantage of the connected nature of the IB
transport and allows an MTU up to the maximal IP packet size of 64K,
which reduces the number of IP packets needed for handling large UDP
datagrams, TCP segments, etc and increases the performance for large
messages.
In connected mode, the interface's UD QP is still used for multicast
and communication with peers that don't support connected mode. In
this case, RX emulation of ICMP PMTU packets is used to cause the
networking stack to use the smaller UD MTU for these neighbours.
Stateless offloads
==================
If the IB HW supports IPoIB stateless offloads, IPoIB advertises
TCP/IP checksum and/or Large Send (LSO) offloading capability to the
network stack.
Large Receive (LRO) offloading is also implemented and may be turned
on/off using ethtool calls. Currently LRO is supported only for
checksum offload capable devices.
Stateless offloads are supported only in datagram mode.
Interrupt moderation
====================
If the underlying IB device supports CQ event moderation, one can
use ethtool to set interrupt mitigation parameters and thus reduce
the overhead incurred by handling interrupts. The main code path of
IPoIB doesn't use events for TX completion signaling so only RX
moderation is supported.
Debugging Information
=====================
By compiling the IPoIB driver with CONFIG_INFINIBAND_IPOIB_DEBUG set
to 'y', tracing messages are compiled into the driver. They are
turned on by setting the module parameters debug_level and
mcast_debug_level to 1. These parameters can be controlled at
runtime through files in /sys/module/ib_ipoib/.
CONFIG_INFINIBAND_IPOIB_DEBUG also enables files in the debugfs
virtual filesystem. By mounting this filesystem, for example with::
mount -t debugfs none /sys/kernel/debug
it is possible to get statistics about multicast groups from the
files /sys/kernel/debug/ipoib/ib0_mcg and so on.
The performance impact of this option is negligible, so it
is safe to enable this option with debug_level set to 0 for normal
operation.
CONFIG_INFINIBAND_IPOIB_DEBUG_DATA enables even more debug output in
the data path when data_debug_level is set to 1. However, even with
the output disabled, enabling this configuration option will affect
performance, because it adds tests to the fast path.
References
==========
Transmission of IP over InfiniBand (IPoIB) (RFC 4391)
http://ietf.org/rfc/rfc4391.txt
IP over InfiniBand (IPoIB) Architecture (RFC 4392)
http://ietf.org/rfc/rfc4392.txt
IP over InfiniBand: Connected Mode (RFC 4755)
http://ietf.org/rfc/rfc4755.txt
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
IPoIB 개요와 P_Key 파티션
1-31`ib_ipoib` 드라이버는 IETF IPoIB 작업 그룹이 발행한 RFC 4391과 RFC 4392에 정의된 IP over InfiniBand 프로토콜의 구현입니다. 인터페이스 유형을 `ARPHRD_INFINIBAND`로 지정하고 하드웨어 주소 길이를 20바이트로 설정하므로, 이더넷 인터페이스로 가장하던 초기 독점 구현과 달리 네이티브 InfiniBand 인터페이스로 동작합니다.
IPoIB 드라이버가 적재되면 각 포트마다 P_Key 인덱스 0을 사용하는 기본 인터페이스 하나가 만들어집니다. 다른 P_Key를 쓰는 자식 인터페이스가 필요하면 기본 인터페이스의 `/sys/class/net/<intf name>/create_child` 파일에 원하는 P_Key를 기록합니다.
echo 0x8001 > /sys/class/net/ib0/create_child
# 결과: ib0.8001, P_Key 0x8001
echo 0x8001 > /sys/class/net/ib0/delete_child
예에서는 P_Key `0x8001`을 갖는 `ib0.8001` 인터페이스가 생성됩니다. 삭제할 때는 같은 값을 `delete_child`에 기록합니다. 임의 인터페이스의 P_Key는 `pkey` 파일에서, 자식 인터페이스의 기본 인터페이스는 `parent` 파일에서 확인할 수 있습니다.
자식 인터페이스 생성과 삭제는 IPoIB의 `rtnl_link_ops`로도 수행할 수 있습니다. sysfs와 rtnetlink 가운데 어느 경로를 사용해도 생성된 자식의 동작은 같습니다.
기본 포트 인터페이스에서 별도 파티션 인터페이스를 만들고 확인한 뒤 제거하는 흐름입니다.
P_Key 기반 자식 인터페이스를 다루는 파일과 의미를 정리합니다.
==================
IP over InfiniBand
==================
The ib_ipoib driver is an implementation of the IP over InfiniBand
protocol as specified by RFC 4391 and 4392, issued by the IETF ipoib
working group. It is a "native" implementation in the sense of
setting the interface type to ARPHRD_INFINIBAND and the hardware
address length to 20 (earlier proprietary implementations
masqueraded to the kernel as ethernet interfaces).
Partitions and P_Keys
=====================
When the IPoIB driver is loaded, it creates one interface for each
port using the P_Key at index 0. To create an interface with a
different P_Key, write the desired P_Key into the main interface's
/sys/class/net/<intf name>/create_child file. For example::
echo 0x8001 > /sys/class/net/ib0/create_child
This will create an interface named ib0.8001 with P_Key 0x8001. To
remove a subinterface, use the "delete_child" file::
echo 0x8001 > /sys/class/net/ib0/delete_child
The P_Key for any interface is given by the "pkey" file, and the
main interface for a subinterface is in "parent."
Child interface create/delete can also be done using IPoIB's
rtnl_link_ops, where children created using either way behave the same.
Datagram 모드와 Connected 모드
32-56IPoIB는 datagram과 connected 두 동작 모드를 지원합니다. 현재 모드를 읽거나 바꾸려면 인터페이스의 `/sys/class/net/<intf name>/mode` 파일을 사용합니다.
Datagram 모드는 IB UD(Unreliable Datagram) 전송을 사용합니다. 인터페이스 MTU는 IB 계층 2 MTU에서 4바이트 IPoIB 캡슐화 헤더를 뺀 값입니다. 따라서 일반적인 2K MTU 패브릭에서는 `2048 - 4 = 2044`바이트가 IPoIB MTU가 됩니다.
Connected 모드는 IB RC(Reliable Connected) 전송을 사용합니다. 연결형 IB 전송의 특성을 활용해 MTU를 최대 IP 패킷 크기인 64K까지 늘릴 수 있으므로 큰 UDP 데이터그램과 TCP 세그먼트를 처리할 때 필요한 IP 패킷 수를 줄이고 대형 메시지 성능을 높입니다.
Connected 모드에서도 멀티캐스트와 connected 모드를 지원하지 않는 피어와의 통신에는 인터페이스의 UD QP를 계속 사용합니다. 이때 수신 경로는 ICMP PMTU 패킷을 에뮬레이션해 네트워크 스택이 해당 이웃에는 더 작은 UD MTU를 사용하도록 만듭니다.
전송 방식, MTU, 적용 경로의 차이를 한눈에 비교합니다.
대상과 기능 지원 여부에 따라 RC 또는 UD 경로가 선택됩니다.
Datagram vs Connected modes
===========================
The IPoIB driver supports two modes of operation: datagram and
connected. The mode is set and read through an interface's
/sys/class/net/<intf name>/mode file.
In datagram mode, the IB UD (Unreliable Datagram) transport is used
and so the interface MTU has is equal to the IB L2 MTU minus the
IPoIB encapsulation header (4 bytes). For example, in a typical IB
fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes.
In connected mode, the IB RC (Reliable Connected) transport is used.
Connected mode takes advantage of the connected nature of the IB
transport and allows an MTU up to the maximal IP packet size of 64K,
which reduces the number of IP packets needed for handling large UDP
datagrams, TCP segments, etc and increases the performance for large
messages.
In connected mode, the interface's UD QP is still used for multicast
and communication with peers that don't support connected mode. In
this case, RX emulation of ICMP PMTU packets is used to cause the
networking stack to use the smaller UD MTU for these neighbours.
상태 비저장 오프로드와 인터럽트 완화
57-78IB 하드웨어가 IPoIB 상태 비저장 오프로드를 지원하면 드라이버는 TCP/IP 체크섬 및 또는 LSO(Large Send Offload) 기능을 네트워크 스택에 알립니다.
LRO(Large Receive Offload)도 구현되어 있으며 `ethtool` 호출로 켜고 끌 수 있습니다. 현재 LRO는 체크섬 오프로드가 가능한 장치에서만 지원됩니다. 체크섬, LSO, LRO를 포함한 상태 비저장 오프로드는 datagram 모드에서만 지원됩니다.
하위 IB 장치가 CQ 이벤트 완화를 지원하면 `ethtool`로 인터럽트 완화 매개변수를 설정해 인터럽트 처리 비용을 줄일 수 있습니다. IPoIB 주 경로는 송신 완료 신호에 이벤트를 사용하지 않으므로 완화는 수신 경로에만 적용됩니다.
기능별 전제 조건과 적용 범위를 정리합니다.
Stateless offloads
==================
If the IB HW supports IPoIB stateless offloads, IPoIB advertises
TCP/IP checksum and/or Large Send (LSO) offloading capability to the
network stack.
Large Receive (LRO) offloading is also implemented and may be turned
on/off using ethtool calls. Currently LRO is supported only for
checksum offload capable devices.
Stateless offloads are supported only in datagram mode.
Interrupt moderation
====================
If the underlying IB device supports CQ event moderation, one can
use ethtool to set interrupt mitigation parameters and thus reduce
the overhead incurred by handling interrupts. The main code path of
IPoIB doesn't use events for TX completion signaling so only RX
moderation is supported.
디버깅 구성과 런타임 인터페이스
79-104`CONFIG_INFINIBAND_IPOIB_DEBUG=y`로 드라이버를 빌드하면 추적 메시지가 포함됩니다. 모듈 매개변수 `debug_level`과 `mcast_debug_level`을 1로 설정하면 메시지가 활성화되며, 실행 중에는 `/sys/module/ib_ipoib/` 아래 파일로 제어할 수 있습니다.
이 구성은 debugfs 파일도 활성화합니다. 예를 들어 `mount -t debugfs none /sys/kernel/debug`로 debugfs를 마운트한 뒤 `/sys/kernel/debug/ipoib/ib0_mcg` 같은 파일에서 멀티캐스트 그룹 통계를 확인할 수 있습니다.
`CONFIG_INFINIBAND_IPOIB_DEBUG` 자체의 성능 영향은 미미하므로 정상 운용에서는 `debug_level=0`으로 두고 빌드 옵션을 켜도 안전합니다.
`CONFIG_INFINIBAND_IPOIB_DEBUG_DATA`는 `data_debug_level=1`일 때 데이터 경로의 더 자세한 출력을 활성화합니다. 그러나 출력을 꺼도 빠른 경로에 조건 검사가 추가되므로 이 구성 옵션을 켜는 것만으로 성능이 저하될 수 있습니다.
빌드 옵션, 런타임 매개변수, 성능 영향을 구분합니다.
일반 추적 또는 데이터 경로 추적을 사용할 때의 순서입니다.
Debugging Information
=====================
By compiling the IPoIB driver with CONFIG_INFINIBAND_IPOIB_DEBUG set
to 'y', tracing messages are compiled into the driver. They are
turned on by setting the module parameters debug_level and
mcast_debug_level to 1. These parameters can be controlled at
runtime through files in /sys/module/ib_ipoib/.
CONFIG_INFINIBAND_IPOIB_DEBUG also enables files in the debugfs
virtual filesystem. By mounting this filesystem, for example with::
mount -t debugfs none /sys/kernel/debug
it is possible to get statistics about multicast groups from the
files /sys/kernel/debug/ipoib/ib0_mcg and so on.
The performance impact of this option is negligible, so it
is safe to enable this option with debug_level set to 0 for normal
operation.
CONFIG_INFINIBAND_IPOIB_DEBUG_DATA enables even more debug output in
the data path when data_debug_level is set to 1. However, even with
the output disabled, enabling this configuration option will affect
performance, because it adds tests to the fast path.
IPoIB 표준 참고 문서
105-115IPoIB의 기본 전송과 주소 해석은 RFC 4391, 전체 아키텍처는 RFC 4392, connected 모드는 RFC 4755에서 정의합니다.
문서에서 직접 제시하는 세 표준과 원문 위치입니다.
References
==========
Transmission of IP over InfiniBand (IPoIB) (RFC 4391)
http://ietf.org/rfc/rfc4391.txt
IP over InfiniBand (IPoIB) Architecture (RFC 4392)
http://ietf.org/rfc/rfc4392.txt
IP over InfiniBand: Connected Mode (RFC 4755)
http://ietf.org/rfc/rfc4755.txt
요약·해설
ipoib.rst:1-115IPoIB는 네이티브 InfiniBand 네트워크 인터페이스로서 P_Key별 자식 인터페이스를 제공하고 UD datagram 또는 RC connected 모드로 IP 패킷을 전송합니다. 모드별 MTU와 폴백, 하드웨어 오프로드, RX 인터럽트 완화, debugfs 및 데이터 경로 추적의 성능 차이를 함께 이해해야 합니다.
원문 분량과 핵심 적용 대상을 요약합니다.
문서의 주요 동작 순서를 압축해 보여 줍니다.