Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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