• Home
  • Raw
  • Download

Lines Matching refs:qp

542 	struct mthca_qp *qp;  in mthca_create_qp()  local
555 qp = kmalloc(sizeof *qp, GFP_KERNEL); in mthca_create_qp()
556 if (!qp) in mthca_create_qp()
563 kfree(qp); in mthca_create_qp()
571 kfree(qp); in mthca_create_qp()
583 kfree(qp); in mthca_create_qp()
587 qp->mr.ibmr.lkey = ucmd.lkey; in mthca_create_qp()
588 qp->sq.db_index = ucmd.sq_db_index; in mthca_create_qp()
589 qp->rq.db_index = ucmd.rq_db_index; in mthca_create_qp()
596 &init_attr->cap, qp); in mthca_create_qp()
611 qp->ibqp.qp_num = qp->qpn; in mthca_create_qp()
621 qp = kmalloc(sizeof (struct mthca_sqp), GFP_KERNEL); in mthca_create_qp()
622 if (!qp) in mthca_create_qp()
625 qp->ibqp.qp_num = init_attr->qp_type == IB_QPT_SMI ? 0 : 1; in mthca_create_qp()
631 qp->ibqp.qp_num, init_attr->port_num, in mthca_create_qp()
632 to_msqp(qp)); in mthca_create_qp()
641 kfree(qp); in mthca_create_qp()
645 init_attr->cap.max_send_wr = qp->sq.max; in mthca_create_qp()
646 init_attr->cap.max_recv_wr = qp->rq.max; in mthca_create_qp()
647 init_attr->cap.max_send_sge = qp->sq.max_gs; in mthca_create_qp()
648 init_attr->cap.max_recv_sge = qp->rq.max_gs; in mthca_create_qp()
649 init_attr->cap.max_inline_data = qp->max_inline_data; in mthca_create_qp()
651 return &qp->ibqp; in mthca_create_qp()
654 static int mthca_destroy_qp(struct ib_qp *qp) in mthca_destroy_qp() argument
656 if (qp->uobject) { in mthca_destroy_qp()
657 mthca_unmap_user_db(to_mdev(qp->device), in mthca_destroy_qp()
658 &to_mucontext(qp->uobject->context)->uar, in mthca_destroy_qp()
659 to_mucontext(qp->uobject->context)->db_tab, in mthca_destroy_qp()
660 to_mqp(qp)->sq.db_index); in mthca_destroy_qp()
661 mthca_unmap_user_db(to_mdev(qp->device), in mthca_destroy_qp()
662 &to_mucontext(qp->uobject->context)->uar, in mthca_destroy_qp()
663 to_mucontext(qp->uobject->context)->db_tab, in mthca_destroy_qp()
664 to_mqp(qp)->rq.db_index); in mthca_destroy_qp()
666 mthca_free_qp(to_mdev(qp->device), to_mqp(qp)); in mthca_destroy_qp()
667 kfree(qp); in mthca_destroy_qp()