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()
1256 struct qedr_srq *srq, struct ib_udata *udata) in qedr_copy_srq_uresp() argument
1261 uresp.srq_id = srq->srq_id; in qedr_copy_srq_uresp()
1372 if (attrs->srq) in qedr_set_common_qp_params()
1373 qp->srq = get_qedr_srq(attrs->srq); in qedr_set_common_qp_params()
1387 qp->state, qp->signaled, (attrs->srq) ? 1 : 0); in qedr_set_common_qp_params()
1447 static void qedr_free_srq_user_params(struct qedr_srq *srq) in qedr_free_srq_user_params() argument
1449 qedr_free_pbl(srq->dev, &srq->usrq.pbl_info, srq->usrq.pbl_tbl); in qedr_free_srq_user_params()
1450 ib_umem_release(srq->usrq.umem); in qedr_free_srq_user_params()
1451 ib_umem_release(srq->prod_umem); in qedr_free_srq_user_params()
1454 static void qedr_free_srq_kernel_params(struct qedr_srq *srq) in qedr_free_srq_kernel_params() argument
1456 struct qedr_srq_hwq_info *hw_srq = &srq->hw_srq; in qedr_free_srq_kernel_params()
1457 struct qedr_dev *dev = srq->dev; in qedr_free_srq_kernel_params()
1467 struct qedr_srq *srq, in qedr_init_srq_user_params() argument
1474 rc = qedr_init_user_queue(udata, srq->dev, &srq->usrq, ureq->srq_addr, in qedr_init_srq_user_params()
1479 srq->prod_umem = ib_umem_get(srq->ibsrq.device, ureq->prod_pair_addr, in qedr_init_srq_user_params()
1481 if (IS_ERR(srq->prod_umem)) { in qedr_init_srq_user_params()
1482 qedr_free_pbl(srq->dev, &srq->usrq.pbl_info, srq->usrq.pbl_tbl); in qedr_init_srq_user_params()
1483 ib_umem_release(srq->usrq.umem); in qedr_init_srq_user_params()
1484 DP_ERR(srq->dev, in qedr_init_srq_user_params()
1486 PTR_ERR(srq->prod_umem)); in qedr_init_srq_user_params()
1487 return PTR_ERR(srq->prod_umem); in qedr_init_srq_user_params()
1490 sg = srq->prod_umem->sgt_append.sgt.sgl; in qedr_init_srq_user_params()
1491 srq->hw_srq.phy_prod_pair_addr = sg_dma_address(sg); in qedr_init_srq_user_params()
1496 static int qedr_alloc_srq_kernel_params(struct qedr_srq *srq, in qedr_alloc_srq_kernel_params() argument
1500 struct qedr_srq_hwq_info *hw_srq = &srq->hw_srq; in qedr_alloc_srq_kernel_params()
1553 struct qedr_srq *srq = get_qedr_srq(ibsrq); in qedr_create_srq() local
1568 srq->dev = dev; in qedr_create_srq()
1569 srq->is_xrc = (init_attr->srq_type == IB_SRQT_XRC); in qedr_create_srq()
1570 hw_srq = &srq->hw_srq; in qedr_create_srq()
1571 spin_lock_init(&srq->lock); in qedr_create_srq()
1584 rc = qedr_init_srq_user_params(udata, srq, &ureq, 0); in qedr_create_srq()
1588 page_cnt = srq->usrq.pbl_info.num_pbes; in qedr_create_srq()
1589 pbl_base_addr = srq->usrq.pbl_tbl->pa; in qedr_create_srq()
1595 rc = qedr_alloc_srq_kernel_params(srq, dev, init_attr); in qedr_create_srq()
1611 if (srq->is_xrc) { in qedr_create_srq()
1624 srq->srq_id = out_params.srq_id; in qedr_create_srq()
1627 rc = qedr_copy_srq_uresp(dev, srq, udata); in qedr_create_srq()
1632 rc = xa_insert_irq(&dev->srqs, srq->srq_id, srq, GFP_KERNEL); in qedr_create_srq()
1637 "create srq: created srq with srq_id=0x%0x\n", srq->srq_id); in qedr_create_srq()
1641 destroy_in_params.srq_id = srq->srq_id; in qedr_create_srq()
1646 qedr_free_srq_user_params(srq); in qedr_create_srq()
1648 qedr_free_srq_kernel_params(srq); in qedr_create_srq()
1657 struct qedr_srq *srq = get_qedr_srq(ibsrq); in qedr_destroy_srq() local
1659 xa_erase_irq(&dev->srqs, srq->srq_id); in qedr_destroy_srq()
1660 in_params.srq_id = srq->srq_id; in qedr_destroy_srq()
1661 in_params.is_xrc = srq->is_xrc; in qedr_destroy_srq()
1665 qedr_free_srq_user_params(srq); in qedr_destroy_srq()
1667 qedr_free_srq_kernel_params(srq); in qedr_destroy_srq()
1671 srq->srq_id); in qedr_destroy_srq()
1680 struct qedr_srq *srq = get_qedr_srq(ibsrq); in qedr_modify_srq() local
1686 attr_mask, srq); in qedr_modify_srq()
1691 if (attr->srq_limit >= srq->hw_srq.max_wr) { in qedr_modify_srq()
1694 attr->srq_limit, srq->hw_srq.max_wr); in qedr_modify_srq()
1698 in_params.srq_id = srq->srq_id; in qedr_modify_srq()
1705 srq->srq_limit = attr->srq_limit; in qedr_modify_srq()
1708 "modify srq: modified srq with srq_id=0x%0x\n", srq->srq_id); in qedr_modify_srq()
1757 params->srq_id = qp->srq->srq_id; in qedr_init_common_qp_in_params()
1791 if (!qp->srq) { in qedr_iwarp_populate_user_qp()
2143 if (!qp->srq) { in qedr_cleanup_kernel()
3825 struct qedr_srq *srq = get_qedr_srq(ibsrq); in qedr_post_srq_recv() local
3827 struct qedr_dev *dev = srq->dev; in qedr_post_srq_recv()
3833 spin_lock_irqsave(&srq->lock, flags); in qedr_post_srq_recv()
3835 hw_srq = &srq->hw_srq; in qedr_post_srq_recv()
3836 pbl = &srq->hw_srq.pbl; in qedr_post_srq_recv()
3842 wr->num_sge > srq->hw_srq.max_sges) { in qedr_post_srq_recv()
3846 wr->num_sge, srq->hw_srq.max_sges); in qedr_post_srq_recv()
3857 srq->hw_srq.wr_prod_cnt++; in qedr_post_srq_recv()
3888 srq->hw_srq.virt_prod_pair_addr->sge_prod = cpu_to_le32(hw_srq->sge_prod); in qedr_post_srq_recv()
3891 srq->hw_srq.virt_prod_pair_addr->wqe_prod = cpu_to_le32(hw_srq->wqe_prod); in qedr_post_srq_recv()
3898 spin_unlock_irqrestore(&srq->lock, flags); in qedr_post_srq_recv()
4288 struct qedr_srq *srq = qp->srq; in process_resp_one_srq() local
4305 atomic_inc(&srq->hw_srq.wr_cons_cnt); in process_resp_one_srq()