← Documents Documentation/filesystems/smb/smbdirect.rst GitHub 원문 ↗

Linux 6.18.37 · Filesystems / SMB

SMB Direct - SMB3 over RDMA

SMB Direct의 RDMA stack, Kconfig, mount와 검증 절차를 다루는 전문 번역입니다.

Source pathDocumentation/filesystems/smb/smbdirect.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

smbdirect.rst:1-103

SMB Direct는 SMB3를 RDMA로 운반해 TCP/IP stack 우회, 높은 처리량, 낮은 latency를 제공한다. kernel 5.15 이상에서 `cifs.ko` client와 `ksmbd.ko` server 양쪽 지원을 켜고 `vers=3.0+`, `rdma` 옵션으로 사용한다.

SMB Direct 준비
RDMA device·stackclient/server KconfigKSMBD multi-channel`mount.cifs -o vers=3.1.1,rdma`dmesg·`/proc/mounts` 검증

장치부터 확인까지의 최소 경로다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ===========================
4 SMB Direct - SMB3 over RDMA
5 ===========================
6
7 This document describes how to set up the Linux SMB client and server to
8 use RDMA.
9
10 Overview
11 ========
12 The Linux SMB kernel client supports SMB Direct, which is a transport
13 scheme for SMB3 that uses RDMA (Remote Direct Memory Access) to provide
14 high throughput and low latencies by bypassing the traditional TCP/IP
15 stack.
16 SMB Direct on the Linux SMB client can be tested against KSMBD - a
17 kernel-space SMB server.
18
19 Installation
20 =============
21 - Install an RDMA device. As long as the RDMA device driver is supported
22 by the kernel, it should work. This includes both software emulators (soft
23 RoCE, soft iWARP) and hardware devices (InfiniBand, RoCE, iWARP).
24
25 - Install a kernel with SMB Direct support. The first kernel release to
26 support SMB Direct on both the client and server side is 5.15. Therefore,
27 a distribution compatible with kernel 5.15 or later is required.
28
29 - Install cifs-utils, which provides the `mount.cifs` command to mount SMB
30 shares.
31
32 - Configure the RDMA stack
33
34 Make sure that your kernel configuration has RDMA support enabled. Under
35 Device Drivers -> Infiniband support, update the kernel configuration to
36 enable Infiniband support.
37
38 Enable the appropriate IB HCA support or iWARP adapter support,
39 depending on your hardware.
40
41 If you are using InfiniBand, enable IP-over-InfiniBand support.
42
43 For soft RDMA, enable either the soft iWARP (`RDMA _SIW`) or soft RoCE
44 (`RDMA_RXE`) module. Install the `iproute2` package and use the
45 `rdma link add` command to load the module and create an
46 RDMA interface.
47
48 e.g. if your local ethernet interface is `eth0`, you can use:
49
50 .. code-block:: bash
51
52 sudo rdma link add siw0 type siw netdev eth0
53
54 - Enable SMB Direct support for both the server and the client in the kernel
55 configuration.
56
57 Server Setup
58
59 .. code-block:: text
60
61 Network File Systems --->
62 <M> SMB3 server support
63 [*] Support for SMB Direct protocol
64
65 Client Setup
66
67 .. code-block:: text
68
69 Network File Systems --->
70 <M> SMB3 and CIFS support (advanced network filesystem)
71 [*] SMB Direct support
72
73 - Build and install the kernel. SMB Direct support will be enabled in the
74 cifs.ko and ksmbd.ko modules.
75
76 Setup and Usage
77 ================
78
79 - Set up and start a KSMBD server as described in the `KSMBD documentation
80 <https://www.kernel.org/doc/Documentation/filesystems/smb/ksmbd.rst>`_.
81 Also add the "server multi channel support = yes" parameter to ksmbd.conf.
82
83 - On the client, mount the share with `rdma` mount option to use SMB Direct
84 (specify a SMB version 3.0 or higher using `vers`).
85
86 For example:
87
88 .. code-block:: bash
89
90 mount -t cifs //server/share /mnt/point -o vers=3.1.1,rdma
91
92 - To verify that the mount is using SMB Direct, you can check dmesg for the
93 following log line after mounting:
94
95 .. code-block:: text
96
97 CIFS: VFS: RDMA transport established
98
99 Or, verify `rdma` mount option for the share in `/proc/mounts`:
100
101 .. code-block:: bash
102
103 cat /proc/mounts | grep cifs
104

3. 한국어 전문 번역

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

SMB3 over RDMA 개요

1-18

SMB Direct는 SMB3의 전송 계층으로 RDMA(Remote Direct Memory Access)를 사용한다. 전통적인 TCP/IP stack을 우회해 높은 처리량과 낮은 latency를 제공하며, Linux SMB kernel client와 kernel-space 서버 KSMBD 사이에서 시험할 수 있다.

SMB Direct 데이터 경로
Linux `cifs.ko` SMB3 clientSMB Direct transport 선택RDMA NIC 또는 software RDMA interface낮은 latency·높은 throughput 전송KSMBD SMB3 server

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-53

kernel이 지원하는 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`를 구성한다.

지원 RDMA 유형
분류종류필수 구성
HardwareInfiniBandIB HCA, 필요 시 IP-over-IB
HardwareRoCE해당 adapter driver
HardwareiWARPiWARP adapter 지원
Softwaresoft RoCE`RDMA_RXE`와 `rdma link add`
Softwaresoft iWARP`RDMA_SIW`와 `rdma link add`

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-75

server에서는 `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에 포함된다.

SMB Direct Kconfig
역할상위 항목선택 항목module
ServerSMB3 server supportSupport for SMB Direct protocol`ksmbd.ko`
ClientSMB3 and CIFS supportSMB Direct support`cifs.ko`

양쪽 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-103

KSMBD 문서대로 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`로 검증한다.

SMB Direct 사용 검증
KSMBD에 multi-channel support 활성화client에서 `vers=3.0+`와 `rdma`로 mount`dmesg`의 `RDMA transport established` 확인`/proc/mounts`의 CIFS `rdma` 옵션 확인두 endpoint가 SMB Direct transport로 통신

설정, 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