sol_uverbs_hca.h revision c39526b769298791ff5b0b6c5e761f49aabaeb4e
/*
* 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
*/
/*
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
*
* NAME: sol_uverbs_hca.h
*
* DESC: Solaris OFED hca management utility.
*
* This file implements a very thin layer that provides the OFA user kernel
* of the OFA user space kernel agents share the same IBT client handle,
* opened by the sol_uverbs driver.
*
*/
/*
* Definitions
*/
/*
* Structures
*/
/*
* HCA Info.
*
* Each IBT HCA the sol_uverbs driver knows about is maintained in a
* a list that points to IBT handles and the client event handler
* callbacks.
*/
typedef struct sol_uverbs_hca {
/*
* Client structure passed to Solaris User Verbs to provide addtion and
* removal callbacks. The "add" function will be invoked for each
* IBT hca in the system when it is available, the "remove" will be
* invoked when an IBT hca is no longer available.
*/
typedef struct sol_uverbs_ib_client {
char *name;
void (*add)(sol_uverbs_hca_t *);
void (*remove)(sol_uverbs_hca_t *);
/*
* Event handler structure passed to Solaris User Verbs hca management
* to register an asynchronous event handler for an IBT hca.
*/
typedef struct sol_uverbs_ib_event_handler {
void (*handler)(struct sol_uverbs_ib_event_handler *,
do { \
} while (0)
/*
* Control structures for managmenet of common HCA list.
*/
extern kmutex_t sol_uverbs_hca_lock;
extern llist_head_t sol_uverbs_hca_list;
extern llist_head_t sol_uverbs_client_list;
/*
* Functions
*/
/*
* sol_uverbs HCA list management and helper sol_uverbs nternal functions.
*/
int sol_uverbs_common_hca_init();
void sol_uverbs_common_hca_fini();
/*
* COMMON HCA CLIENT API - See sol_uverbs_hca.c for complete
* function description.
*/
/*
* Register for client notifications. The "add" function pointer
* in the client structure will be invoked for each hca in the system, the
* "remove" function pointer will be invoked as hca's are no longer
* available.
*/
/*
* Unregister for client notifications.
*/
/*
* Mechanism for client to associate private data with each IBT hca.
*/
/*
* Mechanism for client to register/unregister for asynchronous event callbacks.
*/
int
int
/*
* HELPER API provided by sol_uverbs, see sol_uverbs_qp.c for complete
* descriptions.
*/
/*
* Map a user QP id to an IBT QP Handle.
*/
/*
* Inform sol_uverbs to igonore requested modify QP calls for the
* specific QP.
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS_HCA_H */