/*
* 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_IB_H
#define _ISER_IB_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/iscsi_protocol.h>
/*
* Definitions and macros related to iSER InfiniBand transport,
* and the use of the Solaris IBTI (InfiniBand Transport Interface).
*/
struct iser_state_s;
extern struct iser_state_s *iser_state;
extern ddi_taskq_t *iser_taskq;
/*
* iser_hca_s holds all the information about the Infinband HCAs in use.
*/
typedef struct iser_hca_s {
/* Per PD (per HCA) message and data buffer caches */
} iser_hca_t;
/* RQ low water mark percentage */
/* Maximum number of WRs to post on the RQ at a time */
/* Maximum number of SCQ WCs to poll at a time */
/*
* iser_qp_t encodes data related to a Queue Pair (QP) in use by
* iSER. Each QP consists of two Work Queues (WQs), one Send Queue
* (SQ) and on Receive Queue (RQ). Most of the data in the QP
* handle relates to monitoring the posted depth of the RQ.
*
* Note that we are explicitly using slightly less than a power-of-2
* number for our queue sizes. The HCA driver will round up for us,
* and this affords us some headroom.
*/
#ifdef _LP64
#else
/* Memory is very limited on 32-bit kernels */
#endif
typedef struct iser_qp_s {
} iser_qp_t;
/*
* iSER RC channel information
*/
typedef struct iser_chan_s {
/* IBT channel handle */
/* local and remote IP addresses and port numbers */
/*
* The local HCA GUID, the service ID, Destination GID, Source GID
* the primary hca port on which the channel is connected is
* stored in ic_ibt_path
*/
/*
* Information related to the HCA handle and the queues.
*/
/* Used to track the number of WRs posted on the SQ */
/*
* To help identify the channel end point and some connection
* specifics, maintain a pointer to the connection on which
* this channel originated
*/
} iser_chan_t;
int iser_ib_init(void);
int iser_ib_fini(void);
int iser_ib_get_paths(
#ifdef __cplusplus
}
#endif
#endif /* _ISER_IB_H */