User Manual
Driver FeaturesRev 2.2-1.0.1
Mellanox Technologies
54
4.1.2.2 Manually Establishing an SRP Connection
The following steps describe how to manually load an SRP connection between the Initiator and
an SRP
Target. Section 4.1.2.4 explains how to do this automatically.
• Make sure that the
ib_srp module is loaded, the SRP Initiator is reachable by the SRP
Target, and that an SM is running.
• To establish a connection with an SRP Target and create an SRP (SCSI) device for that
tar
get under
/dev, use the following command:
echo -n id_ext=[GUID value],ioc_guid=[GUID value],dgid=[port GID value],\
pkey=ffff,service_id=[service[0] value] > \
/sys/class/infiniband_srp/srp-mlx[hca number]-[port number]/add_target
See Section 4.1.2.3 for instructions on how the parameters in this echo command may be
obtained.
Notes:
• Execution of the above “echo” command may take some time
• The SM must be running while the command executes
• It is possible to include additional parameters in the echo command:
• max_cmd_per_lun - Default: 62
• max_sect (short for max_sectors) - sets the request size of a command
• io_class - Default: 0x100 as in rev 16A of the specification (In rev 10 the default was 0xff00)
• tl_retry_count - a number in the range 2..7 specifying the IB RC retry count. Default: 2
• comp_vector, a number in the range 0..n-1 specifying the MSI-X completion vector. Some HCA's allo-
cate multiple (n) MSI-X vectors per HCA port. If the IRQ affinity masks of these interrupts have been
configured such that each MSI-X interrupt is handled by a different CPU then the comp_vector parame-
ter can be used to spread the SRP completion workload over multiple CPU's.
• cmd_sg_entries, a number in the range 1..255 that specifies the maximum number of data buffer descrip-
tors stored in the SRP_CMD information unit itself. With allow_ext_sg=0 the parameter cmd_sg_entries
defines the maximum S/G list length for a single SRP_CMD, and commands whose S/G list length
exceeds this limit after S/G list collapsing will fail.
• initiator_ext - Please refer to Section 9 (Multiple Connections...)
• To list the new SCSI devices that have been added by the echo command, you may use
either of the following two methods:
• Execute “fdisk -l”. This command lists all devices; the new devices are included in this
listing.
• Execute “dmesg” or look at
/var/log/messages to find messages with the names of the
new devices.
4.1.2.2.1 SRP sysfs Parameters
Interface for making ib_srp connect to a new target. One can request ib_srp to connect to a new
target by writing a comma-separated list of login parameters to this sysfs attribute. The supported
parameters are:
id_ext A 16-digit hexadecimal number specifying the eight byte identifier
extension in the 16-byte SRP target port identifier. The target port iden-
tifier is sent by ib_srp to the target in the SRP_LOGIN_REQ request.