Lines Matching full:struct
56 struct verbs_device;
63 struct verbs_xrcd {
64 struct ibv_xrcd xrcd;
77 struct verbs_srq {
78 struct ibv_srq srq;
81 struct verbs_xrcd *xrcd;
82 struct ibv_cq *cq;
96 struct verbs_qp {
97 struct ibv_qp qp;
99 struct verbs_xrcd *xrcd;
103 struct verbs_device_ops {
105 struct ibv_context *(*alloc_context)(struct ibv_device *device,
107 void (*free_context)(struct ibv_context *context);
110 int (*init_context)(struct verbs_device *device,
111 struct ibv_context *ctx, int cmd_fd);
112 void (*uninit_context)(struct verbs_device *device,
113 struct ibv_context *ctx);
117 struct verbs_device {
118 struct ibv_device device; /* Must be first */
119 const struct verbs_device_ops *ops;
124 static inline struct verbs_device *
125 verbs_get_device(const struct ibv_device *dev) in verbs_get_device()
127 return container_of(dev, struct verbs_device, device); in verbs_get_device()
130 typedef struct verbs_device *(*verbs_driver_init_func)(const char *uverbs_sys_path,
133 int verbs_init_cq(struct ibv_cq *cq, struct ibv_context *context,
134 struct ibv_comp_channel *channel,
136 void verbs_cleanup_cq(struct ibv_cq *cq);
137 int ibv_init_wq(struct ibv_wq *wq);
138 void ibv_cleanup_wq(struct ibv_wq *wq);
140 int ibv_cmd_get_context(struct ibv_context *context, struct ibv_get_context *cmd,
141 size_t cmd_size, struct ibv_get_context_resp *resp,
143 int ibv_cmd_query_device(struct ibv_context *context,
144 struct ibv_device_attr *device_attr,
146 struct ibv_query_device *cmd, size_t cmd_size);
147 int ibv_cmd_query_device_ex(struct ibv_context *context,
148 const struct ibv_query_device_ex_input *input,
149 struct ibv_device_attr_ex *attr, size_t attr_size,
151 struct ibv_query_device_ex *cmd,
154 struct ibv_query_device_resp_ex *resp,
157 int ibv_cmd_query_port(struct ibv_context *context, uint8_t port_num,
158 struct ibv_port_attr *port_attr,
159 struct ibv_query_port *cmd, size_t cmd_size);
160 int ibv_cmd_alloc_pd(struct ibv_context *context, struct ibv_pd *pd,
161 struct ibv_alloc_pd *cmd, size_t cmd_size,
162 struct ibv_alloc_pd_resp *resp, size_t resp_size);
163 int ibv_cmd_dealloc_pd(struct ibv_pd *pd);
164 int ibv_cmd_open_xrcd(struct ibv_context *context, struct verbs_xrcd *xrcd,
166 struct ibv_xrcd_init_attr *attr,
167 struct ibv_open_xrcd *cmd, size_t cmd_size,
168 struct ibv_open_xrcd_resp *resp, size_t resp_size);
169 int ibv_cmd_close_xrcd(struct verbs_xrcd *xrcd);
171 int ibv_cmd_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
173 struct ibv_mr *mr, struct ibv_reg_mr *cmd,
175 struct ibv_reg_mr_resp *resp, size_t resp_size);
176 int ibv_cmd_rereg_mr(struct ibv_mr *mr, uint32_t flags, void *addr,
178 struct ibv_pd *pd, struct ibv_rereg_mr *cmd,
179 size_t cmd_sz, struct ibv_rereg_mr_resp *resp,
181 int ibv_cmd_dereg_mr(struct ibv_mr *mr);
182 int ibv_cmd_alloc_mw(struct ibv_pd *pd, enum ibv_mw_type type,
183 struct ibv_mw *mw, struct ibv_alloc_mw *cmd,
185 struct ibv_alloc_mw_resp *resp, size_t resp_size);
186 int ibv_cmd_dealloc_mw(struct ibv_mw *mw,
187 struct ibv_dealloc_mw *cmd, size_t cmd_size);
188 int ibv_cmd_create_cq(struct ibv_context *context, int cqe,
189 struct ibv_comp_channel *channel,
190 int comp_vector, struct ibv_cq *cq,
191 struct ibv_create_cq *cmd, size_t cmd_size,
192 struct ibv_create_cq_resp *resp, size_t resp_size);
193 int ibv_cmd_create_cq_ex(struct ibv_context *context,
194 struct ibv_cq_init_attr_ex *cq_attr,
195 struct ibv_cq_ex *cq,
196 struct ibv_create_cq_ex *cmd,
199 struct ibv_create_cq_resp_ex *resp,
202 int ibv_cmd_poll_cq(struct ibv_cq *cq, int ne, struct ibv_wc *wc);
203 int ibv_cmd_req_notify_cq(struct ibv_cq *cq, int solicited_only);
205 int ibv_cmd_resize_cq(struct ibv_cq *cq, int cqe,
206 struct ibv_resize_cq *cmd, size_t cmd_size,
207 struct ibv_resize_cq_resp *resp, size_t resp_size);
208 int ibv_cmd_destroy_cq(struct ibv_cq *cq);
210 int ibv_cmd_create_srq(struct ibv_pd *pd,
211 struct ibv_srq *srq, struct ibv_srq_init_attr *attr,
212 struct ibv_create_srq *cmd, size_t cmd_size,
213 struct ibv_create_srq_resp *resp, size_t resp_size);
214 int ibv_cmd_create_srq_ex(struct ibv_context *context,
215 struct verbs_srq *srq, int vsrq_sz,
216 struct ibv_srq_init_attr_ex *attr_ex,
217 struct ibv_create_xsrq *cmd, size_t cmd_size,
218 struct ibv_create_srq_resp *resp, size_t resp_size);
219 int ibv_cmd_modify_srq(struct ibv_srq *srq,
220 struct ibv_srq_attr *srq_attr,
222 struct ibv_modify_srq *cmd, size_t cmd_size);
223 int ibv_cmd_query_srq(struct ibv_srq *srq,
224 struct ibv_srq_attr *srq_attr,
225 struct ibv_query_srq *cmd, size_t cmd_size);
226 int ibv_cmd_destroy_srq(struct ibv_srq *srq);
228 int ibv_cmd_create_qp(struct ibv_pd *pd,
229 struct ibv_qp *qp, struct ibv_qp_init_attr *attr,
230 struct ibv_create_qp *cmd, size_t cmd_size,
231 struct ibv_create_qp_resp *resp, size_t resp_size);
232 int ibv_cmd_create_qp_ex(struct ibv_context *context,
233 struct verbs_qp *qp, int vqp_sz,
234 struct ibv_qp_init_attr_ex *attr_ex,
235 struct ibv_create_qp *cmd, size_t cmd_size,
236 struct ibv_create_qp_resp *resp, size_t resp_size);
237 int ibv_cmd_create_qp_ex2(struct ibv_context *context,
238 struct verbs_qp *qp, int vqp_sz,
239 struct ibv_qp_init_attr_ex *qp_attr,
240 struct ibv_create_qp_ex *cmd,
243 struct ibv_create_qp_resp_ex *resp,
246 int ibv_cmd_open_qp(struct ibv_context *context,
247 struct verbs_qp *qp, int vqp_sz,
248 struct ibv_qp_open_attr *attr,
249 struct ibv_open_qp *cmd, size_t cmd_size,
250 struct ibv_create_qp_resp *resp, size_t resp_size);
251 int ibv_cmd_query_qp(struct ibv_qp *qp, struct ibv_qp_attr *qp_attr,
253 struct ibv_qp_init_attr *qp_init_attr,
254 struct ibv_query_qp *cmd, size_t cmd_size);
255 int ibv_cmd_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr,
257 struct ibv_modify_qp *cmd, size_t cmd_size);
258 int ibv_cmd_modify_qp_ex(struct ibv_qp *qp, struct ibv_qp_attr *attr,
259 int attr_mask, struct ibv_modify_qp_ex *cmd,
261 struct ibv_modify_qp_resp_ex *resp,
263 int ibv_cmd_destroy_qp(struct ibv_qp *qp);
264 int ibv_cmd_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
265 struct ibv_send_wr **bad_wr);
266 int ibv_cmd_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
267 struct ibv_recv_wr **bad_wr);
268 int ibv_cmd_post_srq_recv(struct ibv_srq *srq, struct ibv_recv_wr *wr,
269 struct ibv_recv_wr **bad_wr);
270 int ibv_cmd_create_ah(struct ibv_pd *pd, struct ibv_ah *ah,
271 struct ibv_ah_attr *attr,
272 struct ibv_create_ah_resp *resp,
274 int ibv_cmd_destroy_ah(struct ibv_ah *ah);
275 int ibv_cmd_attach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
276 int ibv_cmd_detach_mcast(struct ibv_qp *qp, const union ibv_gid *gid, uint16_t lid);
278 struct ibv_flow *ibv_cmd_create_flow(struct ibv_qp *qp,
279 struct ibv_flow_attr *flow_attr);
280 int ibv_cmd_destroy_flow(struct ibv_flow *flow_id);
281 int ibv_cmd_create_wq(struct ibv_context *context,
282 struct ibv_wq_init_attr *wq_init_attr,
283 struct ibv_wq *wq,
284 struct ibv_create_wq *cmd,
287 struct ibv_create_wq_resp *resp,
291 int ibv_cmd_modify_wq(struct ibv_wq *wq, struct ibv_wq_attr *attr,
292 struct ibv_modify_wq *cmd, size_t cmd_core_size,
294 int ibv_cmd_destroy_wq(struct ibv_wq *wq);
295 int ibv_cmd_create_rwq_ind_table(struct ibv_context *context,
296 struct ibv_rwq_ind_table_init_attr *init_attr,
297 struct ibv_rwq_ind_table *rwq_ind_table,
298 struct ibv_create_rwq_ind_table *cmd,
301 struct ibv_create_rwq_ind_table_resp *resp,
304 int ibv_cmd_destroy_rwq_ind_table(struct ibv_rwq_ind_table *rwq_ind_table);
316 static inline int verbs_get_srq_num(struct ibv_srq *srq, uint32_t *srq_num) in verbs_get_srq_num()
318 struct verbs_srq *vsrq = container_of(srq, struct verbs_srq, srq); in verbs_get_srq_num()
326 int ibv_query_gid_type(struct ibv_context *context, uint8_t port_num,