/*
* 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 _SYS_IB_ADAPTERS_HERMON_WR_H
#define _SYS_IB_ADAPTERS_HERMON_WR_H
/*
* Contains all of the prototypes, #defines, and structures necessary
* for the Hermon Work Request Processing Routines
* Specifically it contains #defines, macros, and prototypes for each of
* building each of the various types of WQE and for managing the WRID
* tracking mechanisms.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* WQEADDRSZ is a bit of a misnomer, it's really a token for the
* WRID processing. We simply use the wqe_counter.
*/
/* And put the get from the CQ here as well */
/*
* The following macro sets the owner bit in the Control Segment of the
* WQE, based on the wqe_counter value passed in
*/
opcode);
/*
* The following macros are used to calculate pointers to the Send or Receive
* (or SRQ) WQEs on a given QP, respectively
*/
/*
* The following macro is used to calculate the 'wqe_index' field during SRQ
* operation. This returns the index based on the WQE size, that can be used
* to reference WQEs in an SRQ.
*/
/*
* The following macro is used to calculate the 'wqe_addr' during SRQ
* operation. This returns the addr based on the WQE size and index,
* that can be used to reference WQEs in an SRQ.
*/
/*
* The following macros are used to access specific fields in Directed Route
* MAD packets. We can extract the MgmtClass, "hop pointer", and "hop count".
* We can also update the "hop pointer" as appropriate. Note: Again, because
* of the limited amount of direct handling the Hermon hardware does on special
* QP request (specifically on Directed Route MADs), the driver needs to
* update (as necessary) the "hop pointer" value depending on whether a MAD
* is outbound or inbound (i.e. depending on the relationship between "hop
* pointer" and "hop count" in the given MAD)
*/
}
}
}
if ((mgmtclass) == 0x81) { \
} \
}
/*
* The hermon_workq_hdr_s structure is used internally by the Hermon driver
* to track the information necessary to manage the work queues (send, recv,
* or shared recv). The hermon_workq_avl_s is used for each association of
* a work queue with a given completion queue, where SRQs can be associated
* with multiple queue pairs and their associated completion queues.
*/
struct hermon_workq_hdr_s {
};
struct hermon_workq_avl_s {
/* For SRQ, this is needed to add the wqe to the free list */
};
typedef struct hermon_workq_compare_s {
/* For Work Request posting */
/* For WRID handling */
/* debug routine */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_ADAPTERS_HERMON_WR_H */