Lines Matching refs:init
59 int rxe_qp_chk_init(struct rxe_dev *rxe, struct ib_qp_init_attr *init)
61 struct ib_qp_cap *cap = &init->cap;
63 int port_num = init->port_num;
65 if (!init->recv_cq || !init->send_cq) {
70 if (rxe_qp_chk_cap(rxe, cap, !!init->srq))
73 if (init->qp_type == IB_QPT_SMI || init->qp_type == IB_QPT_GSI) {
81 if (init->qp_type == IB_QPT_SMI && port->qp_smi_index) {
86 if (init->qp_type == IB_QPT_GSI && port->qp_gsi_index) {
150 struct ib_qp_init_attr *init)
155 qp->sq_sig_type = init->sq_sig_type;
162 switch (init->qp_type) {
166 qp->attr.port_num = init->port_num;
172 qp->attr.port_num = init->port_num;
203 struct ib_qp_init_attr *init, struct ib_udata *udata,
223 qp->sq.max_wr = init->cap.max_send_wr;
226 wqe_size = max_t(int, init->cap.max_send_sge * sizeof(struct ib_sge),
227 init->cap.max_inline_data);
228 qp->sq.max_sge = init->cap.max_send_sge =
230 qp->sq.max_inline = init->cap.max_inline_data = wqe_size;
257 if (init->qp_type == IB_QPT_RC) {
265 struct ib_qp_init_attr *init,
273 qp->rq.max_wr = init->cap.max_recv_wr;
274 qp->rq.max_sge = init->cap.max_recv_sge;
309 struct ib_qp_init_attr *init,
315 struct rxe_cq *rcq = to_rcq(init->recv_cq);
316 struct rxe_cq *scq = to_rcq(init->send_cq);
317 struct rxe_srq *srq = init->srq ? to_rsrq(init->srq) : NULL;
330 rxe_qp_init_misc(rxe, qp, init);
332 err = rxe_qp_init_req(rxe, qp, init, udata, uresp);
336 err = rxe_qp_init_resp(rxe, qp, init, udata, uresp);
363 int rxe_qp_to_init(struct rxe_qp *qp, struct ib_qp_init_attr *init)
365 init->event_handler = qp->ibqp.event_handler;
366 init->qp_context = qp->ibqp.qp_context;
367 init->send_cq = qp->ibqp.send_cq;
368 init->recv_cq = qp->ibqp.recv_cq;
369 init->srq = qp->ibqp.srq;
371 init->cap.max_send_wr = qp->sq.max_wr;
372 init->cap.max_send_sge = qp->sq.max_sge;
373 init->cap.max_inline_data = qp->sq.max_inline;
376 init->cap.max_recv_wr = qp->rq.max_wr;
377 init->cap.max_recv_sge = qp->rq.max_sge;
380 init->sq_sig_type = qp->sq_sig_type;
382 init->qp_type = qp->ibqp.qp_type;
383 init->port_num = 1;