Skip to contentSkip to conversation

: Add support for EVPD 0x83 Relative target port identifer and SCSI Name string

PATCH New Nicholas A. Bellinger 1 participant 1 message Feb 2, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 : Add support for EVPD 0x83 Relative target port identifer and SCSI Name string

Quoted 1 line

From 436a7d09dc1eeb907c3f4274d72e117679ee94ac Mon Sep 17 00:00:00 2001

From: Nicholas Bellinger <[email protected]>
Date: Sun, 1 Feb 2009 21:41:20 -0800
Subject: [PATCH 3/4] [Target_Core_Mod]: Add support for EVPD 0x83 Relative target port identifer and SCSI Name string

This patch adds support for Relative target port identifer and SCSI name string identifer generically in Target_Core_Mod v3.0. It adds

struct target_core_fabric_ops->get_fabric_proto_ident()

to extract the SPC-4 defined PROTOCOL IDENTIFER from $FABRIC_MOD. For more information see spc4r17 section 7.7.3.x.

Here is what it looks like in action using sg3_util's sg_inq program:

initiator:# sg_inq -e --page=0x83 -v /dev/sdh
VPD INQUIRY: Device Identification page

    inquiry cdb: 12 01 83 00 fc 00

Designation descriptor number 1, descriptor length: 58
id_type: T10 vendor identification, code_set: ASCII associated with the addressed logical unit
vendor id: LIO-ORG
vendor specific: IBLOCK:eEaqKo-gYF8-vnDA-jJhf-Xqzy-pjGF-G6Y50v
Designation descriptor number 2, descriptor length: 8
transport: Internet SCSI (iSCSI)
id_type: Relative target port, code_set: Binary associated with the target port
Relative target port: 0x1
Designation descriptor number 3, descriptor length: 72
transport: Internet SCSI (iSCSI)
id_type: SCSI name string, code_set: UTF-8
associated with the target port
SCSI name string:
iqn.2003-01.org.linux-iscsi.target.i686:sn.cff3eedbd2fd,t,0x0001

This patch also converts transport_generic_emulate_inquiry() for explict checks of overflow of DATAIN payload for each EVPD 0x83 attached identifier. In the overflow case, we return REQUEST + INVALID FIELD IN CDB following spc4r17 Section 4.3.5.6.

---
 drivers/lio-core/target_core_fabric_ops.h |    1 +
 drivers/lio-core/target_core_transport.c  |  180 +++++++++++++++++++++++++----
 2 files changed, 160 insertions(+), 21 deletions(-)
drivers/lio-core/target_core_fabric_ops.h +1 -0
index a54aa94..5924cbd 100644
@@ -1,5 +1,6 @@
 struct target_core_fabric_ops {
 	char *(*get_fabric_name)(void);
+	u8 (*get_fabric_proto_ident)(void);
 	char *(*tpg_get_wwn)(struct se_portal_group_s *);
 	u16 (*tpg_get_tag)(struct se_portal_group_s *);
 	u32 (*tpg_get_default_depth)(struct se_portal_group_s *);
drivers/lio-core/target_core_transport.c +159 -21

228 lines not on this page · raw message

Signature · 1 line
1.5.4.1