요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
===========================
SMB Direct - SMB3 over RDMA
===========================
This document describes how to set up the Linux SMB client and server to
use RDMA.
Overview
========
The Linux SMB kernel client supports SMB Direct, which is a transport
scheme for SMB3 that uses RDMA (Remote Direct Memory Access) to provide
high throughput and low latencies by bypassing the traditional TCP/IP
stack.
SMB Direct on the Linux SMB client can be tested against KSMBD - a
kernel-space SMB server.
Installation
=============
- Install an RDMA device. As long as the RDMA device driver is supported
by the kernel, it should work. This includes both software emulators (soft
RoCE, soft iWARP) and hardware devices (InfiniBand, RoCE, iWARP).
- Install a kernel with SMB Direct support. The first kernel release to
support SMB Direct on both the client and server side is 5.15. Therefore,
a distribution compatible with kernel 5.15 or later is required.
- Install cifs-utils, which provides the `mount.cifs` command to mount SMB
shares.
- Configure the RDMA stack
Make sure that your kernel configuration has RDMA support enabled. Under
Device Drivers -> Infiniband support, update the kernel configuration to
enable Infiniband support.
Enable the appropriate IB HCA support or iWARP adapter support,
depending on your hardware.
If you are using InfiniBand, enable IP-over-InfiniBand support.
For soft RDMA, enable either the soft iWARP (`RDMA _SIW`) or soft RoCE
(`RDMA_RXE`) module. Install the `iproute2` package and use the
`rdma link add` command to load the module and create an
RDMA interface.
e.g. if your local ethernet interface is `eth0`, you can use:
.. code-block:: bash
sudo rdma link add siw0 type siw netdev eth0
- Enable SMB Direct support for both the server and the client in the kernel
configuration.
Server Setup
.. code-block:: text
Network File Systems --->
<M> SMB3 server support
[*] Support for SMB Direct protocol
Client Setup
.. code-block:: text
Network File Systems --->
<M> SMB3 and CIFS support (advanced network filesystem)
[*] SMB Direct support
- Build and install the kernel. SMB Direct support will be enabled in the
cifs.ko and ksmbd.ko modules.
Setup and Usage
================
- Set up and start a KSMBD server as described in the `KSMBD documentation
<https://www.kernel.org/doc/Documentation/filesystems/smb/ksmbd.rst>`_.
Also add the "server multi channel support = yes" parameter to ksmbd.conf.
- On the client, mount the share with `rdma` mount option to use SMB Direct
(specify a SMB version 3.0 or higher using `vers`).
For example:
.. code-block:: bash
mount -t cifs //server/share /mnt/point -o vers=3.1.1,rdma
- To verify that the mount is using SMB Direct, you can check dmesg for the
following log line after mounting:
.. code-block:: text
CIFS: VFS: RDMA transport established
Or, verify `rdma` mount option for the share in `/proc/mounts`:
.. code-block:: bash
cat /proc/mounts | grep cifs
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
SMB3 over RDMA 개요
1-18SMB Direct는 SMB3의 전송 계층으로 RDMA(Remote Direct Memory Access)를 사용한다. 전통적인 TCP/IP stack을 우회해 높은 처리량과 낮은 latency를 제공하며, Linux SMB kernel client와 kernel-space 서버 KSMBD 사이에서 시험할 수 있다.
SMB3 메시지가 일반 TCP/IP 대신 RDMA transport를 사용한다.
.. SPDX-License-Identifier: GPL-2.0
===========================
SMB Direct - SMB3 over RDMA
===========================
This document describes how to set up the Linux SMB client and server to
use RDMA.
Overview
========
The Linux SMB kernel client supports SMB Direct, which is a transport
scheme for SMB3 that uses RDMA (Remote Direct Memory Access) to provide
high throughput and low latencies by bypassing the traditional TCP/IP
stack.
SMB Direct on the Linux SMB client can be tested against KSMBD - a
kernel-space SMB server.
RDMA 장치와 stack 설치
19-53kernel이 지원하는 RDMA device라면 software emulator인 soft RoCE·soft iWARP와 hardware InfiniBand·RoCE·iWARP를 모두 사용할 수 있다. client와 server 양쪽 SMB Direct를 처음 지원한 kernel release가 5.15이므로 5.15 이상 호환 배포판이 필요하다.
SMB share mount 명령 `mount.cifs`를 제공하는 `cifs-utils`도 설치한다. kernel 설정에서 `Device Drivers → Infiniband support`를 켜고 hardware에 맞는 IB HCA 또는 iWARP adapter 지원을 선택한다. InfiniBand를 사용하면 IP-over-InfiniBand도 활성화한다.
software RDMA는 soft iWARP의 `RDMA_SIW` 또는 soft RoCE의 `RDMA_RXE` module을 사용한다. `iproute2`의 `rdma link add` 명령으로 module을 load하고 interface를 만든다. 예를 들어 Ethernet `eth0` 위에 `sudo rdma link add siw0 type siw netdev eth0`로 `siw0`를 구성한다.
hardware와 software 구현 모두 사용할 수 있다.
Installation
=============
- Install an RDMA device. As long as the RDMA device driver is supported
by the kernel, it should work. This includes both software emulators (soft
RoCE, soft iWARP) and hardware devices (InfiniBand, RoCE, iWARP).
- Install a kernel with SMB Direct support. The first kernel release to
support SMB Direct on both the client and server side is 5.15. Therefore,
a distribution compatible with kernel 5.15 or later is required.
- Install cifs-utils, which provides the `mount.cifs` command to mount SMB
shares.
- Configure the RDMA stack
Make sure that your kernel configuration has RDMA support enabled. Under
Device Drivers -> Infiniband support, update the kernel configuration to
enable Infiniband support.
Enable the appropriate IB HCA support or iWARP adapter support,
depending on your hardware.
If you are using InfiniBand, enable IP-over-InfiniBand support.
For soft RDMA, enable either the soft iWARP (`RDMA _SIW`) or soft RoCE
(`RDMA_RXE`) module. Install the `iproute2` package and use the
`rdma link add` command to load the module and create an
RDMA interface.
e.g. if your local ethernet interface is `eth0`, you can use:
.. code-block:: bash
sudo rdma link add siw0 type siw netdev eth0
Client·server Kconfig와 module
54-75server에서는 `Network File Systems → SMB3 server support → Support for SMB Direct protocol`을 활성화한다. client에서는 `SMB3 and CIFS support (advanced network filesystem) → SMB Direct support`를 활성화한다.
kernel을 빌드하고 설치하면 server 기능은 `ksmbd.ko`, client 기능은 `cifs.ko` module에 포함된다.
양쪽 endpoint 모두 RDMA 지원을 켜야 한다.
- Enable SMB Direct support for both the server and the client in the kernel
configuration.
Server Setup
.. code-block:: text
Network File Systems --->
<M> SMB3 server support
[*] Support for SMB Direct protocol
Client Setup
.. code-block:: text
Network File Systems --->
<M> SMB3 and CIFS support (advanced network filesystem)
[*] SMB Direct support
- Build and install the kernel. SMB Direct support will be enabled in the
cifs.ko and ksmbd.ko modules.
KSMBD 설정·mount·전송 확인
76-103KSMBD 문서대로 server를 시작하고 `ksmbd.conf`에 `server multi channel support = yes`를 추가한다. client는 SMB 3.0 이상을 `vers`로 지정하고 `rdma` mount 옵션을 사용한다. 예제는 `mount -t cifs //server/share /mnt/point -o vers=3.1.1,rdma`다.
mount 뒤 `dmesg`에서 `CIFS: VFS: RDMA transport established`를 확인하면 RDMA transport가 연결된 것이다. 또는 `/proc/mounts`에서 해당 CIFS share에 `rdma` 옵션이 기록됐는지 `cat /proc/mounts | grep cifs`로 검증한다.
설정, mount, 독립적인 두 확인 경로를 순서대로 수행한다.
Setup and Usage
================
- Set up and start a KSMBD server as described in the `KSMBD documentation
<https://www.kernel.org/doc/Documentation/filesystems/smb/ksmbd.rst>`_.
Also add the "server multi channel support = yes" parameter to ksmbd.conf.
- On the client, mount the share with `rdma` mount option to use SMB Direct
(specify a SMB version 3.0 or higher using `vers`).
For example:
.. code-block:: bash
mount -t cifs //server/share /mnt/point -o vers=3.1.1,rdma
- To verify that the mount is using SMB Direct, you can check dmesg for the
following log line after mounting:
.. code-block:: text
CIFS: VFS: RDMA transport established
Or, verify `rdma` mount option for the share in `/proc/mounts`:
.. code-block:: bash
cat /proc/mounts | grep cifs
요약·해설
smbdirect.rst:1-103SMB Direct는 SMB3를 RDMA로 운반해 TCP/IP stack 우회, 높은 처리량, 낮은 latency를 제공한다. kernel 5.15 이상에서 `cifs.ko` client와 `ksmbd.ko` server 양쪽 지원을 켜고 `vers=3.0+`, `rdma` 옵션으로 사용한다.
장치부터 확인까지의 최소 경로다.