← Documents Documentation/scsi/cxgb3i.rst GitHub 원문 ↗

Linux 6.18.37 · SCSI

Chelsio S3 iSCSI Driver

T3 ASIC의 digest·DDP offload와 open-iscsi cxgb3i 설정을 설명합니다.

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

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

1. 요약·해설

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

요약·해설

cxgb3i.rst:1-90

T3 ASIC의 digest·DDP offload와 open-iscsi cxgb3i 설정을 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 =================================
4 Chelsio S3 iSCSI Driver for Linux
5 =================================
6
7 Introduction
8 ============
9
10 The Chelsio T3 ASIC based Adapters (S310, S320, S302, S304, Mezz cards, etc.
11 series of products) support iSCSI acceleration and iSCSI Direct Data Placement
12 (DDP) where the hardware handles the expensive byte touching operations, such
13 as CRC computation and verification, and direct DMA to the final host memory
14 destination:
15
16 - iSCSI PDU digest generation and verification
17
18 On transmitting, Chelsio S3 h/w computes and inserts the Header and
19 Data digest into the PDUs.
20 On receiving, Chelsio S3 h/w computes and verifies the Header and
21 Data digest of the PDUs.
22
23 - Direct Data Placement (DDP)
24
25 S3 h/w can directly place the iSCSI Data-In or Data-Out PDU's
26 payload into pre-posted final destination host-memory buffers based
27 on the Initiator Task Tag (ITT) in Data-In or Target Task Tag (TTT)
28 in Data-Out PDUs.
29
30 - PDU Transmit and Recovery
31
32 On transmitting, S3 h/w accepts the complete PDU (header + data)
33 from the host driver, computes and inserts the digests, decomposes
34 the PDU into multiple TCP segments if necessary, and transmit all
35 the TCP segments onto the wire. It handles TCP retransmission if
36 needed.
37
38 On receiving, S3 h/w recovers the iSCSI PDU by reassembling TCP
39 segments, separating the header and data, calculating and verifying
40 the digests, then forwarding the header to the host. The payload data,
41 if possible, will be directly placed into the pre-posted host DDP
42 buffer. Otherwise, the payload data will be sent to the host too.
43
44 The cxgb3i driver interfaces with open-iscsi initiator and provides the iSCSI
45 acceleration through Chelsio hardware wherever applicable.
46
47 Using the cxgb3i Driver
48 =======================
49
50 The following steps need to be taken to accelerates the open-iscsi initiator:
51
52 1. Load the cxgb3i driver: "modprobe cxgb3i"
53
54 The cxgb3i module registers a new transport class "cxgb3i" with open-iscsi.
55
56 * in the case of recompiling the kernel, the cxgb3i selection is located at::
57
58 Device Drivers
59 SCSI device support --->
60 [*] SCSI low-level drivers --->
61 <M> Chelsio S3xx iSCSI support
62
63 2. Create an interface file located under /etc/iscsi/ifaces/ for the new
64 transport class "cxgb3i".
65
66 The content of the file should be in the following format::
67
68 iface.transport_name = cxgb3i
69 iface.net_ifacename = <ethX>
70 iface.ipaddress = <iscsi ip address>
71
72 * if iface.ipaddress is specified, <iscsi ip address> needs to be either the
73 same as the ethX's ip address or an address on the same subnet. Make
74 sure the ip address is unique in the network.
75
76 3. edit /etc/iscsi/iscsid.conf
77 The default setting for MaxRecvDataSegmentLength (131072) is too big;
78 replace with a value no bigger than 15360 (for example 8192)::
79
80 node.conn[0].iscsi.MaxRecvDataSegmentLength = 8192
81
82 * The login would fail for a normal session if MaxRecvDataSegmentLength is
83 too big. A error message in the format of
84 "cxgb3i: ERR! MaxRecvSegmentLength <X> too big. Need to be <= <Y>."
85 would be logged to dmesg.
86
87 4. To direct open-iscsi traffic to go through cxgb3i's accelerated path,
88 "-I <iface file name>" option needs to be specified with most of the
89 iscsiadm command. <iface file name> is the transport interface file created
90 in step 2.
91

3. 한국어 전문 번역

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

T3 ASIC의 digest, DDP와 PDU 복구

1-43

Chelsio T3 ASIC 기반 S310·S320·S302·S304·Mezzanine adapter는 iSCSI acceleration과 Direct Data Placement를 지원한다. Hardware가 CRC처럼 byte를 직접 다루는 비용과 최종 host memory로의 DMA를 맡는다.

송신 때 S3 hardware는 iSCSI PDU header·data digest를 계산해 삽입한다. 수신 때 두 digest를 계산하고 검증한다. DDP는 Data-In의 Initiator Task Tag `ITT` 또는 Data-Out의 Target Task Tag `TTT`를 이용해 payload를 미리 게시한 최종 host buffer에 직접 둔다.

송신 경로는 완전한 PDU를 받아 digest 삽입, TCP segmentation, wire 전송과 필요 시 retransmission을 처리한다. 수신 경로는 TCP segment를 PDU로 재조립하고 header와 data를 분리해 digest를 검증한다. 가능한 payload는 DDP buffer로, 그렇지 않으면 header와 함께 host로 보낸다.

`cxgb3i`는 open-iscsi initiator transport와 연결되어 적용 가능한 traffic을 Chelsio hardware 가속 경로로 보낸다.

S3 offload
기능송신수신
DigestHeader·data digest 생성·삽입계산·검증
PDU/TCPSegment 분할·전송·재전송Segment 재조립
DDP완전한 PDU 전달ITT/TTT로 최종 buffer 배치

Host CPU에서 ASIC으로 넘기는 작업입니다.

수신 PDU 경로
TCP segmentsS3 PDU 재조립Header/data 분리Digest 검증DDP 가능성 확인최종 buffer 또는 host

Wire data가 host memory에 도착하는 과정입니다.

.. SPDX-License-Identifier: GPL-2.0

=================================
Chelsio S3 iSCSI Driver for Linux
=================================

Introduction
============

The Chelsio T3 ASIC based Adapters (S310, S320, S302, S304, Mezz cards, etc.
series of products) support iSCSI acceleration and iSCSI Direct Data Placement
(DDP) where the hardware handles the expensive byte touching operations, such
as CRC computation and verification, and direct DMA to the final host memory
destination:

        - iSCSI PDU digest generation and verification

          On transmitting, Chelsio S3 h/w computes and inserts the Header and
          Data digest into the PDUs.
          On receiving, Chelsio S3 h/w computes and verifies the Header and
          Data digest of the PDUs.

        - Direct Data Placement (DDP)

          S3 h/w can directly place the iSCSI Data-In or Data-Out PDU's
          payload into pre-posted final destination host-memory buffers based
          on the Initiator Task Tag (ITT) in Data-In or Target Task Tag (TTT)
          in Data-Out PDUs.

        - PDU Transmit and Recovery

          On transmitting, S3 h/w accepts the complete PDU (header + data)
          from the host driver, computes and inserts the digests, decomposes
          the PDU into multiple TCP segments if necessary, and transmit all
          the TCP segments onto the wire. It handles TCP retransmission if
          needed.

          On receiving, S3 h/w recovers the iSCSI PDU by reassembling TCP
          segments, separating the header and data, calculating and verifying
          the digests, then forwarding the header to the host. The payload data,
          if possible, will be directly placed into the pre-posted host DDP
          buffer. Otherwise, the payload data will be sent to the host too.

Module과 open-iscsi interface 설정

44-73

`modprobe cxgb3i`로 module을 load하면 open-iscsi에 `cxgb3i` transport class를 등록한다. Kernel configuration에서는 Device Drivers, SCSI device support, SCSI low-level drivers 아래 `Chelsio S3xx iSCSI support`를 module로 선택한다.

`/etc/iscsi/ifaces/` 아래 interface file에 `iface.transport_name = cxgb3i`, `iface.net_ifacename = <ethX>`, `iface.ipaddress = <iscsi ip address>`를 쓴다. IP를 지정하면 ethX와 같거나 같은 subnet이어야 하고 network에서 고유해야 한다.

cxgb3i iface file
Key
iface.transport_namecxgb3i
iface.net_ifacename가속할 ethX
iface.ipaddress동일 interface 또는 subnet의 고유 IP

open-iscsi transport binding입니다.

Transport 등록
cxgb3i module loadTransport class 등록/etc/iscsi/ifaces fileNIC·IP bindingiscsiadm에서 iface 선택

Kernel module에서 iface file로 연결합니다.

The cxgb3i driver interfaces with open-iscsi initiator and provides the iSCSI
acceleration through Chelsio hardware wherever applicable.

Using the cxgb3i Driver
=======================

The following steps need to be taken to accelerates the open-iscsi initiator:

1. Load the cxgb3i driver: "modprobe cxgb3i"

   The cxgb3i module registers a new transport class "cxgb3i" with open-iscsi.

   * in the case of recompiling the kernel, the cxgb3i selection is located at::

        Device Drivers
                SCSI device support --->
                        [*] SCSI low-level drivers  --->
                                <M>   Chelsio S3xx iSCSI support

2. Create an interface file located under /etc/iscsi/ifaces/ for the new
   transport class "cxgb3i".

   The content of the file should be in the following format::

        iface.transport_name = cxgb3i
        iface.net_ifacename = <ethX>
        iface.ipaddress = <iscsi ip address>

   * if iface.ipaddress is specified, <iscsi ip address> needs to be either the
     same as the ethX's ip address or an address on the same subnet. Make

Receive segment 제한과 iscsiadm 선택

74-90

`/etc/iscsi/iscsid.conf`의 기본 `MaxRecvDataSegmentLength=131072`는 너무 크다. 15360 이하, 예를 들어 `node.conn[0].iscsi.MaxRecvDataSegmentLength = 8192`로 바꾼다.

값이 너무 크면 normal session login이 실패하고 dmesg에 `cxgb3i: ERR! MaxRecvSegmentLength <X> too big. Need to be <= <Y>.` 형식의 오류가 기록된다.

대부분의 `iscsiadm` command에 `-I <iface file name>`을 넣어 step 2에서 만든 transport interface를 지정해야 open-iscsi traffic이 cxgb3i 가속 경로를 사용한다.

Login 제한
항목요구
MaxRecvDataSegmentLength15360 이하
권장 예8192
iscsiadm-I iface-file
오류 위치dmesg

Segment size와 가속 interface 선택입니다.

     sure the ip address is unique in the network.

3. edit /etc/iscsi/iscsid.conf
   The default setting for MaxRecvDataSegmentLength (131072) is too big;
   replace with a value no bigger than 15360 (for example 8192)::

        node.conn[0].iscsi.MaxRecvDataSegmentLength = 8192

   * The login would fail for a normal session if MaxRecvDataSegmentLength is
     too big.  A error message in the format of
     "cxgb3i: ERR! MaxRecvSegmentLength <X> too big. Need to be <= <Y>."
     would be logged to dmesg.

4. To direct open-iscsi traffic to go through cxgb3i's accelerated path,
   "-I <iface file name>" option needs to be specified with most of the
   iscsiadm command. <iface file name> is the transport interface file created
   in step 2.