요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Local HCA와 port
sysfs-driver-ib_srp:74-84SRP class instance를 만든 local InfiniBand HCA 이름과 port 번호를 제공합니다.
SCSI host transport state
sysfs-driver-ib_srp:86-161생성된 SCSI host에서 S/G, RDMA channel, completion vector, local·remote GID와 target identifier를 조회합니다.
SRP request credit
sysfs-driver-ib_srp:163-192Target service ID, source GID, 현재 request credit과 credit 고갈로 기다린 횟수를 제공합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/add_target
Date: January 2, 2006
KernelVersion: 2.6.15
Contact: linux-rdma@vger.kernel.org
Description: 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 identifier is sent by ib_srp
to the target in the SRP_LOGIN_REQ request.
* ioc_guid, a 16-digit hexadecimal number specifying the eight
byte I/O controller GUID portion of the 16-byte target port
identifier.
* dgid, a 32-digit hexadecimal number specifying the
destination GID.
* pkey, a four-digit hexadecimal number specifying the
InfiniBand partition key.
* service_id, a 16-digit hexadecimal number specifying the
InfiniBand service ID used to establish communication with
the SRP target. How to find out the value of the service ID
is specified in the documentation of the SRP target.
* max_sect, a decimal number specifying the maximum number of
512-byte sectors to be transferred via a single SCSI command.
* max_cmd_per_lun, a decimal number specifying the maximum
number of outstanding commands for a single LUN.
* io_class, a hexadecimal number specifying the SRP I/O class.
Must be either 0xff00 (rev 10) or 0x0100 (rev 16a). The I/O
class defines the format of the SRP initiator and target
port identifiers.
* initiator_ext, a 16-digit hexadecimal number specifying the
identifier extension portion of the SRP initiator port
identifier. This data is sent by the initiator to the target
in the SRP_LOGIN_REQ request.
* cmd_sg_entries, a number in the range 1..255 that specifies
the maximum number of data buffer descriptors 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.
* allow_ext_sg, whether ib_srp is allowed to include a partial
memory descriptor list in an SRP_CMD instead of the entire
list. If a partial memory descriptor list has been included
in an SRP_CMD the remaining memory descriptors are
communicated from initiator to target via an additional RDMA
transfer. Setting allow_ext_sg to 1 increases the maximum
amount of data that can be transferred between initiator and
target via a single SCSI command. Since not all SRP target
implementations support partial memory descriptor lists the
default value for this option is 0.
* sg_tablesize, a number in the range 1..2048 specifying the
maximum S/G list length the SCSI layer is allowed to pass to
ib_srp. Specifying a value that exceeds cmd_sg_entries is
only safe with partial memory descriptor list support enabled
(allow_ext_sg=1).
* comp_vector, a number in the range 0..n-1 specifying the
MSI-X completion vector of the first RDMA channel. Some
HCA's allocate 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 parameter can be used to
spread the SRP completion workload over multiple CPU's.
* tl_retry_count, a number in the range 2..7 specifying the
IB RC retry count.
* queue_size, the maximum number of commands that the
initiator is allowed to queue per SCSI host. The default
value for this parameter is 62. The lowest supported value
is 2.
* max_it_iu_size, a decimal number specifying the maximum
initiator to target information unit length.
What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/ibdev
Date: January 2, 2006
KernelVersion: 2.6.15
Contact: linux-rdma@vger.kernel.org
Description: HCA name (<hca>).
What: /sys/class/infiniband_srp/srp-<hca>-<port_number>/port
Date: January 2, 2006
KernelVersion: 2.6.15
Contact: linux-rdma@vger.kernel.org
Description: HCA port number (<port_number>).
What: /sys/class/scsi_host/host<n>/allow_ext_sg
Date: May 19, 2011
KernelVersion: 2.6.39
Contact: linux-rdma@vger.kernel.org
Description: Whether ib_srp is allowed to include a partial memory
descriptor list in an SRP_CMD when communicating with an SRP
target.
What: /sys/class/scsi_host/host<n>/ch_count
Date: April 1, 2015
KernelVersion: 3.19
Contact: linux-rdma@vger.kernel.org
Description: Number of RDMA channels used for communication with the SRP
target.
What: /sys/class/scsi_host/host<n>/cmd_sg_entries
Date: May 19, 2011
KernelVersion: 2.6.39
Contact: linux-rdma@vger.kernel.org
Description: Maximum number of data buffer descriptors that may be sent to
the target in a single SRP_CMD request.
What: /sys/class/scsi_host/host<n>/comp_vector
Date: September 2, 2013
KernelVersion: 3.11
Contact: linux-rdma@vger.kernel.org
Description: Completion vector used for the first RDMA channel.
What: /sys/class/scsi_host/host<n>/dgid
Date: June 17, 2006
KernelVersion: 2.6.17
Contact: linux-rdma@vger.kernel.org
Description: InfiniBand destination GID used for communication with the SRP
target. Differs from orig_dgid if port redirection has happened.
What: /sys/class/scsi_host/host<n>/id_ext
Date: June 17, 2006
KernelVersion: 2.6.17
Contact: linux-rdma@vger.kernel.org
Description: Eight-byte identifier extension portion of the 16-byte target
port identifier.
What: /sys/class/scsi_host/host<n>/ioc_guid
Date: June 17, 2006
KernelVersion: 2.6.17
Contact: linux-rdma@vger.kernel.org
Description: Eight-byte I/O controller GUID portion of the 16-byte target
port identifier.
What: /sys/class/scsi_host/host<n>/local_ib_device
Date: November 29, 2006
KernelVersion: 2.6.19
Contact: linux-rdma@vger.kernel.org
Description: Name of the InfiniBand HCA used for communicating with the
SRP target.
What: /sys/class/scsi_host/host<n>/local_ib_port
Date: November 29, 2006
KernelVersion: 2.6.19
Contact: linux-rdma@vger.kernel.org
Description: Number of the HCA port used for communicating with the
SRP target.
What: /sys/class/scsi_host/host<n>/orig_dgid
Date: June 17, 2006
KernelVersion: 2.6.17
Contact: linux-rdma@vger.kernel.org
Description: InfiniBand destination GID specified in the parameters
written to the add_target sysfs attribute.
What: /sys/class/scsi_host/host<n>/pkey
Date: June 17, 2006
KernelVersion: 2.6.17
Contact: linux-rdma@vger.kernel.org
Description: A 16-bit number representing the InfiniBand partition key used
for communication with the SRP target.
What: /sys/class/scsi_host/host<n>/req_lim
Date: October 20, 2010
KernelVersion: 2.6.36
Contact: linux-rdma@vger.kernel.org
Description: Number of requests ib_srp can send to the target before it has
to wait for more credits. For more information see also the
SRP credit algorithm in the SRP specification.
What: /sys/class/scsi_host/host<n>/service_id
Date: June 17, 2006
KernelVersion: 2.6.17
Contact: linux-rdma@vger.kernel.org
Description: InfiniBand service ID used for establishing communication with
the SRP target.
What: /sys/class/scsi_host/host<n>/sgid
Date: February 1, 2014
KernelVersion: 3.13
Contact: linux-rdma@vger.kernel.org
Description: InfiniBand GID of the source port used for communication with
the SRP target.
What: /sys/class/scsi_host/host<n>/zero_req_lim
Date: September 20, 2006
KernelVersion: 2.6.18
Contact: linux-rdma@vger.kernel.org
Description: Number of times the initiator had to wait before sending a
request to the target because it ran out of credits. For more
information see also the SRP credit algorithm in the SRP
specification.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
새 SRP target 연결 요청
1-9| 항목 | 내용 |
|---|---|
| What | /sys/class/infiniband_srp/srp-<hca>-<port_number>/add_target |
| Date | 2006년 1월 2일 |
| KernelVersion | 2.6.15 |
| Contact | linux-rdma@vger.kernel.org |
ib_srp가 새 target에 연결하도록 요청하는 interface다. Comma로 구분한 login parameter 목록을 이 sysfs attribute에 쓰면 연결을 시작한다.
Login parameter는 InfiniBand 경로와 SRP port identity, command resource limit을 한 번에 전달한다.
Target identity와 InfiniBand path parameter
10-36| Parameter | 형식 | 의미 |
|---|---|---|
| id_ext | 16자리 hexadecimal | 16-byte SRP target port identifier 중 8-byte identifier-extension 부분이다. ib_srp가 SRP_LOGIN_REQ로 target에 보낸다. |
| ioc_guid | 16자리 hexadecimal | 16-byte target port identifier 중 8-byte I/O-controller GUID 부분이다. |
| dgid | 32자리 hexadecimal | Destination GID를 지정한다. |
| pkey | 4자리 hexadecimal | InfiniBand partition key를 지정한다. |
| service_id | 16자리 hexadecimal | SRP target과 통신을 설정할 때 사용하는 InfiniBand service ID다. 값을 찾는 방법은 SRP target 문서가 정한다. |
| max_sect | decimal | SCSI command 하나로 전송할 수 있는 512-byte sector의 최대 개수다. |
| max_cmd_per_lun | decimal | LUN 하나에 동시에 outstanding 상태로 둘 수 있는 command의 최대 개수다. |
| io_class | hexadecimal | SRP I/O class다. 0xff00(rev 10) 또는 0x0100(rev 16a)만 허용된다. I/O class는 SRP initiator와 target port identifier의 형식을 정한다. |
| initiator_ext | 16자리 hexadecimal | SRP initiator port identifier의 identifier-extension 부분이다. Initiator가 SRP_LOGIN_REQ로 target에 보낸다. |
SRP_CMD의 scatter/gather descriptor
37-57| Parameter | 범위·기본값 | 의미와 제약 |
|---|---|---|
| cmd_sg_entries | 1..255 | SRP_CMD information unit 자체에 저장할 수 있는 data-buffer descriptor의 최대 개수다. allow_ext_sg=0이면 SRP_CMD 하나의 최대 S/G list 길이가 된다. S/G list collapsing 뒤에도 이 limit를 넘는 command는 실패한다. |
| allow_ext_sg | 기본값 0 | 전체 memory-descriptor list 대신 일부만 SRP_CMD에 넣도록 허용할지 정한다. 일부만 넣으면 나머지는 추가 RDMA transfer로 initiator에서 target에 전달한다. 1로 설정하면 SCSI command 하나로 전송할 수 있는 최대 data 양이 커지지만, 모든 SRP target이 partial list를 지원하지 않으므로 기본값은 0이다. |
| sg_tablesize | 1..2048 | SCSI layer가 ib_srp에 넘길 수 있는 최대 S/G list 길이다. cmd_sg_entries보다 큰 값을 지정하는 것은 partial memory-descriptor list 지원을 켠 allow_ext_sg=1일 때만 안전하다. |
allow_ext_sg가 0이면 모든 descriptor가 SRP_CMD 안에 들어가야 하고, 1이면 남은 descriptor를 별도 RDMA로 전달할 수 있다.
Completion CPU 배치와 queue limit
58-73| Parameter | 범위·기본값 | 의미 |
|---|---|---|
| comp_vector | 0..n-1 | 첫 번째 RDMA channel이 사용할 MSI-X completion vector다. HCA port 하나에 여러 MSI-X vector를 할당한 HCA에서 각 interrupt affinity를 서로 다른 CPU로 설정했다면 SRP completion 부하를 여러 CPU에 분산할 수 있다. |
| tl_retry_count | 2..7 | InfiniBand Reliable Connection(RC)의 retry count다. |
| queue_size | 기본 62, 최소 2 | Initiator가 SCSI host 하나당 queue에 넣을 수 있는 command의 최대 개수다. |
| max_it_iu_size | decimal | Initiator에서 target으로 보내는 information unit의 최대 길이다. |
SRP class instance의 HCA와 port
74-84두 ABI는 2006년 1월 2일 kernel 2.6.15에 도입됐고 linux-rdma@vger.kernel.org가 담당한다.
| 경로 | 설명 |
|---|---|
| /sys/class/infiniband_srp/srp-<hca>-<port_number>/ibdev | HCA 이름, 즉 경로의 <hca> 값을 표시한다. |
| /sys/class/infiniband_srp/srp-<hca>-<port_number>/port | HCA port 번호, 즉 경로의 <port_number> 값을 표시한다. |
SCSI host의 command와 RDMA channel 설정
86-113| 경로 suffix | 도입 | 설명 |
|---|---|---|
| allow_ext_sg | 2011-05-19 · 2.6.39 | SRP target과 통신할 때 ib_srp가 SRP_CMD에 partial memory-descriptor list를 넣도록 허용하는지 나타낸다. |
| ch_count | 2015-04-01 · 3.19 | SRP target과 통신하는 데 사용하는 RDMA channel의 수다. |
| cmd_sg_entries | 2011-05-19 · 2.6.39 | SRP_CMD request 하나로 target에 보낼 수 있는 data-buffer descriptor의 최대 개수다. |
| comp_vector | 2013-09-02 · 3.11 | 첫 번째 RDMA channel이 사용하는 completion vector다. |
Remote target identifier와 redirect 전후 GID
114-134| 경로 suffix | 도입 | 설명 |
|---|---|---|
| dgid | 2006-06-17 · 2.6.17 | SRP target과 통신할 때 실제로 사용하는 InfiniBand destination GID다. Port redirection이 일어났다면 orig_dgid와 다르다. |
| id_ext | 2006-06-17 · 2.6.17 | 16-byte target port identifier 중 8-byte identifier-extension 부분이다. |
| ioc_guid | 2006-06-17 · 2.6.17 | 16-byte target port identifier 중 8-byte I/O-controller GUID 부분이다. |
Local HCA, original destination과 partition
135-161| 경로 suffix | 도입 | 설명 |
|---|---|---|
| local_ib_device | 2006-11-29 · 2.6.19 | SRP target과 통신할 때 사용하는 local InfiniBand HCA 이름이다. |
| local_ib_port | 2006-11-29 · 2.6.19 | SRP target과 통신할 때 사용하는 HCA port 번호다. |
| orig_dgid | 2006-06-17 · 2.6.17 | add_target sysfs attribute에 기록한 parameter의 원래 InfiniBand destination GID다. |
| pkey | 2006-06-17 · 2.6.17 | SRP target과 통신할 때 사용하는 InfiniBand partition key를 나타내는 16-bit 값이다. |
Service, source GID와 SRP request credit
163-192| 경로 suffix | 도입 | 설명 |
|---|---|---|
| req_lim | 2010-10-20 · 2.6.36 | ib_srp가 더 많은 credit을 기다리기 전에 target으로 보낼 수 있는 request의 수다. 자세한 내용은 SRP specification의 SRP credit algorithm을 참조한다. |
| service_id | 2006-06-17 · 2.6.17 | SRP target과 통신을 설정할 때 사용하는 InfiniBand service ID다. |
| sgid | 2014-02-01 · 3.13 | SRP target과 통신할 때 사용하는 source port의 InfiniBand GID다. |
| zero_req_lim | 2006-09-20 · 2.6.18 | Credit이 고갈되어 initiator가 target에 request를 보내기 전에 기다려야 했던 횟수다. 자세한 내용은 SRP specification의 SRP credit algorithm을 참조한다. |
req_lim은 현재 보낼 수 있는 양을 제한하고 zero_req_lim은 credit 고갈이 실제 대기를 일으킨 횟수를 누적한다.
SRP target login
sysfs-driver-ib_srp:1-73add_target에 comma-separated parameter를 기록해 target port ID, destination path, SCSI limit, S/G 전송과 completion vector를 구성합니다.