/*
*/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* Userspace library for Oracle SIF Infiniband PCI Express
* host channel adapter (HCA)
*
* sif_user.h: This file defines sif specific verbs extension request/response.
* This file is included both from user space and kernel space so
*/
#ifndef _SIF_USER_H
#define _SIF_USER_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Binary interface control:
* Major version difference indicate backward incompatible changes
* Minor version difference indicate that only a common subset of
* features are available.
*
*/
#define SIF_UVERBS_ABI_MINOR_VERSION 0
/* Bw comp */
#define SIF_UVERBS_ABI_VERSION \
/*
* Bit 5 is not used by the PSIF_WC_OPCODE_FOO_BAR enums. Hence, using
* it to indicate if QP has been destroyed before the CQE has been
* polled
*/
/*
* This struct will be amended to an un-polled cqe, in case the QP has
* been destroyed before the CQEs are polled. The information is
* needed in order to handle flushing of SRQs and generation of Last
* WQE Reached event.
*
* The information amended to the CQE is _only_ valid if the CQE has
* been marked with SIF_WC_QP_DESTROYED.
*/
struct sif_post_mortem_qp_info_in_cqe {
int was_srq;
int srq_idx;
};
#ifndef __u32
#endif
/*
* These definitions must be kept in sync with
* the ones in libsif's sif.h
*/
typedef enum sif_vendor_flags {
/*
* Use special mmu setup in associated mappings
* NB! Modifies input to ibv_reg_mr!
*/
/* Trigger send queue mode instead of using VCBs */
/* Enable EPS-A proxying - requires the eps_a field to be set */
/* Enable kernel mode - default is direct user mode */
/* Value to use for the qosl bit in the qp state */
typedef enum sif_mem_type {
/* Mapping of user memory based on the process' own page table */
/*
* A large (sparsely populated) SIF only vaddr mapping
* (used for a.o.SQ CMPL)
*/
/* Special mapping of a vaddr range to a single page (see #1931) */
/* MMU bypass mapped read only for device (requires IOMMU enabled) */
/* GVA2GPA mapped read only for device (requires IOMMU enabled) */
/* Use GVA2GPA but input is based on a phys_buf array instead of umem */
/*
* Use GVA2GPA but input is based on a page address array instead
* of umem
*/
/* Similar to FMR but input pages are 2M instead of 4K */
/* Bypass mode - special kernel mappings with no memory allocated */
/* sif_kmem based 4K page allocation - mostly for test purposes */
typedef enum sif_proxy_type {
typedef enum sif_flush_type {
/* These should be multiple of 64 bytes and densely packed: */
typedef struct sif_get_context_ext {
typedef struct sif_get_context_resp_ext {
/* Distance in bytes between descriptor elements */
/* Number of entries per block of descriptors */
/* Dist between sq hw descriptor elms, from >= v.3.3 */
typedef struct sif_alloc_pd_resp_ext {
/* The virtual collect buffer to use by this protection domain */
int cb_idx;
typedef struct sif_share_pd_resp_ext {
/* The virtual collect buffer to use by this shared protection domain */
typedef struct sif_create_cq_ext {
typedef struct sif_create_cq_resp_ext {
typedef struct sif_create_qp_ext {
typedef struct sif_create_qp_resp_ext {
typedef struct sif_modify_qp_ext
{
typedef struct sif_reg_mr_ext {
/* Used by gva_type SIFGT_ZERO - indicates psif vmap length */
/* Used by gva_type SIFGT_ZERO - indicates valid memory length */
typedef struct sif_reg_mr_resp_ext {
typedef struct sif_create_srq_ext {
typedef struct sif_create_srq_resp_ext {
typedef struct sif_create_ah_resp_ext {
/* mmap offset encoding */
enum sif_mmap_cmd {
/* Map a collect buffer - cb index as argument */
/* Map an SQ, RQ or CQ (entries) - queue index as argument */
/*
* Map a block of SQ, RQ or CQ software descriptors -
* block index as argument
*/
/* These are safe to map read-only (so far only sq_hw in use) */
/* Map a block of qp descriptors - block index as argument */
/*
* Map a block of SQ, RQ or CQ hardware descriptors -
* block index as argument
*/
};
{
}
{
}
#ifdef __cplusplus
}
#endif
#endif /* _SIF_USER_H */