/*
* 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
*/
/*
*/
/*
* This header file contains definations for utility routines
* which can be used by all Solaris OFUV related kernel drivers
* and misc modules. The kernel modules using these APIs, should
* load sol_ofs using :
*
* The APIs defined are :
* 1. User Objects
* 2. Linked Lists
* 3. Debug Routines
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* User Objects functions and structures.
*/
typedef enum {
/* User objects for sol_uverbs driver */
/* User Objects for sol_ucma driver */
typedef struct {
/*
* Objects are maintained in tables that allow an easy table ID to User Object
* mapping and can grow as resources are created.
*/
typedef struct {
int ofs_uo_blk_avail;
typedef struct {
int uobj_tbl_used_blks;
int uobj_tbl_uo_cnt;
/* User object table management routines */
void sol_ofs_uobj_ref(sol_ofs_uobj_t *);
void sol_ofs_uobj_deref(sol_ofs_uobj_t *,
void (*free_func)(sol_ofs_uobj_t *));
void sol_ofs_uobj_put(sol_ofs_uobj_t *);
sol_ofs_uobj_t *);
/*
* Generic linked list management functions
*/
typedef uchar_t bool;
#define FALSE 0
/*
* Simple doubly linked list for opaque addresses. Protection must occur
* outside of the list. These behavior very much like the linux kernel
* lists, hence the familiar look of the API; but note there are
* some signficant differences, mainly the list header is not embedded
* in the element, so the container (typeof) constructs are not required.
*/
typedef struct llist_head {
void *ptr;
} llist_head_t;
{
}
{
}
{
}
{
}
{
}
{
}
{
}
/*
* Doubly linked per user context IB resource list definitions
* Protection must occur * outside of the list.
*/
typedef struct genlist_entry_s {
void *data_context;
typedef struct genlist_s {
} genlist_t;
void *data_context);
{
}
/*
* Debug printfs defines
*/
/* Misc */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_CLIENTS_OF_SOL_OFS_SOL_OFS_COMMON_H */