The iscsit_dtrace_draftv5.txt describes the Dtrace probes definition for the COMSTAR iSCSI target port provider. For all those interested in iSCSI, please take a look and send me your feedback/questions/suggestions etc by Thursday, April 20, 2009

thanks
Priya
COMSTAR DTrace Probes/Providers for iSCSI Target

Version         0.5, 04-22-09

This document describes the Dtrace probes definition for the iSCSI target port
provider. The iSCSI target port provider provides probes for tracing iSCSI
target activity. It provides all the probes that are provided by the USTD iscsi
provider, so that any DTrace script written for the iscsi provider will work
with the iscsi target port provider as well without any modification.

Probes

---------------------------------------------------------------------------
SCSI Event                      Probes                  Arguments
---------------------------------------------------------------------------
SCSI command                    scsi-command            args[0] conninfo_t
                                                        args[1] iscsiinfo_t
                                                        args[2] iscsicmd_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
---------------------------------------------------------------------------

Login Parameters                login-params            ?? <TBD>

Description: Display the negotiated connection parameters

A user could use this to observe the negotiated login parameters such as
Data Sequence In Order, Data PDU In Order, Default Time To Retain,
Default Time To Wait, Error Recovery Level, First Burst Length,
Immediate Data, Initial Ready To Transfer (R2T), Max Burst Length,
Max Outstanding R2T, Max Receive Data Segment Length, Max Connections,
Header Digest and Data Digest.

If DTrace could provide functions for representing/translating dynamic
structures, then intermediate structures need not be created. 
 
---------------------------------------------------------------------------

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

Description: In iSCSI over RDMA, we don't have the Data-IN/Data-OUT SCSI
commands. Data is moved without invoking these SCSI commands with a direct
memory transfer. So in this case, the xfer-start and xfer-done probes are 
the only way in which the user can observe the data being transfered.

xfer-start and xfer-done are used to measure the dispatch and completion of
RDMA transfers in an iser-assisted configuration. When the transport is 
sockets, then this information is redundant with the data-send and 
data-receive probes.

The following D script can be used to print an aggregate of bytes transferred
between 2 points.

#pragma D option quiet

iscsi:::xfer-start
{
       @[args[2]->xfer_laddr, args[2]->xfer_raddr, args[2]->xfer_type] = 
sum(args[2]->xfer_len);
}

END
{
       printf("%20s %20s %10s %15s\n", "LOCAL IP", "REMOTE IP", "READ/WRITE", 
"BYTES");
       printa("%20s %20s %10d %...@d\n", @);
}

---------------------------------------------------------------------------

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
---------------------------------------------------------------------------

Argument Types

Connection Information: conninfo_t

typedef struct conninfo {                                                       
        string ci_local;        /* local host IP address and port */
                                /* e.g. [fe80::214:4fff:fe0d:cab8/10]:2900 */   
                                /* e.g. 10.30.24.91:2900 */
        string ci_remote;       /* remote host IP address and port */
                                /* e.g. [fe80::214:4fff:fe0d:cab8/10]:2900 */   
                                /* e.g. 10.30.24.91:2900 */
        string ci_protocol;     /* protocol ("ipv4", "ipv6") */
} conninfo_t;

Common iSCSI propertues: iscsiinfo_t

typedef struct iscsiinfo {
        string ii_target;       /* target iqn */
        string ii_initiator;    /* initiator iqn */
        string ii_isid;         /* initiator session identifier */
        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;

SCSI opcode: iscsicmd_t

typedef struct iscsicmd {
        uint64_t ic_len;        /* CDB length */
        uint8_t *ic_cdb;        /* CDB data */
} iscsicmd_t;

Transfer details for a single buffer: xferinfo_t. 

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;     /* RDMA-Read or RDMA-Write */ 
} xferinfo_t;

TBD:
Come up with a proposal to represent session level information to trace
multiple connections per session

Come up with a proposal to represent a variable dynamic list (e.g. nvlist). The
connection parameters such as 'Immediate Data', 'RDMA', 'Data Digest' etc.
are negotiated during login and would be usefule information for the user.



_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to