From ahl@basura.sf.fishpong.com Fri May 22 11:50:48 2009
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n4MIolX5003226
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 22 May 2009 11:50:47 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id n4MIoehU012312;
	Fri, 22 May 2009 19:50:45 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KK20070970K7Q00@nwk-avmta-2.sfbay.sun.com>; Fri,
 22 May 2009 11:50:44 -0700 (PDT)
Received: from zion.sfbay.sun.com ([129.146.17.75])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KK2004GC70J9Q50@nwk-avmta-2.sfbay.sun.com>; Fri,
 22 May 2009 11:50:43 -0700 (PDT)
Received: from basura.sf.fishpong.com (fgw.SFBay.Sun.COM [10.7.251.167])
	by zion.sfbay.sun.com (8.14.2+Sun/8.14.2) with ESMTP id n4MIocGT008437; Fri,
 22 May 2009 18:50:39 +0000 (GMT)
Received: from basura.sf.fishpong.com (localhost [127.0.0.1])
	by basura.sf.fishpong.com (8.14.2+Sun/8.14.2) with ESMTP id n4MIrRm7180767;
 Fri, 22 May 2009 18:53:27 +0000 (GMT)
Received: (from ahl@localhost)	by basura.sf.fishpong.com
 (8.14.2+Sun/8.14.2/Submit) id n4MIrRSr180766; Fri,
 22 May 2009 11:53:27 -0700 (PDT)
Date: Fri, 22 May 2009 11:53:27 -0700
From: Adam Leventhal <ahl@eng.sun.com>
Subject: DTrace COMSTAR iSCSI Target Provider [PSARC/2009/318 FastTrack
	tiomeout 05/22/2009]
To: PSARC-ext@sun.com
Cc: Priya.Krishnan@sun.com, ahl@eng.sun.com
Message-id: <20090522185326.GG179946@eng.sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
User-Agent: Mutt/1.5.17 (2007-11-01)
Status: RO
Content-Length: 9186

I'm submitting the following closed approved automatic PSARC case on behalf
of Priya Krishnan. The proposal has been approved by the DTrace OpenSolaris
Community. The stability is Committed and the binding is Patch.

Adam

---8<---

Template Version: @(#)sac_nextcase 1.64 07/13/07 SMI
This information is Copyright 2009 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
         DTrace COMSTAR iSCSI Target Provider
    1.2. Name of Document Author/Supplier:
         Author:  Priya Krishnan
    1.3  Date of This Document:
        22 May, 2009
4. Technical Description

The following specification describes the COMSTAR iSCSI Target
provider for DTrace. It has been reviewed and approved by the DTrace
community; the PSARC case is closed approved automatic to record the
interface. The stability is Committed and the binding is Patch.

The iscsi provider provides probes for tracing iSCSI target activity. 
This is a kernel provider built into the COMSTAR iSCSI target port provider.

The COMSTAR iSCSI target and the user-land iSCSI target (/usr/sbin/iscsitgtd)
are mutually exclusive. Only one of the targets can be enabled at a time.

e.g. To use the COMSTAR iSCSI target, a user should run the following:
svcadm enable iscsi/target
If the /usr/sbin/iscsitgtd is enabled, then it must be disabled first
using svcadm disable iscsitgt

The COMSTAR iSCSI target DTrace provider provides all the probes that
are provided by the user-land iSCSI provider, so that any DTrace script
written for the USTD iSCSI target provider will work with the COMSTAR
iSCSI target port provider as well without any modification.

iSCSI target Provider

4.1 Probe arguments

4.1.1 Arguments common to all probes

All COMSTAR iSCSI target probes have the first and second argument in common:

        args[0]         conninfo_t *            connection information

The conninfo_t structure is used by NFSv4 provider, Fibre Channel provider
and is intended for use by all application protocol providers as the first
argument to indicate some basic information about the connection.

        typedef struct conninfo {
                string ci_local;        /* local host IP address */
                string ci_remote;       /* remote host IP address */
                string ci_protocol;     /* protocol ("ipv4", "ipv6" */
        } conninfo_t;


        args[1]         iscsiinfo_t *        common iSCSI properties

The iscsiinfo_t structure is used to provide identifying information about
the target and the initiator and also some PDU level information such as
lun, data length and sequence numbers.

       typedef struct iscsiinfo {
	string ii_target;	/* target iqn */
	string ii_initiator;	/* initiator iqn */
        string ii_isid;		/* initiator session identifier */
	string ii_tsih;		/* target session identifying handle */
	string ii_transport;	/* transport type ("iser-ib", "sockets") */

	uint64_t ii_lun;	/* target logical unit number */

	uint32_t ii_itt;	/* initiator task tag */
	uint32_t ii_ttt;	/* target transfer tag */

	uint32_t ii_cmdsn;	/* command sequence number */
	uint32_t ii_statsn;	/* status sequence number */
	uint32_t ii_datasn;	/* data sequence number */

	uint32_t ii_datalen;	/* length of data payload */
	uint32_t ii_flags;	/* probe-specific flags */
} iscsiinfo_t;


The third argument is only used for the SCSI command probe or the data
transfer probe

        args[2]         scsicmd_t *             SCSI command block (cdb)
        
The scsicmd_t structure is used by the SCSI command probe and itcontains
information about the SCSI command blocks and is intended for use by all
the application protocols that deal with SCSI data.

        typedef struct scsicmd {
        uint64_t ic_len;        /* CDB length */
        uint8_t *ic_cdb;        /* CDB data */
} scsicmd_t;

Although the transport layer is transparent to the user, the COMSTAR iSCSI
target also supports iSCSI over Remote DMA (RDMA), also known as iSER. Since
the data transfer phases are mapped to Remote DMA (RDMA) operations in iSER,
the data-send, data-receive and data-request probes cannot be used with iSER.
Instead the xfer-start and xfer-done probes can be used to trace the data
transfer irrespective of the transport used. The data-receive, data-request
and data-send probes can be used when a user wants to track the SCSI Data-IN
and Data-OUT PDUs specifically.

        args[2]         xferinfo_t *         data transfer information

The xferinfo_t structure is used by the xfer-start and the xfer-done probes
and contain information about the data transfer. When the transport type is
iSER, the remote buffer information is given by the xfer_raddr, xfer_rkey
and xfer_roffset fields. It is set to 0 when the transport type is sockets.

        typedef struct xferinfo {
	uintptr_t xfer_laddr;	/* local buffer address */
	uint32_t xfer_loffset;	/* offset within the local buffer */
	uint32_t xfer_lkey;	/* access control to local memory */
	uintptr_t xfer_raddr;	/* remote virtual address */
	uint32_t xfer_roffset;	/* offset from the remote address */
	uint32_t xfer_rkey;	/* access control to remote virtual address */
	uint32_t xfer_len;	/* transfer length */
	uint32_t xfer_type;	/* Read or Write */
} xferinfo_t;

4.2 Probes summary
---------------------------------------------------------------------------
SCSI Event			Probes			Arguments
---------------------------------------------------------------------------
SCSI command			scsi-command		args[0] conninfo_t
							args[1] iscsiinfo_t
							args[2] scsicmd_t
---------------------------------------------------------------------------

SCSI response			scsi-response		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Data out			data-send		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Data in				data-receive		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Data request(rtt)		data-request		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Login command			login-command		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Login response			login-response		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Logout command			logout-command		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Logout response			logout-response		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Buffer dispatch			xfer-start		args[0] conninfo_t
							args[1] iscsiinfo_t
							args[2] xferinfo_t
---------------------------------------------------------------------------

Buffer Completion		xfer-done		args[0] conninfo_t
							args[1] iscsiinfo_t
							args[2] xferinfo_t
---------------------------------------------------------------------------

NOP in				nop-receive		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

NOP out				nop-send		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Task command			task-command		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Task response			task-response		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Text command			text-command		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Text response			text-response		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------

Asynchronous message from target async-send		args[0] conninfo_t
							args[1] iscsiinfo_t
---------------------------------------------------------------------------


Documentation and examples can be found here:

  http://wikis.sun.com/display/DTrace/iscsi+Provider

The table below describes the DTrace stability levels

                 |  Name            Data            Class                       
    -------------+-------------------------------------------                   
    Provider     |  Evolving        Evolving        ISA                         
    Module       |  Private         Private         Unknown                     
    Function     |  Private         Private         Unknown                     
    Name         |  Private 	    Private         ISA                         
    Arguments    |  Evolving        Evolving        ISA


6. Resources and Schedule
    6.4. Steering Committee requested information
        6.4.1. Consolidation C-team Name:
                OS/Net
    6.5. ARC review type: FastTrack
    6.6. ARC Exposure: open


From carlsonj@phorcys.east.sun.com Fri May 22 11:59:21 2009
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n4MIxKc0003853
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 22 May 2009 11:59:20 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id n4MIw7Ik028035
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@Sun.COM>; Sat, 23 May 2009 02:59:19 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KK2009037EEWY00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@Sun.COM
 (ORCPT PSARC-ext@Sun.COM); Fri, 22 May 2009 11:59:02 -0700 (PDT)
Received: from dm-east-01.east.sun.com ([129.148.9.192])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KK2004127EDWMC0@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@Sun.COM (ORCPT PSARC-ext@Sun.COM); Fri,
 22 May 2009 11:59:01 -0700 (PDT)
Received: from phorcys.east.sun.com (phorcys.East.Sun.COM [129.148.174.143])
	by dm-east-01.east.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2)
 with ESMTP id n4MIx0tJ001181; Fri, 22 May 2009 14:59:00 -0400 (EDT)
Received: from phorcys.east.sun.com (phorcys.local [127.0.0.1])
	by phorcys.east.sun.com (8.14.3+Sun/8.14.3) with ESMTP id n4MIw0Ow010745; Fri,
 22 May 2009 14:58:00 -0400 (EDT)
Received: (from carlsonj@localhost)
	by phorcys.east.sun.com (8.14.3+Sun/8.14.3/Submit) id n4MIw0lS010742; Fri,
 22 May 2009 14:58:00 -0400 (EDT)
Date: Fri, 22 May 2009 14:58:00 -0400
From: James Carlson <james.d.carlson@sun.com>
Subject: Re: DTrace COMSTAR iSCSI Target Provider [PSARC/2009/318 FastTrack
	tiomeout 05/22/2009]
In-reply-to: <20090522185326.GG179946@eng.sun.com>
To: Adam Leventhal <ahl@eng.sun.com>
Cc: PSARC-ext@sun.com, Priya.Krishnan@sun.com
Message-id: <18966.62904.378639.523283@gargle.gargle.HOWL>
MIME-version: 1.0
X-Mailer: VM 7.01 under Emacs 21.3.1
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <20090522185326.GG179946@eng.sun.com>
Status: RO
Content-Length: 547

Adam Leventhal writes:
> The following specification describes the COMSTAR iSCSI Target
> provider for DTrace. It has been reviewed and approved by the DTrace
> community; the PSARC case is closed approved automatic to record the
> interface. The stability is Committed and the binding is Patch.

Seems obvious enough, +1.

-- 
James Carlson, Solaris Networking              <james.d.carlson@sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

