cxgb3i.rst 3.3 KB

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