Linux Audio

Check our new training course

Loading...
v4.10.11
  1/* This file is part of the Emulex RoCE Device Driver for
  2 * RoCE (RDMA over Converged Ethernet) adapters.
  3 * Copyright (C) 2012-2015 Emulex. All rights reserved.
  4 * EMULEX and SLI are trademarks of Emulex.
  5 * www.emulex.com
  6 *
  7 * This software is available to you under a choice of one of two licenses.
  8 * You may choose to be licensed under the terms of the GNU General Public
  9 * License (GPL) Version 2, available from the file COPYING in the main
 10 * directory of this source tree, or the BSD license below:
 11 *
 12 * Redistribution and use in source and binary forms, with or without
 13 * modification, are permitted provided that the following conditions
 14 * are met:
 15 *
 16 * - Redistributions of source code must retain the above copyright notice,
 17 *   this list of conditions and the following disclaimer.
 18 *
 19 * - Redistributions in binary form must reproduce the above copyright
 20 *   notice, this list of conditions and the following disclaimer in
 21 *   the documentation and/or other materials provided with the distribution.
 22 *
 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE
 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 31 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 32 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 34 *
 35 * Contact Information:
 36 * linux-drivers@emulex.com
 37 *
 38 * Emulex
 39 * 3333 Susan Street
 40 * Costa Mesa, CA 92626
 41 */
 42
 43#ifndef __OCRDMA_VERBS_H__
 44#define __OCRDMA_VERBS_H__
 45
 46int ocrdma_post_send(struct ib_qp *, struct ib_send_wr *,
 47		     struct ib_send_wr **bad_wr);
 48int ocrdma_post_recv(struct ib_qp *, struct ib_recv_wr *,
 49		     struct ib_recv_wr **bad_wr);
 50
 51int ocrdma_poll_cq(struct ib_cq *, int num_entries, struct ib_wc *wc);
 52int ocrdma_arm_cq(struct ib_cq *, enum ib_cq_notify_flags flags);
 53
 54int ocrdma_query_device(struct ib_device *, struct ib_device_attr *props,
 55			struct ib_udata *uhw);
 56int ocrdma_query_port(struct ib_device *, u8 port, struct ib_port_attr *props);
 57int ocrdma_modify_port(struct ib_device *, u8 port, int mask,
 58		       struct ib_port_modify *props);
 59
 60enum rdma_protocol_type
 61ocrdma_query_protocol(struct ib_device *device, u8 port_num);
 62
 63void ocrdma_get_guid(struct ocrdma_dev *, u8 *guid);
 64int ocrdma_query_gid(struct ib_device *, u8 port,
 65		     int index, union ib_gid *gid);
 66struct net_device *ocrdma_get_netdev(struct ib_device *device, u8 port_num);
 67int ocrdma_add_gid(struct ib_device *device,
 68		   u8 port_num,
 69		   unsigned int index,
 70		   const union ib_gid *gid,
 71		   const struct ib_gid_attr *attr,
 72		   void **context);
 73int  ocrdma_del_gid(struct ib_device *device,
 74		    u8 port_num,
 75		    unsigned int index,
 76		    void **context);
 77int ocrdma_query_pkey(struct ib_device *, u8 port, u16 index, u16 *pkey);
 78
 79struct ib_ucontext *ocrdma_alloc_ucontext(struct ib_device *,
 80					  struct ib_udata *);
 81int ocrdma_dealloc_ucontext(struct ib_ucontext *);
 82
 83int ocrdma_mmap(struct ib_ucontext *, struct vm_area_struct *vma);
 84
 85struct ib_pd *ocrdma_alloc_pd(struct ib_device *,
 86			      struct ib_ucontext *, struct ib_udata *);
 87int ocrdma_dealloc_pd(struct ib_pd *pd);
 88
 89struct ib_cq *ocrdma_create_cq(struct ib_device *ibdev,
 90			       const struct ib_cq_init_attr *attr,
 91			       struct ib_ucontext *ib_ctx,
 92			       struct ib_udata *udata);
 93int ocrdma_resize_cq(struct ib_cq *, int cqe, struct ib_udata *);
 94int ocrdma_destroy_cq(struct ib_cq *);
 95
 96struct ib_qp *ocrdma_create_qp(struct ib_pd *,
 97			       struct ib_qp_init_attr *attrs,
 98			       struct ib_udata *);
 99int _ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr,
100		      int attr_mask);
101int ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr,
102		     int attr_mask, struct ib_udata *udata);
103int ocrdma_query_qp(struct ib_qp *,
104		    struct ib_qp_attr *qp_attr,
105		    int qp_attr_mask, struct ib_qp_init_attr *);
106int ocrdma_destroy_qp(struct ib_qp *);
107void ocrdma_del_flush_qp(struct ocrdma_qp *qp);
108
109struct ib_srq *ocrdma_create_srq(struct ib_pd *, struct ib_srq_init_attr *,
110				 struct ib_udata *);
111int ocrdma_modify_srq(struct ib_srq *, struct ib_srq_attr *,
112		      enum ib_srq_attr_mask, struct ib_udata *);
113int ocrdma_query_srq(struct ib_srq *, struct ib_srq_attr *);
114int ocrdma_destroy_srq(struct ib_srq *);
115int ocrdma_post_srq_recv(struct ib_srq *, struct ib_recv_wr *,
116			 struct ib_recv_wr **bad_recv_wr);
117
118int ocrdma_dereg_mr(struct ib_mr *);
119struct ib_mr *ocrdma_get_dma_mr(struct ib_pd *, int acc);
120struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *, u64 start, u64 length,
121				 u64 virt, int acc, struct ib_udata *);
122struct ib_mr *ocrdma_alloc_mr(struct ib_pd *pd,
123			      enum ib_mr_type mr_type,
124			      u32 max_num_sg);
125int ocrdma_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents,
126		     unsigned int *sg_offset);
127
128#endif				/* __OCRDMA_VERBS_H__ */
v6.8
  1/* This file is part of the Emulex RoCE Device Driver for
  2 * RoCE (RDMA over Converged Ethernet) adapters.
  3 * Copyright (C) 2012-2015 Emulex. All rights reserved.
  4 * EMULEX and SLI are trademarks of Emulex.
  5 * www.emulex.com
  6 *
  7 * This software is available to you under a choice of one of two licenses.
  8 * You may choose to be licensed under the terms of the GNU General Public
  9 * License (GPL) Version 2, available from the file COPYING in the main
 10 * directory of this source tree, or the BSD license below:
 11 *
 12 * Redistribution and use in source and binary forms, with or without
 13 * modification, are permitted provided that the following conditions
 14 * are met:
 15 *
 16 * - Redistributions of source code must retain the above copyright notice,
 17 *   this list of conditions and the following disclaimer.
 18 *
 19 * - Redistributions in binary form must reproduce the above copyright
 20 *   notice, this list of conditions and the following disclaimer in
 21 *   the documentation and/or other materials provided with the distribution.
 22 *
 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE
 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 31 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 32 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 33 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 34 *
 35 * Contact Information:
 36 * linux-drivers@emulex.com
 37 *
 38 * Emulex
 39 * 3333 Susan Street
 40 * Costa Mesa, CA 92626
 41 */
 42
 43#ifndef __OCRDMA_VERBS_H__
 44#define __OCRDMA_VERBS_H__
 45
 46int ocrdma_post_send(struct ib_qp *, const struct ib_send_wr *,
 47		     const struct ib_send_wr **bad_wr);
 48int ocrdma_post_recv(struct ib_qp *, const struct ib_recv_wr *,
 49		     const struct ib_recv_wr **bad_wr);
 50
 51int ocrdma_poll_cq(struct ib_cq *, int num_entries, struct ib_wc *wc);
 52int ocrdma_arm_cq(struct ib_cq *, enum ib_cq_notify_flags flags);
 53
 54int ocrdma_query_device(struct ib_device *, struct ib_device_attr *props,
 55			struct ib_udata *uhw);
 56int ocrdma_query_port(struct ib_device *ibdev, u32 port,
 57		      struct ib_port_attr *props);
 
 58
 59enum rdma_protocol_type
 60ocrdma_query_protocol(struct ib_device *device, u32 port_num);
 61
 62int ocrdma_query_pkey(struct ib_device *ibdev, u32 port, u16 index, u16 *pkey);
 63
 64int ocrdma_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata);
 65void ocrdma_dealloc_ucontext(struct ib_ucontext *uctx);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 66
 67int ocrdma_mmap(struct ib_ucontext *, struct vm_area_struct *vma);
 68
 69int ocrdma_alloc_pd(struct ib_pd *pd, struct ib_udata *udata);
 70int ocrdma_dealloc_pd(struct ib_pd *pd, struct ib_udata *udata);
 71
 72int ocrdma_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
 73		     struct ib_udata *udata);
 
 
 
 74int ocrdma_resize_cq(struct ib_cq *, int cqe, struct ib_udata *);
 75int ocrdma_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata);
 76
 77int ocrdma_create_qp(struct ib_qp *qp, struct ib_qp_init_attr *attrs,
 78		     struct ib_udata *udata);
 
 79int _ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr,
 80		      int attr_mask);
 81int ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr,
 82		     int attr_mask, struct ib_udata *udata);
 83int ocrdma_query_qp(struct ib_qp *,
 84		    struct ib_qp_attr *qp_attr,
 85		    int qp_attr_mask, struct ib_qp_init_attr *);
 86int ocrdma_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata);
 87void ocrdma_del_flush_qp(struct ocrdma_qp *qp);
 88
 89int ocrdma_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *attr,
 90		      struct ib_udata *udata);
 91int ocrdma_modify_srq(struct ib_srq *, struct ib_srq_attr *,
 92		      enum ib_srq_attr_mask, struct ib_udata *);
 93int ocrdma_query_srq(struct ib_srq *, struct ib_srq_attr *);
 94int ocrdma_destroy_srq(struct ib_srq *ibsrq, struct ib_udata *udata);
 95int ocrdma_post_srq_recv(struct ib_srq *, const struct ib_recv_wr *,
 96			 const struct ib_recv_wr **bad_recv_wr);
 97
 98int ocrdma_dereg_mr(struct ib_mr *ib_mr, struct ib_udata *udata);
 99struct ib_mr *ocrdma_get_dma_mr(struct ib_pd *, int acc);
100struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *, u64 start, u64 length,
101				 u64 virt, int acc, struct ib_udata *);
102struct ib_mr *ocrdma_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type,
 
103			      u32 max_num_sg);
104int ocrdma_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents,
105		     unsigned int *sg_offset);
106
107#endif				/* __OCRDMA_VERBS_H__ */