aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma/ocrdma_verbs.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_verbs.h')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_verbs.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.h b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.h
new file mode 100644
index 00000000000..e6483439f25
--- /dev/null
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.h
@@ -0,0 +1,94 @@
1/*******************************************************************
2 * This file is part of the Emulex RoCE Device Driver for *
3 * RoCE (RDMA over Converged Ethernet) adapters. *
4 * Copyright (C) 2008-2012 Emulex. All rights reserved. *
5 * EMULEX and SLI are trademarks of Emulex. *
6 * www.emulex.com *
7 * *
8 * This program is free software; you can redistribute it and/or *
9 * modify it under the terms of version 2 of the GNU General *
10 * Public License as published by the Free Software Foundation. *
11 * This program is distributed in the hope that it will be useful. *
12 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
13 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
14 * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
15 * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
16 * TO BE LEGALLY INVALID. See the GNU General Public License for *
17 * more details, a copy of which can be found in the file COPYING *
18 * included with this package. *
19 *
20 * Contact Information:
21 * linux-drivers@emulex.com
22 *
23 * Emulex
24 * 3333 Susan Street
25 * Costa Mesa, CA 92626
26 *******************************************************************/
27
28#ifndef __OCRDMA_VERBS_H__
29#define __OCRDMA_VERBS_H__
30
31#include <linux/version.h>
32int ocrdma_post_send(struct ib_qp *, struct ib_send_wr *,
33 struct ib_send_wr **bad_wr);
34int ocrdma_post_recv(struct ib_qp *, struct ib_recv_wr *,
35 struct ib_recv_wr **bad_wr);
36
37int ocrdma_poll_cq(struct ib_cq *, int num_entries, struct ib_wc *wc);
38int ocrdma_arm_cq(struct ib_cq *, enum ib_cq_notify_flags flags);
39
40int ocrdma_query_device(struct ib_device *, struct ib_device_attr *props);
41int ocrdma_query_port(struct ib_device *, u8 port, struct ib_port_attr *props);
42int ocrdma_modify_port(struct ib_device *, u8 port, int mask,
43 struct ib_port_modify *props);
44
45void ocrdma_get_guid(struct ocrdma_dev *, u8 *guid);
46int ocrdma_query_gid(struct ib_device *, u8 port,
47 int index, union ib_gid *gid);
48int ocrdma_query_pkey(struct ib_device *, u8 port, u16 index, u16 *pkey);
49
50struct ib_ucontext *ocrdma_alloc_ucontext(struct ib_device *,
51 struct ib_udata *);
52int ocrdma_dealloc_ucontext(struct ib_ucontext *);
53
54int ocrdma_mmap(struct ib_ucontext *, struct vm_area_struct *vma);
55
56struct ib_pd *ocrdma_alloc_pd(struct ib_device *,
57 struct ib_ucontext *, struct ib_udata *);
58int ocrdma_dealloc_pd(struct ib_pd *pd);
59
60struct ib_cq *ocrdma_create_cq(struct ib_device *, int entries, int vector,
61 struct ib_ucontext *, struct ib_udata *);
62int ocrdma_resize_cq(struct ib_cq *, int cqe, struct ib_udata *);
63int ocrdma_destroy_cq(struct ib_cq *);
64
65struct ib_qp *ocrdma_create_qp(struct ib_pd *,
66 struct ib_qp_init_attr *attrs,
67 struct ib_udata *);
68int _ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr,
69 int attr_mask);
70int ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr,
71 int attr_mask, struct ib_udata *udata);
72int ocrdma_query_qp(struct ib_qp *,
73 struct ib_qp_attr *qp_attr,
74 int qp_attr_mask, struct ib_qp_init_attr *);
75int ocrdma_destroy_qp(struct ib_qp *);
76
77struct ib_srq *ocrdma_create_srq(struct ib_pd *, struct ib_srq_init_attr *,
78 struct ib_udata *);
79int ocrdma_modify_srq(struct ib_srq *, struct ib_srq_attr *,
80 enum ib_srq_attr_mask, struct ib_udata *);
81int ocrdma_query_srq(struct ib_srq *, struct ib_srq_attr *);
82int ocrdma_destroy_srq(struct ib_srq *);
83int ocrdma_post_srq_recv(struct ib_srq *, struct ib_recv_wr *,
84 struct ib_recv_wr **bad_recv_wr);
85
86int ocrdma_dereg_mr(struct ib_mr *);
87struct ib_mr *ocrdma_get_dma_mr(struct ib_pd *, int acc);
88struct ib_mr *ocrdma_reg_kernel_mr(struct ib_pd *,
89 struct ib_phys_buf *buffer_list,
90 int num_phys_buf, int acc, u64 *iova_start);
91struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *, u64 start, u64 length,
92 u64 virt, int acc, struct ib_udata *);
93
94#endif /* __OCRDMA_VERBS_H__ */