162306a36Sopenharmony_ci/* This file is part of the Emulex RoCE Device Driver for 262306a36Sopenharmony_ci * RoCE (RDMA over Converged Ethernet) adapters. 362306a36Sopenharmony_ci * Copyright (C) 2012-2015 Emulex. All rights reserved. 462306a36Sopenharmony_ci * EMULEX and SLI are trademarks of Emulex. 562306a36Sopenharmony_ci * www.emulex.com 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * This software is available to you under a choice of one of two licenses. 862306a36Sopenharmony_ci * You may choose to be licensed under the terms of the GNU General Public 962306a36Sopenharmony_ci * License (GPL) Version 2, available from the file COPYING in the main 1062306a36Sopenharmony_ci * directory of this source tree, or the BSD license below: 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 1362306a36Sopenharmony_ci * modification, are permitted provided that the following conditions 1462306a36Sopenharmony_ci * are met: 1562306a36Sopenharmony_ci * 1662306a36Sopenharmony_ci * - Redistributions of source code must retain the above copyright notice, 1762306a36Sopenharmony_ci * this list of conditions and the following disclaimer. 1862306a36Sopenharmony_ci * 1962306a36Sopenharmony_ci * - Redistributions in binary form must reproduce the above copyright 2062306a36Sopenharmony_ci * notice, this list of conditions and the following disclaimer in 2162306a36Sopenharmony_ci * the documentation and/or other materials provided with the distribution. 2262306a36Sopenharmony_ci * 2362306a36Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 2462306a36Sopenharmony_ci * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE 2562306a36Sopenharmony_ci * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2662306a36Sopenharmony_ci * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 2762306a36Sopenharmony_ci * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2862306a36Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2962306a36Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 3062306a36Sopenharmony_ci * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 3162306a36Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 3262306a36Sopenharmony_ci * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 3362306a36Sopenharmony_ci * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3462306a36Sopenharmony_ci * 3562306a36Sopenharmony_ci * Contact Information: 3662306a36Sopenharmony_ci * linux-drivers@emulex.com 3762306a36Sopenharmony_ci * 3862306a36Sopenharmony_ci * Emulex 3962306a36Sopenharmony_ci * 3333 Susan Street 4062306a36Sopenharmony_ci * Costa Mesa, CA 92626 4162306a36Sopenharmony_ci */ 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci#ifndef __OCRDMA_VERBS_H__ 4462306a36Sopenharmony_ci#define __OCRDMA_VERBS_H__ 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ciint ocrdma_post_send(struct ib_qp *, const struct ib_send_wr *, 4762306a36Sopenharmony_ci const struct ib_send_wr **bad_wr); 4862306a36Sopenharmony_ciint ocrdma_post_recv(struct ib_qp *, const struct ib_recv_wr *, 4962306a36Sopenharmony_ci const struct ib_recv_wr **bad_wr); 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ciint ocrdma_poll_cq(struct ib_cq *, int num_entries, struct ib_wc *wc); 5262306a36Sopenharmony_ciint ocrdma_arm_cq(struct ib_cq *, enum ib_cq_notify_flags flags); 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ciint ocrdma_query_device(struct ib_device *, struct ib_device_attr *props, 5562306a36Sopenharmony_ci struct ib_udata *uhw); 5662306a36Sopenharmony_ciint ocrdma_query_port(struct ib_device *ibdev, u32 port, 5762306a36Sopenharmony_ci struct ib_port_attr *props); 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_cienum rdma_protocol_type 6062306a36Sopenharmony_ciocrdma_query_protocol(struct ib_device *device, u32 port_num); 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ciint ocrdma_query_pkey(struct ib_device *ibdev, u32 port, u16 index, u16 *pkey); 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ciint ocrdma_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata); 6562306a36Sopenharmony_civoid ocrdma_dealloc_ucontext(struct ib_ucontext *uctx); 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ciint ocrdma_mmap(struct ib_ucontext *, struct vm_area_struct *vma); 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ciint ocrdma_alloc_pd(struct ib_pd *pd, struct ib_udata *udata); 7062306a36Sopenharmony_ciint ocrdma_dealloc_pd(struct ib_pd *pd, struct ib_udata *udata); 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ciint ocrdma_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr, 7362306a36Sopenharmony_ci struct ib_udata *udata); 7462306a36Sopenharmony_ciint ocrdma_resize_cq(struct ib_cq *, int cqe, struct ib_udata *); 7562306a36Sopenharmony_ciint ocrdma_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata); 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ciint ocrdma_create_qp(struct ib_qp *qp, struct ib_qp_init_attr *attrs, 7862306a36Sopenharmony_ci struct ib_udata *udata); 7962306a36Sopenharmony_ciint _ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr, 8062306a36Sopenharmony_ci int attr_mask); 8162306a36Sopenharmony_ciint ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr, 8262306a36Sopenharmony_ci int attr_mask, struct ib_udata *udata); 8362306a36Sopenharmony_ciint ocrdma_query_qp(struct ib_qp *, 8462306a36Sopenharmony_ci struct ib_qp_attr *qp_attr, 8562306a36Sopenharmony_ci int qp_attr_mask, struct ib_qp_init_attr *); 8662306a36Sopenharmony_ciint ocrdma_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata); 8762306a36Sopenharmony_civoid ocrdma_del_flush_qp(struct ocrdma_qp *qp); 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ciint ocrdma_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *attr, 9062306a36Sopenharmony_ci struct ib_udata *udata); 9162306a36Sopenharmony_ciint ocrdma_modify_srq(struct ib_srq *, struct ib_srq_attr *, 9262306a36Sopenharmony_ci enum ib_srq_attr_mask, struct ib_udata *); 9362306a36Sopenharmony_ciint ocrdma_query_srq(struct ib_srq *, struct ib_srq_attr *); 9462306a36Sopenharmony_ciint ocrdma_destroy_srq(struct ib_srq *ibsrq, struct ib_udata *udata); 9562306a36Sopenharmony_ciint ocrdma_post_srq_recv(struct ib_srq *, const struct ib_recv_wr *, 9662306a36Sopenharmony_ci const struct ib_recv_wr **bad_recv_wr); 9762306a36Sopenharmony_ci 9862306a36Sopenharmony_ciint ocrdma_dereg_mr(struct ib_mr *ib_mr, struct ib_udata *udata); 9962306a36Sopenharmony_cistruct ib_mr *ocrdma_get_dma_mr(struct ib_pd *, int acc); 10062306a36Sopenharmony_cistruct ib_mr *ocrdma_reg_user_mr(struct ib_pd *, u64 start, u64 length, 10162306a36Sopenharmony_ci u64 virt, int acc, struct ib_udata *); 10262306a36Sopenharmony_cistruct ib_mr *ocrdma_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type, 10362306a36Sopenharmony_ci u32 max_num_sg); 10462306a36Sopenharmony_ciint ocrdma_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents, 10562306a36Sopenharmony_ci unsigned int *sg_offset); 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ci#endif /* __OCRDMA_VERBS_H__ */ 108