ibti_common.h revision 43ed929a6988c3778f00123f4a4a8541e515ec16
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER START
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The contents of this file are subject to the terms of the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Common Development and Distribution License, Version 1.0 only
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * (the "License"). You may not use this file except in compliance
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * with the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * See the License for the specific language governing permissions
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * and limitations under the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * When distributing Covered Code, include this CDDL HEADER in each
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * If applicable, add the following below this CDDL HEADER, with the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * fields enclosed by brackets "[]" replaced with your own identifying
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * information: Portions Copyright [yyyy] [name of copyright owner]
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER END
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
2eeaed14a5e2ed9bd811643ad5bffc3510ca0310robj * Use is subject to license terms.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#pragma ident "%Z%%M% %I% %E% SMI"
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * This file contains the shared/common transport data types and function
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * prototypes.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindiextern "C" {
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Endian Macros
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * h2b - host endian to big endian protocol
940d71d237794874e18a0eb72f6564821a823517eschrock * b2h - big endian protocol to host endian
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * h2l - host endian to little endian protocol
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * l2h - little endian protocol to host endian
c40d7343efa60b18ad1ceb316eb337caeea79046cindi#define h2l16(x) (x)
c40d7343efa60b18ad1ceb316eb337caeea79046cindi#define h2l32(x) (x)
c40d7343efa60b18ad1ceb316eb337caeea79046cindi#define h2l64(x) (x)
c40d7343efa60b18ad1ceb316eb337caeea79046cindi#define l2h16(x) (x)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#define l2h32(x) (x)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#define l2h64(x) (x)
c40d7343efa60b18ad1ceb316eb337caeea79046cindi#define h2b16(x) (x)
c40d7343efa60b18ad1ceb316eb337caeea79046cindi#define h2b32(x) (x)
c40d7343efa60b18ad1ceb316eb337caeea79046cindi#define h2b64(x) (x)
c40d7343efa60b18ad1ceb316eb337caeea79046cindi#define b2h16(x) (x)
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj#define b2h32(x) (x)
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj#define b2h64(x) (x)
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Max number of paths that can be requested in an ibt_get_paths() call,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * if IBT_PATH_PERF or IBT_PATH_AVAIL flag (ibt_path_flags_t) is set.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * The name of DDI Event, generated when the properties of IOC device
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * node properties were modified.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi/* Transport Interface version */
c40d7343efa60b18ad1ceb316eb337caeea79046cinditypedef enum ibt_version_e {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Driver class type. Identifies a type of client driver so that
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * "IBTF Policy" decisions can be made on a driver class basis.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * The last class should always be IBT_CLNT_NUM, and any new classes added
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * must be defined before IBT_CLNT_NUM. The class values must be above 0.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Any class values below or equal to 0 shall be invalid
908f1e1388f616898b4e515d343c0414f2a6472esd IBT_NETWORK_DEV, /* Network driver with associated client H/W */
14ea4bb737263733ad80a36b4f73f681c30a6b45sd /* client H/W, e.g., IPoIB */
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi /* associated with client H/W */
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi IBT_USER, /* A user application IBT interface driver */
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi#define IBT_TEST_DEV 999 /* Place holder for modules that test IBTL */
908f1e1388f616898b4e515d343c0414f2a6472esd#define IBT_CLNT_DEVICE_CLASS(class) ((class) == IBT_STORAGE_DEV || \
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi#define IBT_CLNT_GENERAL_CLASS(class) ((class) == IBT_NETWORK || \
908f1e1388f616898b4e515d343c0414f2a6472esd#define IBT_CLNT_MGMT_CLASS(class) ((class) == IBT_IBMA || \
14ea4bb737263733ad80a36b4f73f681c30a6b45sd * Event record & status returns for asynchronous events and errors.
0eb822a1c0c2bea495647510b75f77f0e57633ebcinditypedef struct ibt_async_event_s {
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * IBT Client Callback function typedefs.
908f1e1388f616898b4e515d343c0414f2a6472esd * ibt_async_handler_t
940d71d237794874e18a0eb72f6564821a823517eschrock * Pointer to an async event/error handler function. This function is
14ea4bb737263733ad80a36b4f73f681c30a6b45sd * called when an async event/error is detected on a HCA that is being
14ea4bb737263733ad80a36b4f73f681c30a6b45sd * used by the IBT client driver that registered the function.
0eb822a1c0c2bea495647510b75f77f0e57633ebcinditypedef void (*ibt_async_handler_t)(void *clnt_private,
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi ibt_hca_hdl_t hca_hdl, ibt_async_code_t code, ibt_async_event_t *event);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * IBT Client Memory Error Callback function typedefs.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_memory_handler_t
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Pointer to an memory event/error handler function.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef void (*ibt_memory_handler_t)(void *clnt_private,
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi ibt_hca_hdl_t hca_hdl, ibt_mem_code_t code, ibt_mem_data_t *data);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Define a client module information structure. All clients MUST
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * define a global of type ibt_clnt_modinfo_t. A pointer to this global
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * is passed into the IBTF by a client when calling ibt_attach().
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * This struct must persist during the life of the client.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * The client's mi_async_handler is called when an async event/error is
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * detected on a HCA that is being used by this client.
0eb822a1c0c2bea495647510b75f77f0e57633ebcinditypedef struct ibt_clnt_modinfo_s {
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi ibt_async_handler_t mi_async_handler; /* Async Handler */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_memory_handler_t mi_reserved; /* Memory handler */
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Definitions for use with ibt_register_subnet_notices()
0eb822a1c0c2bea495647510b75f77f0e57633ebcinditypedef struct ibt_subnet_event_s {
0eb822a1c0c2bea495647510b75f77f0e57633ebcinditypedef void (*ibt_sm_notice_handler_t)(void *private, ib_gid_t gid,
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi ibt_subnet_event_code_t code, ibt_subnet_event_t *event);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * MTU Request type.
0eb822a1c0c2bea495647510b75f77f0e57633ebcinditypedef struct ibt_mtu_req_s {
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Qflags, used by ibt_resize_queues().
0eb822a1c0c2bea495647510b75f77f0e57633ebcinditypedef enum ibt_qflags_e {
2eeaed14a5e2ed9bd811643ad5bffc3510ca0310robj * CQ priorities
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * The IBTF will attempt to implement a coarse 3 level priority scheme
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * (IBT_CQ_LOW, IBT_CQ_MEDIUM, IBT_CQ_HIGH) based on the class of client
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * driver. The requested priority is not guaranteed. If a CI implementation
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * has the ability to implement priority CQs, then the IBTF will take advantage
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * of that when calling the CI to create a CQ by passing a priority indicator
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * to the CI.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Attributes when creating a Completion Queue Scheduling Handle.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_cq_sched_attr_s {
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_cq_handler_t
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Pointer to a work request completion handler function. This function
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * is called when a WR completes on a CQ that is being used by the IBTF
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * client driver that registered the function.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef void (*ibt_cq_handler_t)(ibt_cq_hdl_t ibt_cq, void *arg);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Service Data and flags.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * (IBTA Spec Release 1.1, Vol-1 Ref: 15.2.5.14.4)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The ServiceData8.1 (sb_data8[0]) through ServiceData64.2 (sb_data64[1])
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * components together constitutes a 64-byte area in which any data may be
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * placed. It is intended to be a convenient way for a service to provide its
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * clients with some initial data.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * In addition, this 64-byte area is formally divided into a total of 30
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * components, 16 8-bit (uint8_t) components, then 8 16-bit (uint16_t)
9dd0f810214fdc8e1af881a9a5c4b6927629ff9ecindi * components, then 6 32-bit (uint32_t) components, then 2 64-bit (uint64_t)
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * components, thereby assigning ComponentMask bits (ibt_srv_data_flags_t) to
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * variously-sized segments of the data. All data are in host endian format.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * This allows query operations (ibt_get_paths()) to be used which match
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * parts of the Service Data, making it possible, for example, for
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * service-specific parts of the ServiceData to serve as a binary-coded
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * extension to the ServiceName for purposes of lookup.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_srv_data_s {
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi uint16_t s_data16[8]; /* 16-bit service data fields. */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi uint32_t s_data32[4]; /* 32-bit service data fields. */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi uint64_t s_data64[2]; /* 64-bit service data fields. */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Path flags, used in ibt_get_paths()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi IBT_PATH_MULTI_SVC_DEST = 1 << 4, /* Multiple ServiceRecords */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Path attributes.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * The ibt_path_attr_t structure is used to specify required attributes in a
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * path from the requesting (source) node to a specified destination node.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Attributes that are don't care should be set to NULL or '0'.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * A destination must be specified, where a destination can be defined as
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * one of the following:
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * o Service Name
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * o Service ID (SID)
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * o Array of DGIDs.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * o Service Name and Array of DGIDs.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjtypedef struct ibt_path_attr_s {
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj /* NULL Terminated */
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj ibt_srv_data_flags_t pa_sd_flags; /* Service Data flags. */
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj ibt_pkt_lt_req_t pa_pkt_lt; /* Packet Life Time Request */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Path Information.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * The ibt_get_paths() performs SA Path record lookups to select a path(s) to
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * a given destination(s), details of selected path(s) are returned in this
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * structure.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * The ibt_path_info_t contains all the attributes of the best path(s), as
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * as determined by IBTL, to the specified destination(s), including the
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * local HCA and HCA port to use to access the fabric.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * The Service ID (pi_sid) and Service Data (pi_sdata) are returned only for
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * lookups based on Service ID or/and Service Name.
c40d7343efa60b18ad1ceb316eb337caeea79046cinditypedef struct ibt_path_info_s {
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ib_guid_t pi_hca_guid; /* Local HCA GUID; 0 implies */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi /* this record is invalid */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_cep_path_t pi_prim_cep_path; /* Contains CEP adds info */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_cep_path_t pi_alt_cep_path; /* RC & UC Only, valid if */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi /* cep_hca_port_num is not */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Optional Alternate Path attributes.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The ibt_alt_path_attr_t structure is used to specify additional optional
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * attributes when requesting an alternate path for an existing channel.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Attributes that are don't care should be set to NULL or '0'.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjtypedef struct ibt_alt_path_attr_s {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_pkt_lt_req_t apa_pkt_lt; /* Packet Life Time Request */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Path Information for Alternate Path - input to ibt_set_alt_path().
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_alt_path_info_s {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_cep_path_t ap_alt_cep_path; /* RC & UC Only, valid if */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* cep_hca_port_num is not */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Open Channel flags, Used in ibt_open_rc_channel call
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Arguments for ibt_open_rc_channel().
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * oc_priv_data should be NULL or point to a buffer allocated by the caller,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * the size of which should be in oc_priv_data_len, where oc_priv_data_len <=
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * IBT_REQ_PRIV_DATA_SZ.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * When ibt_open_rc_channel returns with ibt_cm_reason_t of
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * IBT_CM_REDIRECT_PORT, the client can re-issue ibt_open_rc_channel setting
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * new fields as follows:
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Set (ibt_chan_args_t)->oc_cm_cep_path =
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * original (ibt_chan_open_args_t)->oc_path->pi_prim_cep_path.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Set (ibt_chan_args_t)->oc_cm_pkt_lt =
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * original (ibt_chan_open_args_t)->oc_prim_pkt_lt.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Update (ibt_chan_args_t)->oc_path based on path information returned
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * from ibt_get_paths using the gid in the return data below:
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * (ibt_rc_returns_t)->rc_arej_info.ari_redirect_info.ari_gid.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Set flags to IBT_OCHAN_PORT_REDIRECTED.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Note : oc_cm_path is not used for any other scenario, and must be set for
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * IBT_OCHAN_PORT_REDIRECTED.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * When ibt_open_rc_channel returns with ibt_cm_reason_t of
74a31ce69a88d851777ca840d31ec610ce9ecab3timh * IBT_CM_REDIRECT_CM, the client can re-issue ibt_open_rc_channel setting
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * new fields as follows:
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Update (ibt_chan_args_t)->oc_path based on path information returned
74a31ce69a88d851777ca840d31ec610ce9ecab3timh * from ibt_get_paths using the return data in
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * (ibt_rc_returns_t)->rc_arej_info.ari_redirect_info.
74a31ce69a88d851777ca840d31ec610ce9ecab3timh * Set (ibt_chan_args_t)->oc_cm_redirect_info =
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Returned (ibt_rc_returns_t)->rc_arej_info.ari_redirect_info.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Set flags to IBT_OCHAN_REDIRECTED.
74a31ce69a88d851777ca840d31ec610ce9ecab3timh * IBT_OCHAN_PORT_REDIRECTED flag cannot be used to specify a remote CM MAD
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * address, that is on a different subnet than the RC connection itself.
74a31ce69a88d851777ca840d31ec610ce9ecab3timh * Not specified attributes should be set to "NULL" or "0".
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_chan_open_args_s {
74a31ce69a88d851777ca840d31ec610ce9ecab3timh ibt_cm_handler_t oc_cm_handler; /* cm_handler - required */
74a31ce69a88d851777ca840d31ec610ce9ecab3timh /* cm_handler */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_priv_data_len_t oc_priv_data_len; /* Number of bytes of */
74a31ce69a88d851777ca840d31ec610ce9ecab3timh /* REQ Private data */
74a31ce69a88d851777ca840d31ec610ce9ecab3timh ibt_redirect_info_t *oc_cm_redirect_info; /* Redirect params */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* for port and CM */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* redirection */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_cep_path_t *oc_cm_cep_path; /* Optional Path for */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* CM MADs on */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* port redirection */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* CM MADs */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Define an optional RC return arguments structure. This contains return
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * parameters from ibt_open_rc_channel() when called in BLOCKING mode.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * rc_priv_data should be NULL or point to a buffer allocated by the caller,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * the size of which should be in rc_priv_data_len, where rc_priv_data_len <=
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * IBT_REP_PRIV_DATA_SZ.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjtypedef struct ibt_rc_returns_s {
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj uint8_t rc_rdma_ra_out; /* Arbitrated initiator depth */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Define a callback function that can be used in Non-Blocking calls to
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_recycle_rc().
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef void (*ibt_recycle_handler_t)(ibt_status_t ibt_status, void *arg);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Define an optional return arguments structure from ibt_set_alt_path()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * This contains return parameters, when called in BLOCKING mode.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ap_priv_data should be NULL or point to a buffer allocated by the caller,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * the size of which should be in ap_priv_data_len, where ap_priv_data_len <=
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * IBT_APR_PRIV_DATA_SZ.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The private data from APR is returned in ap_priv_data.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The caller specifies amount of APR private data to be returned in
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ap_priv_data_len.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_ap_returns_s {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_arej_info_t ap_arej_info; /* Only valid if redirect */
12cc75c814f0c017004a9bbc96429911e008601bcindi * UD remote destination attributes.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ud_sid, ud_addr, ud_pkt_lt and ud_pkey_ix must be specified.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * These values can be as returned in an ibt_path_info_t struct from an
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_get_paths() call.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ud_priv_data should be NULL or point to a buffer allocated by the caller,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * the size of which is in ud_priv_data_len, where ud_priv_data_len <=
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * IBT_SIDR_REQ_PRIV_DATA_SZ.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_ud_dest_attr_s {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_cm_ud_handler_t ud_cm_handler; /* An optional CM UD event */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* which must be NULL */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* if not specified. */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Define an optional UD return arguments structure.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ud_priv_data should be NULL or point to a buffer allocated by the caller,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * the size of which should be in ud_priv_data_len, where ud_priv_data_len <=
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * IBT_SIDR_REP_PRIV_DATA_SZ.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_ud_returns_s {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Multicast group attributes
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Not specified attributes should be set to "NULL" or "0".
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Used by ibt_join_mcg()/ibt_query_mcg().
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * mc_qkey, mc_pkey, mc_flow, mc_tclass, mc_sl, mc_join_state are required for
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * create - ibt_join_mcg().
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_mcg_attr_s {
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi /* added to the MCG. */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_pkt_lt_req_t mc_pkt_lt_req; /* Packet Life Time Request */
12cc75c814f0c017004a9bbc96429911e008601bcindi * Multicast group attributes.
12cc75c814f0c017004a9bbc96429911e008601bcindi * returned by ibt_join_mcg()/ibt_query_mcg().
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_mcg_info_s {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_adds_vect_t mc_adds_vect; /* Address information */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Define a callback function that can be used in Non-Blocking calls to
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_join_mcg().
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef void (*ibt_mcg_handler_t)(void *arg, ibt_status_t retval,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Service Flags - sd_flags
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * IBT_SRV_PEER_TYPE_SID Peer-to-peer Service IDs.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Define a Service ID Registration structure.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_srv_desc_s {
12cc75c814f0c017004a9bbc96429911e008601bcindi ibt_cm_ud_handler_t sd_ud_handler; /* UD Service Handler */
12cc75c814f0c017004a9bbc96429911e008601bcindi ibt_cm_handler_t sd_handler; /* Non-UD Service Handler */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Flag to indicate ibt_bind_service() to or NOT-to clean-up Stale matching
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Local Service Records with SA prior to binding the new request.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Define a Service ID Binding structure (data for service records).
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct ibt_srv_bind_s {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi uint32_t sb_lease; /* Service Lease period (in seconds) */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi uint_t sb_flag; /* indicates to/not-to clean-up stale */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /* matching local service records. */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_cm_delay() flags.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Refer to InfiniBand Architecture Release Volume 1 Rev 1.0a:
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Section 12.6.6 MRA
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The payload for DDI events passed on IB_PROP_UPDATE_EVENT.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * This is passed as the bus nexus data to event_handler(9e).
c40d7343efa60b18ad1ceb316eb337caeea79046cindi _ib_prop_update_union._ib_prop_update_struct.srv_updated
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi _ib_prop_update_union._ib_prop_update_struct.gid_updated
12cc75c814f0c017004a9bbc96429911e008601bcindi * FUNCTION PROTOTYPES.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_attach() and ibt_detach():
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * These are the calls into IBTF used during client driver attach() and
12cc75c814f0c017004a9bbc96429911e008601bcindi * detach().
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The IBTF returns an ibt_clnt_hdl_t to the client. This handle is used
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * to identify this client device in all subsequent calls into the IBTF.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * The ibt_detach() routine is called from a client driver's detach()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * routine to deregister itself from the IBTF.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindiibt_status_t ibt_attach(ibt_clnt_modinfo_t *mod_infop, dev_info_t *arg,
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * HCA FUNCTIONS
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_get_hca_list()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Returns the number of HCAs in a system and their node GUIDS.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * If hca_list_p is not NULL then the memory for the array of GUIDs is
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * allocated by the IBTF and should be freed by the caller using
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_free_hca_list(). If hca_list_p is NULL then no memory is allocated
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * by ibt_get_hca_list and only the number of HCAs in a system is returned.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * It is assumed that the caller can block in kmem_alloc.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_free_hca_list()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Free the memory allocated by ibt_get_hca_list().
0eb822a1c0c2bea495647510b75f77f0e57633ebcindivoid ibt_free_hca_list(ib_guid_t *hca_list, uint_t entries);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_open_hca() - Open/Close a HCA. HCA can only be opened/closed
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_close_hca() once. ibt_open_hca() takes a client's ibt handle
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * and a GUID and returns a unique IBT client HCA
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * These routines can not be called from interrupt context.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindiibt_status_t ibt_open_hca(ibt_clnt_hdl_t ibt_hdl, ib_guid_t hca_guid,
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_query_hca()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_query_hca_byguid()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Returns the static attributes of the specified HCA
0eb822a1c0c2bea495647510b75f77f0e57633ebcindiibt_status_t ibt_query_hca(ibt_hca_hdl_t hca_hdl, ibt_hca_attr_t *hca_attrs);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_query_hca_ports()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_query_hca_ports_byguid()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Returns HCA port/ports attributes for the specified HCA port/ports.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd * ibt_query_hca_ports() allocates the memory required for the
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_hca_portinfo_t struct as well as the memory required for the SGID
14ea4bb737263733ad80a36b4f73f681c30a6b45sd * and P_Key tables contained within that struct.
14ea4bb737263733ad80a36b4f73f681c30a6b45sd * ibt_free_portinfo()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Frees the memory allocated for a specified ibt_hca_portinfo_t struct.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindiibt_status_t ibt_query_hca_ports(ibt_hca_hdl_t hca_hdl, uint8_t port,
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi ibt_hca_portinfo_t **port_info_p, uint_t *ports_p, uint_t *size_p);
24db46411fd54f70c35b94bb952eb7ba040e43b4eschrockibt_status_t ibt_query_hca_ports_byguid(ib_guid_t hca_guid, uint8_t port,
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi ibt_hca_portinfo_t **port_info_p, uint_t *ports_p, uint_t *size_p);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindivoid ibt_free_portinfo(ibt_hca_portinfo_t *port_info, uint_t size);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_set_hca_private() - Set/get the client private data.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_get_hca_private()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindivoid ibt_set_hca_private(ibt_hca_hdl_t hca_hdl, void *clnt_private);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_hca_handle_to_guid()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * A helper function to retrieve HCA GUID for the specified handle.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Returns HCA GUID on which the specified Channel is allocated. Valid
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * if it is non-NULL on return.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_hca_guid_to_handle()
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * A helper function to retrieve a hca handle from a HCA GUID.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_hca_guid_to_handle(ibt_clnt_hdl_t ibt_hdl, ib_guid_t hca_guid,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * CONNECTION ESTABLISHMENT/TEAR DOWN FUNCTIONS.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_get_paths
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Finds the best path to a specified destination (as determined by the
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * IBTL) that satisfies the requirements specified in an ibt_path_attr_t
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_get_paths(ibt_clnt_hdl_t ibt_hdl, ibt_path_flags_t flags,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj ibt_path_attr_t *attr, uint8_t max_paths, ibt_path_info_t *paths,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Callback function that can be used in ibt_aget_paths(), a Non-Blocking
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * version of ibt_get_paths().
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjtypedef void (*ibt_path_handler_t)(void *arg, ibt_status_t retval,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Find path(s) to a given destination or service asynchronously.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_aget_paths() is a Non-Blocking version of ibt_get_paths().
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_aget_paths(ibt_clnt_hdl_t ibt_hdl, ibt_path_flags_t flags,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj ibt_path_attr_t *attr, uint8_t max_paths, ibt_path_handler_t func,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_get_alt_path
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Finds the best alternate path to a specified channel (as determined by
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * the IBTL) that satisfies the requirements specified in an
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_alt_path_attr_t struct. The specified channel must have been
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * previously opened successfully using ibt_open_rc_channel.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_get_alt_path(ibt_channel_hdl_t chan, ibt_path_flags_t flags,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj ibt_alt_path_attr_t *attr, ibt_alt_path_info_t *alt_path);
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_open_rc_channel
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_open_rc_channel() opens a previously allocated RC communication
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * channel. The IBTL initiates the channel establishment protocol.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_open_rc_channel(ibt_channel_hdl_t rc_chan,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj ibt_chan_open_flags_t flags, ibt_execution_mode_t mode,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj ibt_chan_open_args_t *args, ibt_rc_returns_t *returns);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_close_rc_channel
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Close the specified channel. Outstanding work requests are flushed
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * so that the client can do the associated clean up. After that, the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * client will usually deregister the previously registered memory,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * then free the channel by calling ibt_free_rc_channel().
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * This function will reuse CM event Handler provided in
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_open_rc_channel().
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_close_rc_channel(ibt_channel_hdl_t rc_chan,
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi ibt_priv_data_len_t priv_data_len, uint8_t *ret_status,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi void *ret_priv_data, ibt_priv_data_len_t *ret_priv_data_len_p);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_prime_close_rc_channel
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Allocates resources required for a close rc channel operation.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Calling ibt_prime_close_rc_channel() allows a channel to be
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * subsequently closed in interrupt context.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * A call is first made to ibt_prime_close_rc_channel in non-interrupt
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * context, followed by ibt_close_rc_channel in non-blocking mode from
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * interrupt context
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_prime_close_rc_channel() can only be called on a previously opened
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_prime_close_rc_channel(ibt_channel_hdl_t rc_chan);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_recycle_rc
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Recycle a RC channel which has transitioned to Error state. The
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_recycle_rc() function transitions the channel from Error
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * state (IBT_STATE_ERROR) to the state ready for use by
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_open_rc_channel. Basically, this function is very similar to
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_alloc_rc_channel, but reuses an existing RC channel.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Clients are allowed to make resource clean up/free calls in the CM handler
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Client(s) must not invoke blocking version (ie., func specified as NULL) of
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_recycle_rc from cm callback for IBT_CM_EVENT_CONN_CLOSED
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Clients are strongly advised not to issue blocking calls from func, as this
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * would block the CM threads, and could delay or block other client connections
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * and ibtl related API invocations.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_recycle_rc(ibt_channel_hdl_t rc_chan, ibt_cep_flags_t control,
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi uint8_t hca_port_num, ibt_recycle_handler_t func, void *arg);
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_recycle_ud
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Recycle a UD channel which has transitioned to Error state. The
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_recycle_ud() function transitions the channel from Error
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * state (IBT_STATE_ERROR) to a usable state (IBT_STATE_RTS).
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Basically, this function is very similar to ibt_alloc_ud_channel,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * but reuses an existing UD channel.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_recycle_ud(ibt_channel_hdl_t ud_chan, uint8_t hca_port_num,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * MODIFY CHANNEL ATTRIBUTE FUNCTIONs.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_pause_sendq
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_unpause_sendq
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Place the send queue of the specified channel into the send queue
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * drained state.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Applicable for both RC and UD channels.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_unpause_sendq(ibt_channel_hdl_t chan);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_resize_queues()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Resize the SendQ/RecvQ sizes of a channel.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Applicable for both RC and UD channels.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_resize_queues(ibt_channel_hdl_t chan, ibt_qflags_t flags,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_queue_sizes_t *request_sz, ibt_queue_sizes_t *actual_sz);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_query_queues()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Query the SendQ/RecvQ sizes of a channel.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Applicable for both RC and UD channels.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_modify_rdma
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Enable/disable RDMA operations.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Applicable for RC channels only.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_modify_rdma(ibt_channel_hdl_t rc_chan,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_cep_modify_flags_t modify_flags, ibt_cep_flags_t flags);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_set_rdma_resource
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Change the number of resources to be used for incoming and outgoing
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * RDMA reads & Atomics.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_set_rdma_resource(ibt_channel_hdl_t rc_chan,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_cep_modify_flags_t modify_flags, uint8_t rdma_ra_out,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_change_port
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Change the primary physical port of an RC channel. (This is done only
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * if HCA supports this capability). Can only be called on a paused
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * Applicable for RC channels only.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_change_port(ibt_channel_hdl_t rc_chan, uint8_t port_num);
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * SERVICE REGISTRATION FUNCTIONS
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_register_service()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_deregister_service()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Register/deregister a Service (range of Service IDs) with the IBTF.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_bind_service()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_unbind_service()
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_unbind_all_services()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Bind a Service to a given port (GID), and optionally create
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * service record(s) with the SA for ibt_get_paths() to find.
0eb822a1c0c2bea495647510b75f77f0e57633ebcindiibt_status_t ibt_register_service(ibt_clnt_hdl_t ibt_hdl,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_srv_desc_t *service, ib_svc_id_t sid, int num_sids,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_deregister_service(ibt_clnt_hdl_t ibt_hdl,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_bind_service(ibt_srv_hdl_t srv_hdl, ib_gid_t gid,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_srv_bind_t *srv_bind, void *cm_private, ibt_sbind_hdl_t *sb_hdl_p);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_unbind_service(ibt_srv_hdl_t srv_hdl, ibt_sbind_hdl_t sb_hdl);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_unbind_all_services(ibt_srv_hdl_t srv_hdl);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_cm_delay
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * A client CM handler/srv_handler function can call this function to
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * extend its response time to a CM event.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Applicable for RC channels only.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_cm_delay(ibt_cmdelay_flags_t flags, void *cm_session_id,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi clock_t service_time, void *priv_data, ibt_priv_data_len_t priv_data_len);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_cm_proceed
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * An IBT client calls ibt_cm_proceed() to proceed with a connection that
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * previously deferred by the client returning IBT_CM_DEFER on a CM handler
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * callback. CM events that can be deferred and continued with ibt_cm_proceed()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * are REQ_RCV, REP_RCV, LAP_RCV, and DREQ_RCV.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Typically CM completes processing of a client's CM handler return, with
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * IBT_CM_DEFER status, before processing of the corresponding ibt_cm_proceed()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * is started. However a race exists where by CM may not have completed the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * client's handler return processing when ibt_cm_proceed() is called by a
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * client. In this case ibt_cm_proceed() will block until processing of the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * client's CM handler return is complete.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * A client that returns IBT_CM_DEFER from the cm handler must
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * subsequently make a call to ibt_cm_proceed(). It is illegal to call
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_cm_proceed() on a channel that has not had the connection
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * establishment deferred.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Client cannot call ibt_cm_proceed from the cm handler.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_cm_proceed(ibt_cm_event_type_t event, void *session_id,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_cm_status_t status, ibt_cm_proceed_reply_t *cm_event_data,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_cm_ud_proceed
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * An IBT client calls ibt_cm_ud_proceed() to proceed with an
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * IBT_CM_UD_EVENT_SIDR_REQ UD event that was previously deferred by the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * client returning IBT_CM_DEFER on a CM UD handler callback.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Typically CM completes processing of a client's CM handler return, with
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * IBT_CM_DEFER status, before processing of the corresponding
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_cm_ud_proceed() is started. However a race exists where by CM may not
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * have completed the client's handler return processing when
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_cm_ud_proceed() is called by a client. In this case ibt_cm_ud_proceed()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * will block until processing of the client's CM handler return is complete.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * A client that returns IBT_CM_DEFER from the cm handler must
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * subsequently make a call to ibt_cm_ud_proceed(). It is illegal to call
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_cm_ud_proceed() on a channel that has not had the connection
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * establishment deferred.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Client cannot call ibt_cm_ud_proceed from the cm handler.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiibt_status_t ibt_cm_ud_proceed(void *session_id, ibt_channel_hdl_t ud_channel,
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_cm_status_t status, ibt_redirect_info_t *redirect_infop,
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindi * COMPLETION QUEUES.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_alloc_cq_sched()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Reserve CQ scheduling class resources
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * ibt_free_cq_sched()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Free CQ scheduling class resources
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ibt_cq_sched_attr_t *attr, ibt_sched_hdl_t *sched_hdl_p);
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindi * ibt_alloc_cq()
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindi * Allocate a completion queue.
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindiibt_status_t ibt_alloc_cq(ibt_hca_hdl_t hca_hdl, ibt_cq_attr_t *cq_attr,
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindi * ibt_free_cq()
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindi * Free allocated CQ resources.
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindi * ibt_enable_cq_notify()
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindi * Enable notification requests on the specified CQ.
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindi * Applicable for both RC and UD channels.
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindi * Completion notifications are disabled by setting the completion
89c0ae934a35c2ab26de63e1d9fba6bcb04c6306cindi * handler to NULL by calling ibt_set_cq_handler().
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi * ibt_set_cq_handler()
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Register a work request completion handler with the IBTF.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Applicable for both RC and UD channels.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Completion notifications are disabled by setting the completion
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * handler to NULL. When setting the handler to NULL, no additional
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * calls to the CQ handler will be initiated.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * This function does not otherwise change the state of previous
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * calls to ibt_enable_cq_notify().
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_poll_cq()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Poll the specified CQ for the completion of work requests (WRs).
940d71d237794874e18a0eb72f6564821a823517eschrock * If the CQ contains completed WRs, up to num_wc of them are returned.
940d71d237794874e18a0eb72f6564821a823517eschrock * Applicable for both RC and UD channels.
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_poll_cq(ibt_cq_hdl_t ibt_cq, ibt_wc_t *work_completions,
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_query_cq()
940d71d237794874e18a0eb72f6564821a823517eschrock * Return the total number of entries in the CQ.
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_query_cq(ibt_cq_hdl_t ibt_cq, uint_t *entries);
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_resize_cq()
940d71d237794874e18a0eb72f6564821a823517eschrock * Change the size of a CQ.
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_resize_cq(ibt_cq_hdl_t ibt_cq, uint_t new_sz, uint_t *real_sz);
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_set_cq_private()
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_get_cq_private()
940d71d237794874e18a0eb72f6564821a823517eschrock * Set/get the client private data.
940d71d237794874e18a0eb72f6564821a823517eschrockvoid ibt_set_cq_private(ibt_cq_hdl_t ibt_cq, void *clnt_private);
940d71d237794874e18a0eb72f6564821a823517eschrock * Memory Management Functions.
940d71d237794874e18a0eb72f6564821a823517eschrock * Applicable for both RC and UD channels.
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_register_mr()
940d71d237794874e18a0eb72f6564821a823517eschrock * Prepares a virtually addressed memory region for use by a HCA. A
940d71d237794874e18a0eb72f6564821a823517eschrock * description of the registered memory suitable for use in Work Requests
940d71d237794874e18a0eb72f6564821a823517eschrock * (WRs) is returned in the ibt_mr_desc_t parameter.
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_register_buf()
940d71d237794874e18a0eb72f6564821a823517eschrock * Prepares a memory region described by a buf(9S) struct for use by a
940d71d237794874e18a0eb72f6564821a823517eschrock * HCA. A description of the registered memory suitable for use in
940d71d237794874e18a0eb72f6564821a823517eschrock * Work Requests (WRs) is returned in the ibt_mr_desc_t parameter.
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_query_mr()
940d71d237794874e18a0eb72f6564821a823517eschrock * Retrieves information about a specified memory region.
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_deregister_mr()
940d71d237794874e18a0eb72f6564821a823517eschrock * Remove a memory region from a HCA translation table, and free all
940d71d237794874e18a0eb72f6564821a823517eschrock * resources associated with the memory region.
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_reregister_mr()
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_reregister_buf()
940d71d237794874e18a0eb72f6564821a823517eschrock * Modify the attributes of an existing memory region.
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_register_shared_mr()
940d71d237794874e18a0eb72f6564821a823517eschrock * Given an existing memory region, a new memory region associated with
940d71d237794874e18a0eb72f6564821a823517eschrock * the same physical locations is created.
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_sync_mr()
940d71d237794874e18a0eb72f6564821a823517eschrock * Sync a memory region for either RDMA reads or RDMA writes
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_alloc_mw()
940d71d237794874e18a0eb72f6564821a823517eschrock * Allocate a memory window.
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_query_mw()
940d71d237794874e18a0eb72f6564821a823517eschrock * Retrieves information about a specified memory window.
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_free_mw()
940d71d237794874e18a0eb72f6564821a823517eschrock * De-allocate the Memory Window.
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_register_mr(ibt_hca_hdl_t hca_hdl, ibt_pd_hdl_t pd,
940d71d237794874e18a0eb72f6564821a823517eschrock ibt_mr_attr_t *mem_attr, ibt_mr_hdl_t *mr_hdl_p, ibt_mr_desc_t *mem_desc);
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_register_buf(ibt_hca_hdl_t hca_hdl, ibt_pd_hdl_t pd,
940d71d237794874e18a0eb72f6564821a823517eschrock ibt_smr_attr_t *mem_bpattr, struct buf *bp, ibt_mr_hdl_t *mr_hdl_p,
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_query_mr(ibt_hca_hdl_t hca_hdl, ibt_mr_hdl_t mr_hdl,
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_deregister_mr(ibt_hca_hdl_t hca_hdl, ibt_mr_hdl_t mr_hdl);
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_reregister_mr(ibt_hca_hdl_t hca_hdl, ibt_mr_hdl_t mr_hdl,
940d71d237794874e18a0eb72f6564821a823517eschrock ibt_pd_hdl_t pd, ibt_mr_attr_t *mem_attr, ibt_mr_hdl_t *mr_hdl_p,
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_reregister_buf(ibt_hca_hdl_t hca_hdl, ibt_mr_hdl_t mr_hdl,
940d71d237794874e18a0eb72f6564821a823517eschrock ibt_pd_hdl_t pd, ibt_smr_attr_t *mem_bpattr, struct buf *bp,
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_register_shared_mr(ibt_hca_hdl_t hca_hdl, ibt_mr_hdl_t mr_hdl,
940d71d237794874e18a0eb72f6564821a823517eschrock ibt_pd_hdl_t pd, ibt_smr_attr_t *mem_sattr, ibt_mr_hdl_t *mr_hdl_p,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_sync_mr(ibt_hca_hdl_t hca_hdl, ibt_mr_sync_t *mr_segments,
78432d5ed5122db8b0bbfa41e00d063bf8ae7171cyibt_status_t ibt_alloc_mw(ibt_hca_hdl_t hca_hdl, ibt_pd_hdl_t pd,
78432d5ed5122db8b0bbfa41e00d063bf8ae7171cy ibt_mw_flags_t flags, ibt_mw_hdl_t *mw_hdl_p, ibt_rkey_t *rkey);
78432d5ed5122db8b0bbfa41e00d063bf8ae7171cyibt_status_t ibt_query_mw(ibt_hca_hdl_t hca_hdl, ibt_mw_hdl_t mw_hdl,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_free_mw(ibt_hca_hdl_t hca_hdl, ibt_mw_hdl_t mw_hdl);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_alloc_lkey()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Allocates physical buffer list resources for use in memory
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * registrations.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Applicable for both RC and UD channels.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_alloc_lkey(ibt_hca_hdl_t hca_hdl, ibt_pd_hdl_t pd,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_lkey_flags_t flags, uint_t phys_buf_list_sz, ibt_mr_hdl_t *mr_p,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Physical Memory Management Functions.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Applicable for both RC and UD channels.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_register_phys_mr()
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Prepares a physically addressed memory region for use by a HCA.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_reregister_phys_mr()
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Modify the attributes of an existing memory region.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_register_phys_mr(ibt_hca_hdl_t hca_hdl, ibt_pd_hdl_t pd,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_reregister_phys_mr(ibt_hca_hdl_t hca_hdl, ibt_mr_hdl_t mr_hdl,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_pd_hdl_t pd, ibt_pmr_attr_t *mem_pattr, ibt_mr_hdl_t *mr_hdl_p,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Address Translation.
01e689ccb14727455003b77ee332005223497875cindi * ibt_map_mem_area()
01e689ccb14727455003b77ee332005223497875cindi * Translate a kernel virtual address range into HCA physical addresses.
940d71d237794874e18a0eb72f6564821a823517eschrock * A set of physical addresses, that can be used with "Reserved L_Key",
940d71d237794874e18a0eb72f6564821a823517eschrock * register physical, and "Fast Registration Work Request" operations
940d71d237794874e18a0eb72f6564821a823517eschrock * is returned.
01e689ccb14727455003b77ee332005223497875cindiibt_status_t ibt_map_mem_area(ibt_hca_hdl_t hca_hdl, ibt_va_attr_t *va_attrs,
940d71d237794874e18a0eb72f6564821a823517eschrock uint_t paddr_list_len, ibt_phys_buf_t *paddr_list_p, uint_t *num_paddr_p,
940d71d237794874e18a0eb72f6564821a823517eschrock size_t *paddr_bufsz_p, ib_memlen_t *paddr_offset_p, ibt_ma_hdl_t *ma_hdl_p);
940d71d237794874e18a0eb72f6564821a823517eschrock * ibt_unmap_mem_area()
01e689ccb14727455003b77ee332005223497875cindi * Un pin physical pages pinned during an ibt_map_mem_area() call.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_unmap_mem_area(ibt_hca_hdl_t hca_hdl, ibt_ma_hdl_t ma_hdl);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Work Request Functions
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Applicable for RC and UD channels.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_post_send()
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Post send work requests to the specified channel.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_post_recv()
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_post_srq()
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Post receive work requests to the specified channel.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_post_send(ibt_channel_hdl_t chan, ibt_send_wr_t *wr_list,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_post_recv(ibt_channel_hdl_t chan, ibt_recv_wr_t *wr_list,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_post_srq(ibt_srq_hdl_t srq, ibt_recv_wr_t *wr_list,
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Alternate Path Migration Functions.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Applicable for RC channels only.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_get_alt_path()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Finds the best alternate path to a specified channel (as determined by
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * the IBTL) that satisfies the requirements specified in an
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_alt_path_attr_t struct. The specified channel must have been
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * previously opened successfully using ibt_open_rc_channel.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * This function also ensures that the service being accessed by the
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * channel is available at the selected alternate port.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Note: The apa_dgid must be on the same destination channel adapter,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * if specified.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_set_alt_path()
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Load the specified alternate path. Causes the CM to send an LAP message
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * to the remote node. If successful, the local channel is updated with
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * the new alternate path and the channel migration state is set to REARM.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Can only be called on a previously opened RC channel. The channel must
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * be either in RTS or paused state.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_migrate_path()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Force the CI to use the alternate path. The alternate path becomes
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * the primary path. A new alternate path should be loaded and enabled.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_get_alt_path(ibt_channel_hdl_t rc_chan, ibt_path_flags_t flags,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_alt_path_attr_t *attr, ibt_alt_path_info_t *alt_pathp);
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_set_alt_path(ibt_channel_hdl_t rc_chan,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_execution_mode_t mode, ibt_alt_path_info_t *alt_pinfo, void *priv_data,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_priv_data_len_t priv_data_len, ibt_ap_returns_t *ret_args);
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjibt_status_t ibt_migrate_path(ibt_channel_hdl_t rc_chan);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Multicast group Functions.
918a0d8ae0916c29c35aae9b95c22b02a0c6e390robj * Applicable for UD channels only.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_attach_mcg()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Attaches a UD channel to the specified multicast group. On successful
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * completion, this channel will be provided with a copy of every
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * multicast message addressed to the group specified by the MGID
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * (mcg_info->mc_adds_vect.av_dgid) and received on the HCA port with
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * which the channel is associated.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_detach_mcg()
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Detach the specified UD channel from the specified multicast group.
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * ibt_join_mcg()
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * Join a multicast group. The first full member "join" causes the MCG
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * to be created.
940d71d237794874e18a0eb72f6564821a823517eschrockibt_status_t ibt_join_mcg(ib_gid_t rgid, ibt_mcg_attr_t *mcg_attr,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_mcg_info_t *mcg_info_p, ibt_mcg_handler_t func, void *arg);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_leave_mcg()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * The port associated with the port GID shall be removed from the
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * multicast group specified by MGID (mc_gid) or from all the multicast
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * groups of which it is a member if the MGID (mc_gid) is not specified
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj * (i.e. mc_gid.mgid_prefix must have 8-bits of 11111111 at the start of
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * the GID to identify this as being a multicast GID).
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * The last full member to leave causes the destruction of the Multicast
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_leave_mcg(ib_gid_t rgid, ib_gid_t mc_gid, ib_gid_t port_gid,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_query_mcg()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Request information on multicast groups that match the parameters
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * specified in mcg_attr. Information on each multicast group is returned
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * to the caller in the form of an array of ibt_mcg_info_t.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_query_mcg() allocates the memory for this array and returns a
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * pointer to the array (mcgs_p) and the number of entries in the array
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * (entries_p). This memory should be freed by the client using
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_free_mcg_info().
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_query_mcg(ib_gid_t rgid, ibt_mcg_attr_t *mcg_attr,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi uint_t mcgs_max_num, ibt_mcg_info_t **mcgs_info_p, uint_t *entries_p);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_free_mcg_info()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Free the memory allocated by successful ibt_query_mcg()
c40d7343efa60b18ad1ceb316eb337caeea79046cindivoid ibt_free_mcg_info(ibt_mcg_info_t *mcgs_info, uint_t entries);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_register_subnet_notices()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Register a handler to be called for subnet notifications.
c40d7343efa60b18ad1ceb316eb337caeea79046cindivoid ibt_register_subnet_notices(ibt_clnt_hdl_t ibt_hdl,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_sm_notice_handler_t sm_notice_handler, void *private);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Protection Domain Functions.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_alloc_pd()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_free_pd()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Allocate/Release a protection domain
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_alloc_pd(ibt_hca_hdl_t hca_hdl, ibt_pd_flags_t flags,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_free_pd(ibt_hca_hdl_t hca_hdl, ibt_pd_hdl_t pd);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * P_Key to P_Key Index conversion Functions.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_pkey2index_byguid
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_pkey2index Convert a P_Key into a P_Key index.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_index2pkey_byguid
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_index2pkey Convert a P_Key Index into a P_Key.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_pkey2index(ibt_hca_hdl_t hca_hdl, uint8_t port_num,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_index2pkey(ibt_hca_hdl_t hca_hdl, uint8_t port_num,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_pkey2index_byguid(ib_guid_t hca_guid, uint8_t port_num,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_index2pkey_byguid(ib_guid_t hca_guid, uint8_t port_num,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_ci_data_in()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Pass CI specific userland data for CI objects to the CI.
78432d5ed5122db8b0bbfa41e00d063bf8ae7171cyibt_status_t ibt_ci_data_in(ibt_hca_hdl_t hca, ibt_ci_data_flags_t flags,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_object_type_t object, void *ibt_object_handle, void *data_p,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_ci_data_out()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Obtain CI specific userland data for CI objects.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_ci_data_out(ibt_hca_hdl_t hca, ibt_ci_data_flags_t flags,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_object_type_t object, void *ibt_object_handle, void *data_p,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Node Information.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi/* Node type : n_node_type */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi#define IBT_NODE_TYPE_CHANNEL_ADAPTER 1 /* HCA or TCA */
c40d7343efa60b18ad1ceb316eb337caeea79046cinditypedef struct ibt_node_info_s {
c40d7343efa60b18ad1ceb316eb337caeea79046cindi uint8_t n_num_ports; /* Number of ports on this node. */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi char n_description[64]; /* NULL terminated ASCII string */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_gid_to_node_info()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Retrieve node information for the specified GID.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_gid_to_node_info(ib_gid_t gid, ibt_node_info_t *node_info_p);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_reprobe_dev
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Reprobe properties for IOC device node.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_get_companion_port_gids()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Get list of GID's available on a companion port(s) of the specified
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * GID or list of GIDs available on a specified Node GUID/System Image
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_get_companion_port_gids(ib_gid_t gid, ib_guid_t hca_guid,
78432d5ed5122db8b0bbfa41e00d063bf8ae7171cy ib_guid_t sysimg_guid, ib_gid_t **gids_p, uint_t *num_gids_p);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * SHARED RECEIVE QUEUE
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_alloc_srq()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Allocate a shared receive queue.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_alloc_srq(ibt_hca_hdl_t hca_hdl, ibt_srq_flags_t flags,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_pd_hdl_t pd, ibt_srq_sizes_t *sizes, ibt_srq_hdl_t *ibt_srq_p,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_free_srq()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Free allocated SRQ resources.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_query_srq()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Query a shared receive queue.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_query_srq(ibt_srq_hdl_t ibt_srq, ibt_pd_hdl_t *pd_p,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_modify_srq()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Modify a shared receive queue.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_modify_srq(ibt_srq_hdl_t ibt_srq, ibt_srq_modify_flags_t flags,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_set_srq_private()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_get_srq_private()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Set/get the SRQ client private data.
c40d7343efa60b18ad1ceb316eb337caeea79046cindivoid ibt_set_srq_private(ibt_srq_hdl_t ibt_srq, void *clnt_private);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_check_failure()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Function to test for special case failures
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_failure_type_t ibt_check_failure(ibt_status_t status, uint64_t *reserved_p);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_hw_is_present() returns 0 when there is no IB hardware actively
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * running. This is primarily useful for modules like rpcmod which needs a
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * quick check to decide whether or not it should try to use InfiniBand.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * CONTRACT PRIVATE ONLY INTERFACES
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * DO NOT USE THE FOLLOWING FUNCTIONS WITHOUT SIGNING THE CONTRACT
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * WITH IBTF GROUP.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi/* Define an Address Record structure (data for ATS service records). */
c40d7343efa60b18ad1ceb316eb337caeea79046cinditypedef struct ibt_ar_s {
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ib_pkey_t ar_pkey; /* P_Key valid on port of ar_gid */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi uint8_t ar_data[16]; /* Data affiliated with GID/P_Key */
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_register_ar()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_deregister_ar()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Register/deregister an Address Record with the SA.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_query_ar()
918a0d8ae0916c29c35aae9b95c22b02a0c6e390robj * Query the SA for Address Records matching either GID/P_Key or Data.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_register_ar(ibt_clnt_hdl_t ibt_hdl, ibt_ar_t *arp);
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_deregister_ar(ibt_clnt_hdl_t ibt_hdl, ibt_ar_t *arp);
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_query_ar(ib_gid_t *sgid, ibt_ar_t *queryp, ibt_ar_t *resultp);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_modify_system_image()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_modify_system_image_byguid()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Modify specified HCA's system image GUID.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_modify_system_image(ibt_hca_hdl_t hca_hdl, ib_guid_t sys_guid);
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_modify_system_image_byguid(ib_guid_t hca_guid,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_modify_port()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_modify_port_byguid()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Modify the specified port, or all ports attribute(s).
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_modify_port(ibt_hca_hdl_t hca_hdl, uint8_t port,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_modify_port_byguid(ib_guid_t hca_guid, uint8_t port,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_get_port_state()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_get_port_state_byguid()
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Return the most commonly requested attributes of an HCA port.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * If the link state is not IBT_PORT_ACTIVE, the other returned values
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * are undefined.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_get_port_state(ibt_hca_hdl_t hca_hdl, uint8_t port,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_get_port_state_byguid(ib_guid_t hca_guid, uint8_t port,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Fast Memory Registration (FMR).
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_create_fmr_pool
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * Not fast-path.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_create_fmr_pool() verifies that the HCA supports FMR and allocates
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * and initializes an "FMR pool". This pool contains state specific to
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * this registration, including the watermark setting to determine when
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * to sync, and the total number of FMR regions available within this pool.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_destroy_fmr_pool
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_destroy_fmr_pool() deallocates all of the FMR regions in a specific
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * pool. All state and information regarding the pool are destroyed and
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * returned as free space once again. No more use of FMR regions in this
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * pool are possible without a subsequent call to ibt_create_fmr_pool().
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_flush_fmr_pool
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_flush_fmr_pool forces a flush to occur. At the client's request,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * any unmapped FMR regions (See 'ibt_deregister_mr())') are returned to
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * a free state. This function allows for an asynchronous cleanup of
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * formerly used FMR regions. Sync operation is also performed internally
918a0d8ae0916c29c35aae9b95c22b02a0c6e390robj * by HCA driver, when 'watermark' settings for the number of free FMR
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * regions left in the "pool" is reached.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_register_physical_fmr
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_register_physical_fmr() assigns a "free" entry from the FMR Pool.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * It first consults the "FMR cache" to see if this is a duplicate memory
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * registration to something already in use. If not, then a free entry
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * in the "pool" is marked used.
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * ibt_deregister_fmr
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * The ibt_deregister_fmr un-maps the resources reserved from the FMR
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * pool by ibt_register_physical_fmr(). The ibt_deregister_fmr() will
c40d7343efa60b18ad1ceb316eb337caeea79046cindi * mark the region as free in the FMR Pool.
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_create_fmr_pool(ibt_hca_hdl_t hca_hdl, ibt_pd_hdl_t pd,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_fmr_pool_attr_t *fmr_params, ibt_fmr_pool_hdl_t *fmr_pool_p);
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_destroy_fmr_pool(ibt_hca_hdl_t hca_hdl,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_register_physical_fmr(ibt_hca_hdl_t hca_hdl,
c40d7343efa60b18ad1ceb316eb337caeea79046cindi ibt_fmr_pool_hdl_t fmr_pool, ibt_pmr_attr_t *mem_pattr,
c40d7343efa60b18ad1ceb316eb337caeea79046cindiibt_status_t ibt_deregister_fmr(ibt_hca_hdl_t hca, ibt_mr_hdl_t mr_hdl);
c40d7343efa60b18ad1ceb316eb337caeea79046cindi#endif /* _SYS_IB_IBTL_IBTI_COMMON_H */