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 #ifndef USNIC_IB_VERBS_H_
35 #define USNIC_IB_VERBS_H_
36
37 #include "usnic_ib.h"
38
39 enum rdma_link_layer usnic_ib_port_link_layer(struct ib_device *device,
40 u8 port_num);
41 int usnic_ib_query_device(struct ib_device *ibdev,
42 struct ib_device_attr *props,
43 struct ib_udata *uhw);
44 int usnic_ib_query_port(struct ib_device *ibdev, u8 port,
45 struct ib_port_attr *props);
46 int usnic_ib_query_qp(struct ib_qp *qp, struct ib_qp_attr *qp_attr,
47 int qp_attr_mask,
48 struct ib_qp_init_attr *qp_init_attr);
49 int usnic_ib_query_gid(struct ib_device *ibdev, u8 port, int index,
50 union ib_gid *gid);
51 int usnic_ib_query_pkey(struct ib_device *ibdev, u8 port, u16 index,
52 u16 *pkey);
53 int usnic_ib_alloc_pd(struct ib_pd *ibpd, struct ib_udata *udata);
54 void usnic_ib_dealloc_pd(struct ib_pd *pd, struct ib_udata *udata);
55 struct ib_qp *usnic_ib_create_qp(struct ib_pd *pd,
56 struct ib_qp_init_attr *init_attr,
57 struct ib_udata *udata);
58 int usnic_ib_destroy_qp(struct ib_qp *qp, struct ib_udata *udata);
59 int usnic_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
60 int attr_mask, struct ib_udata *udata);
61 int usnic_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
62 struct ib_udata *udata);
63 void usnic_ib_destroy_cq(struct ib_cq *cq, struct ib_udata *udata);
64 struct ib_mr *usnic_ib_reg_mr(struct ib_pd *pd, u64 start, u64 length,
65 u64 virt_addr, int access_flags,
66 struct ib_udata *udata);
67 int usnic_ib_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata);
68 int usnic_ib_alloc_ucontext(struct ib_ucontext *uctx, struct ib_udata *udata);
69 void usnic_ib_dealloc_ucontext(struct ib_ucontext *ibcontext);
70 int usnic_ib_mmap(struct ib_ucontext *context,
71 struct vm_area_struct *vma);
72 #endif