sif_user.h revision 5810
6320N/A * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. 6320N/A * Redistribution and use in source and binary forms, with or without 6320N/A * modification, are permitted provided that the following conditions are met: 6320N/A * 1. Redistributions of source code must retain the above copyright notice, 6320N/A * this list of conditions and the following disclaimer. 6320N/A * 2. Redistributions in binary form must reproduce the above copyright notice, 6320N/A * this list of conditions and the following disclaimer in the documentation 6320N/A * and/or other materials provided with the distribution. 6320N/A * 3. Neither the name of the copyright holder nor the names of its contributors 6320N/A * may be used to endorse or promote products derived from this software 6320N/A * without specific prior written permission. 6320N/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 6320N/A * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 6320N/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 6320N/A * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 6320N/A * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 6320N/A * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 6320N/A * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 6320N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 6320N/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 6320N/A * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6320N/A * Userspace library for Oracle SIF Infiniband PCI Express 6320N/A * host channel adapter (HCA) 6320N/A * This file is included both from user space and kernel space so * Binary interface control: * Major version difference indicate backward incompatible changes * Minor version difference indicate that only a common subset of * features are available. * 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 * 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 * The information amended to the CQE is _only_ valid if the CQE has * been marked with SIF_WC_QP_DESTROYED. * These definitions must be kept in sync with * the ones in libsif's sif.h * 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 */ SIFMT_BYPASS,
/* Use MMU bypass in associated mmu contexts */ SIFMT_UMEM,
/* Normal default umem based user level mapping */ /* Mapping of user memory based on the process' own page table */ * A large (sparsely populated) SIF only vaddr mapping /* 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 /* 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 */ /* These should be multiple of 64 bytes and densely packed: */ /* Distance in bytes between descriptor elements */ /* Number of entries per block of descriptors */ /* Dist between sq hw descriptor elms, from >= v.3.3 */ /* The virtual collect buffer to use by this protection domain */ /* Used by gva_type SIFGT_ZERO - indicates psif vmap length */ /* Used by gva_type SIFGT_ZERO - indicates valid memory length */ /* mmap offset encoding */ /* 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