COMSTAR iSCSI Argument Types

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

  • args[0] conninfo_t * connection information

  • conninfo_t

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;
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.
  • args[1] iscsiinfo_t * common iSCSI properties

  • iscsiinfo_t

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

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

  • args[2] scsicmd_t * SCSI command block (cdb)

  • scsicmd_t

typedef struct scsicmd {
        uint64_t ic_len;        /* CDB length */
        uint8_t *ic_cdb;        /* CDB data */
} scsicmd_t;
The scsicmd_t structure is used by the SCSI command probe 
and it contains information about the SCSI command
blocks and is intended for use by all the application 
protocols that deal with SCSI data.

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

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