ibd.h revision da14cebe459d3275048785f25bd869cb09b5307f
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_IB_CLIENTS_IBD_H
#define _SYS_IB_CLIENTS_IBD_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* IETF defined IPoIB encapsulation header, with 2b of ethertype
* followed by 2 reserved bytes. This is at the start of the
* datagram sent to and received over the wire by the driver.
*/
typedef struct ipoib_header {
} ipoib_hdr_t;
#define IPOIB_HDRSIZE sizeof (struct ipoib_header)
/*
* IETF defined IPoIB link address; IBA QPN, followed by GID,
* which has a prefix and suffix, as reported via ARP.
*/
typedef struct ipoib_mac {
} ipoib_mac_t;
#define IPOIB_ADDRL sizeof (struct ipoib_mac)
/*
* Pseudo header prepended to datagram in DLIOCRAW transmit path
* and when GLD hands the datagram to the gldm_send entry point.
*/
typedef struct ipoib_ptxhdr {
/*
* The pseudo-GRH structure that sits before the data in the
* receive buffer, and is overlaid on top of the real GRH.
* The driver sets the ipoib_vertcflow to 0 if the pseudo-GRH
* does not hold valid information. If it is indicated valid,
* the driver must additionally provide the sender's qpn in
* network byte order in ipoib_sqpn, and not touch the
* remaining parts which were DMA'ed in by the IBA hardware.
*/
typedef struct ipoib_pgrh {
} ipoib_pgrh_t;
/*
* The GRH is also dma'ed into recv buffers, thus space needs
* to be allocated for them.
*/
#define IPOIB_GRH_SIZE sizeof (ipoib_pgrh_t)
#include <sys/mac_provider.h>
#define IBD_IDNUM 0 /* ibd module ID; zero works */
#define IBD_MAX_SQSEG 3
#define IBD_MAX_RQSEG 1
typedef struct ibd_copybuf_s {
typedef struct ibd_mblkbuf_s {
/*
* Structure to encapsulate various types of async requests.
*/
typedef struct ibd_acache_rq {
int rq_op; /* what operation */
void *rq_ptr;
} ibd_req_t;
typedef struct ibd_mcache {
} ibd_mce_t;
typedef struct ibd_acache_s {
} ibd_ace_t;
typedef struct ibd_wqe_s {
} ibd_wqe_t;
typedef struct ibd_swqe_s {
} ibd_swqe_t;
typedef struct ibd_rwqe_s {
struct ibd_state_s *w_state;
} ibd_rwqe_t;
typedef struct ibd_list_s {
union {
} ustat;
} ibd_list_t;
/*
* This structure maintains information per port per HCA
* (per network interface).
*/
typedef struct ibd_state_s {
void *id_fifos;
int id_nfifos;
int id_mtu;
struct list id_req_list;
struct list id_ah_free;
struct list id_ah_active;
char id_ah_op;
struct list id_mc_full;
char id_prom_op;
} ibd_state_t;
#endif /* _KERNEL && !_BOOT */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_CLIENTS_IBD_H */