xref: /openbmc/linux/drivers/infiniband/sw/rdmavt/qp.h (revision b8b350af)
1 /* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
2 /*
3  * Copyright(c) 2016 Intel Corporation.
4  */
5 
6 #ifndef DEF_RVTQP_H
7 #define DEF_RVTQP_H
8 
9 #include <rdma/rdmavt_qp.h>
10 
11 int rvt_driver_qp_init(struct rvt_dev_info *rdi);
12 void rvt_qp_exit(struct rvt_dev_info *rdi);
13 int rvt_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *init_attr,
14 		  struct ib_udata *udata);
15 int rvt_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
16 		  int attr_mask, struct ib_udata *udata);
17 int rvt_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata);
18 int rvt_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
19 		 int attr_mask, struct ib_qp_init_attr *init_attr);
20 int rvt_post_recv(struct ib_qp *ibqp, const struct ib_recv_wr *wr,
21 		  const struct ib_recv_wr **bad_wr);
22 int rvt_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
23 		  const struct ib_send_wr **bad_wr);
24 int rvt_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr,
25 		      const struct ib_recv_wr **bad_wr);
26 int rvt_wss_init(struct rvt_dev_info *rdi);
27 void rvt_wss_exit(struct rvt_dev_info *rdi);
28 int rvt_alloc_rq(struct rvt_rq *rq, u32 size, int node,
29 		 struct ib_udata *udata);
30 #endif          /* DEF_RVTQP_H */
31