c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * CDDL HEADER START
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * The contents of this file are subject to the terms of the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Common Development and Distribution License (the "License").
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * You may not use this file except in compliance with the License.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * or http://www.opensolaris.org/os/licensing.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * See the License for the specific language governing permissions
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * and limitations under the License.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * When distributing Covered Code, include this CDDL HEADER in each
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * If applicable, add the following below this CDDL HEADER, with the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * fields enclosed by brackets "[]" replaced with your own identifying
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * information: Portions Copyright [yyyy] [name of copyright owner]
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar *
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * CDDL HEADER END
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * This header file contains definations for APIs which are exported by
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * sol_uverbs for use by sol_ucma
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#ifndef _SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS2UCMA_H
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define _SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS2UCMA_H
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#ifdef __cplusplus
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarextern "C" {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#endif
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UCMA_UVERBS_PATH "/ib/sol_uverbs@0:ucma"
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * This API returns the IB & iWARP client handles that sol_uverbs uses
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * to interact with Solaris IBTF and iWARP frameworks.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_GET_CLNT_HDL "sol_uverbs_get_clnt_hdl"
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef void (*uverbs_get_clnt_hdl_t) (void **, void **);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * This API returns the QP handle used by Solaris IBTF / iWARP framework
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * for an QP. The QP number is the input for this API. NULL is returned
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * for QP not allocated by sol_uverbs.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_QPNUM2QPHDL "sol_uverbs_qpnum2qphdl"
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef void *(*uverbs_qpnum2qphdl_t) (uint32_t);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * This API disables user QP modifies for an QP specified by the input
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * QP number. It returns 0 on succcess and non-0 on failure.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_DISABLE_UQPN_MODIFY "sol_uverbs_disable_uqpn_modify"
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef int (*uverbs_disable_uqpn_mod_t)(uint32_t);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * This API enables / disables CQ notification for all CQs assosiated
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * with the QP. This is done to ensure that the first completion event
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * is send to userland *after* connection is established.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef enum {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar SOL_UVERBS2UCMA_CQ_NOTIFY_NOT_SET = 0,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar SOL_UVERBS2UCMA_CQ_NOTIFY_ENABLE,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar SOL_UVERBS2UCMA_CQ_NOTIFY_DISABLE
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} sol_uverbs_cq_ctrl_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_UQPN_CQ_CTRL "sol_uverbs_uqpn_cq_ctrl"
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef int (*uverbs_uqpn_cq_ctrl_t)(uint32_t, sol_uverbs_cq_ctrl_t);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * This API sets the QP free state. The uint32_t uqpid is passed for
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * disabling QP free and void *qphdl is passed for enabling QP free.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef enum {
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar SOL_UVERBS2UCMA_ENABLE_QP_FREE,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar SOL_UVERBS2UCMA_DISABLE_QP_FREE,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar SOL_UVERBS2UCMA_FREE_PENDING
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar} sol_uverbs_qp_free_state_t;
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_SET_QPFREE_STATE "sol_uverbs_set_qp_free_state"
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef void (*uverbs_set_qp_free_state_t)(sol_uverbs_qp_free_state_t,
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar uint32_t, void *);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar/*
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar * This API flushes the QP specified by the QP num
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar */
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#define SOL_UVERBS_FLUSH_QP "sol_uverbs_flush_qp"
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikartypedef void (*uverbs_flush_qp_t)(uint32_t);
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#ifdef __cplusplus
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar}
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#endif
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#endif /* _SYS_IB_CLIENTS_OF_SOL_UVERBS_SOL_UVERBS2UCMA_H */