User Manual

Driver FeaturesRev 2.0-3.0.0
Mellanox Technologies
42
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
target under
/dev, use the following command:
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: 63
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)
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.3 SRP Tools - ibsrpdm and srp_daemon
To assist in performing the steps in Section 6, the OFED distribution provides two utilities,
ibsrpdm and srp_daemon, which
Detect targets on the fabric reachable by the Initiator (for Step 1)
Output target attributes in a format suitable for use in the above “echo” command (Step
2)
The utilities can be found under
/usr/sbin/, and are part of the srptools RPM that may be
installed using the Mellanox OFED installation. Detailed information regarding the various
options for these utilities are provided by their man pages.
Below, several usage scenarios for these utilities are presented.
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-mthca[hca number]-[port number]/add_target