Lines Matching refs:srq

462 static void post_pending_srq_wrs(struct t4_srq *srq)  in post_pending_srq_wrs()  argument
467 while (srq->pending_in_use) { in post_pending_srq_wrs()
468 pwr = &srq->pending_wrs[srq->pending_cidx]; in post_pending_srq_wrs()
469 srq->sw_rq[srq->pidx].wr_id = pwr->wr_id; in post_pending_srq_wrs()
470 srq->sw_rq[srq->pidx].valid = 1; in post_pending_srq_wrs()
474 srq->cidx, srq->pidx, srq->wq_pidx, in post_pending_srq_wrs()
475 srq->in_use, srq->size, in post_pending_srq_wrs()
478 c4iw_copy_wr_to_srq(srq, &pwr->wqe, pwr->len16); in post_pending_srq_wrs()
479 t4_srq_consume_pending_wr(srq); in post_pending_srq_wrs()
480 t4_srq_produce(srq, pwr->len16); in post_pending_srq_wrs()
485 t4_ring_srq_db(srq, idx, pwr->len16, &pwr->wqe); in post_pending_srq_wrs()
486 srq->queue[srq->size].status.host_wq_pidx = in post_pending_srq_wrs()
487 srq->wq_pidx; in post_pending_srq_wrs()
491 static u64 reap_srq_cqe(struct t4_cqe *hw_cqe, struct t4_srq *srq) in reap_srq_cqe() argument
493 int rel_idx = CQE_ABS_RQE_IDX(hw_cqe) - srq->rqt_abs_idx; in reap_srq_cqe()
496 srq->sw_rq[rel_idx].valid = 0; in reap_srq_cqe()
497 wr_id = srq->sw_rq[rel_idx].wr_id; in reap_srq_cqe()
499 if (rel_idx == srq->cidx) { in reap_srq_cqe()
501 __func__, rel_idx, srq->cidx, srq->pidx, in reap_srq_cqe()
502 srq->wq_pidx, srq->in_use, srq->size, in reap_srq_cqe()
503 (unsigned long long)srq->sw_rq[rel_idx].wr_id); in reap_srq_cqe()
504 t4_srq_consume(srq); in reap_srq_cqe()
505 while (srq->ooo_count && !srq->sw_rq[srq->cidx].valid) { in reap_srq_cqe()
507 __func__, srq->cidx, srq->pidx, in reap_srq_cqe()
508 srq->wq_pidx, srq->in_use, in reap_srq_cqe()
509 srq->size, srq->ooo_count, in reap_srq_cqe()
511 srq->sw_rq[srq->cidx].wr_id); in reap_srq_cqe()
512 t4_srq_consume_ooo(srq); in reap_srq_cqe()
514 if (srq->ooo_count == 0 && srq->pending_in_use) in reap_srq_cqe()
515 post_pending_srq_wrs(srq); in reap_srq_cqe()
518 __func__, rel_idx, srq->cidx, in reap_srq_cqe()
519 srq->pidx, srq->wq_pidx, in reap_srq_cqe()
520 srq->in_use, srq->size, in reap_srq_cqe()
521 srq->ooo_count, in reap_srq_cqe()
522 (unsigned long long)srq->sw_rq[rel_idx].wr_id); in reap_srq_cqe()
523 t4_srq_produce_ooo(srq); in reap_srq_cqe()
546 struct t4_srq *srq) in poll_cq() argument
722 if (!srq) { in poll_cq()
729 *cookie = reap_srq_cqe(hw_cqe, srq); in poll_cq()
755 struct ib_wc *wc, struct c4iw_srq *srq) in __c4iw_poll_cq_one() argument
765 srq ? &srq->wq : NULL); in __c4iw_poll_cq_one()
777 if (srq && !(srq->flags & T4_SRQ_LIMIT_SUPPORT) && srq->armed && in __c4iw_poll_cq_one()
778 srq->wq.in_use < srq->srq_limit) in __c4iw_poll_cq_one()
779 c4iw_dispatch_srq_limit_reached_event(srq); in __c4iw_poll_cq_one()
923 struct c4iw_srq *srq = NULL; in c4iw_poll_cq_one() local
936 srq = qhp->srq; in c4iw_poll_cq_one()
937 if (srq) in c4iw_poll_cq_one()
938 spin_lock(&srq->lock); in c4iw_poll_cq_one()
939 ret = __c4iw_poll_cq_one(chp, qhp, wc, srq); in c4iw_poll_cq_one()
941 if (srq) in c4iw_poll_cq_one()
942 spin_unlock(&srq->lock); in c4iw_poll_cq_one()