1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 #ifndef __OCRDMA_VERBS_H__
44 #define __OCRDMA_VERBS_H__
45
46 int ocrdma_post_send(struct ib_qp *, const struct ib_send_wr *,
47 const struct ib_send_wr **bad_wr);
48 int ocrdma_post_recv(struct ib_qp *, const struct ib_recv_wr *,
49 const struct ib_recv_wr **bad_wr);
50
51 int ocrdma_poll_cq(struct ib_cq *, int num_entries, struct ib_wc *wc);
52 int ocrdma_arm_cq(struct ib_cq *, enum ib_cq_notify_flags flags);
53
54 int ocrdma_query_device(struct ib_device *, struct ib_device_attr *props,
55 struct ib_udata *uhw);
56 int ocrdma_query_port(struct ib_device *, u8 port, struct ib_port_attr *props);
57 int ocrdma_modify_port(struct ib_device *, u8 port, int mask,
58 struct ib_port_modify *props);
59
60 enum rdma_protocol_type
61 ocrdma_query_protocol(struct ib_device *device, u8 port_num);
62
63 void ocrdma_get_guid(struct ocrdma_dev *, u8 *guid);
64 int ocrdma_query_pkey(struct ib_device *, u8 port, u16 index, u16 *pkey);
65
66 int ocrdma_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata);
67 void ocrdma_dealloc_ucontext(struct ib_ucontext *uctx);
68
69 int ocrdma_mmap(struct ib_ucontext *, struct vm_area_struct *vma);
70
71 int ocrdma_alloc_pd(struct ib_pd *pd, struct ib_udata *udata);
72 void ocrdma_dealloc_pd(struct ib_pd *pd, struct ib_udata *udata);
73
74 int ocrdma_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
75 struct ib_udata *udata);
76 int ocrdma_resize_cq(struct ib_cq *, int cqe, struct ib_udata *);
77 void ocrdma_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata);
78
79 struct ib_qp *ocrdma_create_qp(struct ib_pd *,
80 struct ib_qp_init_attr *attrs,
81 struct ib_udata *);
82 int _ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr,
83 int attr_mask);
84 int ocrdma_modify_qp(struct ib_qp *, struct ib_qp_attr *attr,
85 int attr_mask, struct ib_udata *udata);
86 int ocrdma_query_qp(struct ib_qp *,
87 struct ib_qp_attr *qp_attr,
88 int qp_attr_mask, struct ib_qp_init_attr *);
89 int ocrdma_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata);
90 void ocrdma_del_flush_qp(struct ocrdma_qp *qp);
91
92 int ocrdma_create_srq(struct ib_srq *srq, struct ib_srq_init_attr *attr,
93 struct ib_udata *udata);
94 int ocrdma_modify_srq(struct ib_srq *, struct ib_srq_attr *,
95 enum ib_srq_attr_mask, struct ib_udata *);
96 int ocrdma_query_srq(struct ib_srq *, struct ib_srq_attr *);
97 void ocrdma_destroy_srq(struct ib_srq *ibsrq, struct ib_udata *udata);
98 int ocrdma_post_srq_recv(struct ib_srq *, const struct ib_recv_wr *,
99 const struct ib_recv_wr **bad_recv_wr);
100
101 int ocrdma_dereg_mr(struct ib_mr *ib_mr, struct ib_udata *udata);
102 struct ib_mr *ocrdma_get_dma_mr(struct ib_pd *, int acc);
103 struct ib_mr *ocrdma_reg_user_mr(struct ib_pd *, u64 start, u64 length,
104 u64 virt, int acc, struct ib_udata *);
105 struct ib_mr *ocrdma_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type,
106 u32 max_num_sg, struct ib_udata *udata);
107 int ocrdma_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents,
108 unsigned int *sg_offset);
109
110 #endif