blob: e01f18fbfa9f4467b923d25e09659f88fcd906c2 [file] [log] [blame]
Mauro Carvalho Chehabd2ba7ca2020-03-02 09:15:45 +01001.. SPDX-License-Identifier: GPL-2.0
2
3=================================
Karen Xiec3673462008-12-09 14:15:32 -08004Chelsio S3 iSCSI Driver for Linux
Mauro Carvalho Chehabd2ba7ca2020-03-02 09:15:45 +01005=================================
Karen Xiec3673462008-12-09 14:15:32 -08006
7Introduction
8============
9
10The Chelsio T3 ASIC based Adapters (S310, S320, S302, S304, Mezz cards, etc.
Karen Xie802d5272009-02-13 21:39:04 -080011series of products) support iSCSI acceleration and iSCSI Direct Data Placement
Karen Xiec3673462008-12-09 14:15:32 -080012(DDP) where the hardware handles the expensive byte touching operations, such
13as CRC computation and verification, and direct DMA to the final host memory
14destination:
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
Karen Xie802d5272009-02-13 21:39:04 -080038 On receiving, S3 h/w recovers the iSCSI PDU by reassembling TCP
Karen Xiec3673462008-12-09 14:15:32 -080039 segments, separating the header and data, calculating and verifying
Karen Xie802d5272009-02-13 21:39:04 -080040 the digests, then forwarding the header to the host. The payload data,
Karen Xiec3673462008-12-09 14:15:32 -080041 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
44The cxgb3i driver interfaces with open-iscsi initiator and provides the iSCSI
45acceleration through Chelsio hardware wherever applicable.
46
47Using the cxgb3i Driver
48=======================
49
50The following steps need to be taken to accelerates the open-iscsi initiator:
51
521. Load the cxgb3i driver: "modprobe cxgb3i"
53
54 The cxgb3i module registers a new transport class "cxgb3i" with open-iscsi.
55
Mauro Carvalho Chehabd2ba7ca2020-03-02 09:15:45 +010056 * in the case of recompiling the kernel, the cxgb3i selection is located at::
57
Karen Xiec3673462008-12-09 14:15:32 -080058 Device Drivers
59 SCSI device support --->
60 [*] SCSI low-level drivers --->
61 <M> Chelsio S3xx iSCSI support
62
632. Create an interface file located under /etc/iscsi/ifaces/ for the new
64 transport class "cxgb3i".
65
Mauro Carvalho Chehabd2ba7ca2020-03-02 09:15:45 +010066 The content of the file should be in the following format::
67
Karen Xiec3673462008-12-09 14:15:32 -080068 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
Mauro Carvalho Chehabd2ba7ca2020-03-02 09:15:45 +010073 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.
Karen Xiec3673462008-12-09 14:15:32 -080075
763. edit /etc/iscsi/iscsid.conf
Karen Xie802d5272009-02-13 21:39:04 -080077 The default setting for MaxRecvDataSegmentLength (131072) is too big;
Mauro Carvalho Chehabd2ba7ca2020-03-02 09:15:45 +010078 replace with a value no bigger than 15360 (for example 8192)::
Karen Xiec3673462008-12-09 14:15:32 -080079
80 node.conn[0].iscsi.MaxRecvDataSegmentLength = 8192
81
82 * The login would fail for a normal session if MaxRecvDataSegmentLength is
Mauro Carvalho Chehabd2ba7ca2020-03-02 09:15:45 +010083 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.
Karen Xiec3673462008-12-09 14:15:32 -080086
874. 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.