Lines Matching refs:srq

102 	struct qedr_srq *srq = get_qedr_srq(ibsrq);  in qedr_query_srq()  local
104 srq_attr->srq_limit = srq->srq_limit; in qedr_query_srq()
1255 struct qedr_srq *srq, struct ib_udata *udata) in qedr_copy_srq_uresp() argument
1260 uresp.srq_id = srq->srq_id; in qedr_copy_srq_uresp()
1371 if (attrs->srq) in qedr_set_common_qp_params()
1372 qp->srq = get_qedr_srq(attrs->srq); in qedr_set_common_qp_params()
1386 qp->state, qp->signaled, (attrs->srq) ? 1 : 0); in qedr_set_common_qp_params()
1446 static void qedr_free_srq_user_params(struct qedr_srq *srq) in qedr_free_srq_user_params() argument
1448 qedr_free_pbl(srq->dev, &srq->usrq.pbl_info, srq->usrq.pbl_tbl); in qedr_free_srq_user_params()
1449 ib_umem_release(srq->usrq.umem); in qedr_free_srq_user_params()
1450 ib_umem_release(srq->prod_umem); in qedr_free_srq_user_params()
1453 static void qedr_free_srq_kernel_params(struct qedr_srq *srq) in qedr_free_srq_kernel_params() argument
1455 struct qedr_srq_hwq_info *hw_srq = &srq->hw_srq; in qedr_free_srq_kernel_params()
1456 struct qedr_dev *dev = srq->dev; in qedr_free_srq_kernel_params()
1466 struct qedr_srq *srq, in qedr_init_srq_user_params() argument
1473 rc = qedr_init_user_queue(udata, srq->dev, &srq->usrq, ureq->srq_addr, in qedr_init_srq_user_params()
1478 srq->prod_umem = ib_umem_get(srq->ibsrq.device, ureq->prod_pair_addr, in qedr_init_srq_user_params()
1480 if (IS_ERR(srq->prod_umem)) { in qedr_init_srq_user_params()
1481 qedr_free_pbl(srq->dev, &srq->usrq.pbl_info, srq->usrq.pbl_tbl); in qedr_init_srq_user_params()
1482 ib_umem_release(srq->usrq.umem); in qedr_init_srq_user_params()
1483 DP_ERR(srq->dev, in qedr_init_srq_user_params()
1485 PTR_ERR(srq->prod_umem)); in qedr_init_srq_user_params()
1486 return PTR_ERR(srq->prod_umem); in qedr_init_srq_user_params()
1489 sg = srq->prod_umem->sgt_append.sgt.sgl; in qedr_init_srq_user_params()
1490 srq->hw_srq.phy_prod_pair_addr = sg_dma_address(sg); in qedr_init_srq_user_params()
1495 static int qedr_alloc_srq_kernel_params(struct qedr_srq *srq, in qedr_alloc_srq_kernel_params() argument
1499 struct qedr_srq_hwq_info *hw_srq = &srq->hw_srq; in qedr_alloc_srq_kernel_params()
1552 struct qedr_srq *srq = get_qedr_srq(ibsrq); in qedr_create_srq() local
1567 srq->dev = dev; in qedr_create_srq()
1568 srq->is_xrc = (init_attr->srq_type == IB_SRQT_XRC); in qedr_create_srq()
1569 hw_srq = &srq->hw_srq; in qedr_create_srq()
1570 spin_lock_init(&srq->lock); in qedr_create_srq()
1583 rc = qedr_init_srq_user_params(udata, srq, &ureq, 0); in qedr_create_srq()
1587 page_cnt = srq->usrq.pbl_info.num_pbes; in qedr_create_srq()
1588 pbl_base_addr = srq->usrq.pbl_tbl->pa; in qedr_create_srq()
1594 rc = qedr_alloc_srq_kernel_params(srq, dev, init_attr); in qedr_create_srq()
1610 if (srq->is_xrc) { in qedr_create_srq()
1623 srq->srq_id = out_params.srq_id; in qedr_create_srq()
1626 rc = qedr_copy_srq_uresp(dev, srq, udata); in qedr_create_srq()
1631 rc = xa_insert_irq(&dev->srqs, srq->srq_id, srq, GFP_KERNEL); in qedr_create_srq()
1636 "create srq: created srq with srq_id=0x%0x\n", srq->srq_id); in qedr_create_srq()
1640 destroy_in_params.srq_id = srq->srq_id; in qedr_create_srq()
1645 qedr_free_srq_user_params(srq); in qedr_create_srq()
1647 qedr_free_srq_kernel_params(srq); in qedr_create_srq()
1656 struct qedr_srq *srq = get_qedr_srq(ibsrq); in qedr_destroy_srq() local
1658 xa_erase_irq(&dev->srqs, srq->srq_id); in qedr_destroy_srq()
1659 in_params.srq_id = srq->srq_id; in qedr_destroy_srq()
1660 in_params.is_xrc = srq->is_xrc; in qedr_destroy_srq()
1664 qedr_free_srq_user_params(srq); in qedr_destroy_srq()
1666 qedr_free_srq_kernel_params(srq); in qedr_destroy_srq()
1670 srq->srq_id); in qedr_destroy_srq()
1679 struct qedr_srq *srq = get_qedr_srq(ibsrq); in qedr_modify_srq() local
1685 attr_mask, srq); in qedr_modify_srq()
1690 if (attr->srq_limit >= srq->hw_srq.max_wr) { in qedr_modify_srq()
1693 attr->srq_limit, srq->hw_srq.max_wr); in qedr_modify_srq()
1697 in_params.srq_id = srq->srq_id; in qedr_modify_srq()
1704 srq->srq_limit = attr->srq_limit; in qedr_modify_srq()
1707 "modify srq: modified srq with srq_id=0x%0x\n", srq->srq_id); in qedr_modify_srq()
1756 params->srq_id = qp->srq->srq_id; in qedr_init_common_qp_in_params()
1790 if (!qp->srq) { in qedr_iwarp_populate_user_qp()
2140 if (!qp->srq) { in qedr_cleanup_kernel()
3818 struct qedr_srq *srq = get_qedr_srq(ibsrq); in qedr_post_srq_recv() local
3820 struct qedr_dev *dev = srq->dev; in qedr_post_srq_recv()
3826 spin_lock_irqsave(&srq->lock, flags); in qedr_post_srq_recv()
3828 hw_srq = &srq->hw_srq; in qedr_post_srq_recv()
3829 pbl = &srq->hw_srq.pbl; in qedr_post_srq_recv()
3835 wr->num_sge > srq->hw_srq.max_sges) { in qedr_post_srq_recv()
3839 wr->num_sge, srq->hw_srq.max_sges); in qedr_post_srq_recv()
3850 srq->hw_srq.wr_prod_cnt++; in qedr_post_srq_recv()
3881 srq->hw_srq.virt_prod_pair_addr->sge_prod = cpu_to_le32(hw_srq->sge_prod); in qedr_post_srq_recv()
3884 srq->hw_srq.virt_prod_pair_addr->wqe_prod = cpu_to_le32(hw_srq->wqe_prod); in qedr_post_srq_recv()
3891 spin_unlock_irqrestore(&srq->lock, flags); in qedr_post_srq_recv()
4281 struct qedr_srq *srq = qp->srq; in process_resp_one_srq() local
4298 atomic_inc(&srq->hw_srq.wr_cons_cnt); in process_resp_one_srq()