iser_xfer.h revision 30e7468f8f41aa30ada067b2c1d5d284046514da
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ISER_XFER_H
#define _ISER_XFER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/iscsi_protocol.h>
/*
* Definitions and functions related to data transfer across the RC channel
* This includes the posting of the Hello Message, the HelloReply Message, the
* RC Send Message for the iSCSI Control PDU.
*/
/*
* iser_private_data_s contains parameters relating to the iSER connection and
* IB options support status. This data conforms to the 'iSER CM REQ Message
* Private Data Format' from the Annex A12 - Support for iSCSI Extensions for
* RDMA.
*/
#pragma pack(1)
typedef struct iser_private_data_s {
#if defined(_BIT_FIELDS_LTOH)
sie :1,
zbvae :1;
#elif defined(_BIT_FIELDS_HTOL)
sie :1,
rsvd1 :30;
#else
#endif /* _BIT_FIELDS_LTOH */
/* iSER Message Opcodes */
#define ISER_OPCODE_CTRL_TYPE_PDU 1
#define ISER_OPCODE_HELLO_MSG 2
#define ISER_OPCODE_HELLOREPLY_MSG 3
/*
* When ZBVA is not supported, both the initiator and the target shall use the
* expanded iSER header as defined in the IB Spec Table 540 for iSCSI control-
* type PDUs in the connection
*/
typedef struct iser_ctrl_hdr_s {
#if defined(_BIT_FIELDS_LTOH)
#elif defined(_BIT_FIELDS_HTOL)
wsv_flag: 1,
rsv_flag: 1,
rsvd1: 2;
#else
#endif /* _BIT_FIELDS_LTOH */
/* iSER Header Format for the iSER Hello Message */
typedef struct iser_hello_hdr_s {
#if defined(_BIT_FIELDS_LTOH)
opcode : 4;
maxver : 4;
#elif defined(_BIT_FIELDS_HTOL)
rsvd1 : 4;
minver : 4;
#else
#endif /* _BIT_FIELDS_LTOH */
/* iSER Header Format for the iSER HelloReply Message */
typedef struct iser_helloreply_hdr_s {
#if defined(_BIT_FIELDS_LTOH)
rsvd1 : 3,
opcode : 4;
maxver : 4;
#elif defined(_BIT_FIELDS_HTOL)
rsvd1 : 3,
flag : 1;
curver : 4;
#else
#endif /* _BIT_FIELDS_LTOH */
#pragma pack()
struct iser_state_s;
#ifdef __cplusplus
}
#endif
#endif /* _ISER_XFER_H */