Lines Matching refs:wqe_cnt
147 stamp = ind & qp->sq.wqe_cnt ? cpu_to_be32(0x7fffffff) :
149 buf = get_send_wqe(qp, ind & (qp->sq.wqe_cnt - 1));
154 ctrl = buf = get_send_wqe(qp, n & (qp->sq.wqe_cnt - 1));
170 ctrl = wqe = get_send_wqe(qp, n & (qp->sq.wqe_cnt - 1));
195 (n & qp->sq.wqe_cnt ? cpu_to_be32(1 << 31) : 0);
203 unsigned s = qp->sq.wqe_cnt - (ind & (qp->sq.wqe_cnt - 1));
306 qp->rq.wqe_cnt = qp->rq.max_gs = 0;
312 qp->rq.wqe_cnt = roundup_pow_of_two(max(1U, cap->max_recv_wr));
317 cap->max_recv_wr = qp->rq.max_post = qp->rq.wqe_cnt;
396 qp->sq.wqe_cnt = roundup_pow_of_two(cap->max_send_wr *
400 if (qp->sq.wqe_cnt <= dev->dev->caps.max_wqes)
414 qp->buf_size = (qp->rq.wqe_cnt << qp->rq.wqe_shift) +
415 (qp->sq.wqe_cnt << qp->sq.wqe_shift);
418 qp->sq.offset = qp->rq.wqe_cnt << qp->rq.wqe_shift;
420 qp->rq.offset = qp->sq.wqe_cnt << qp->sq.wqe_shift;
425 (qp->sq.wqe_cnt - qp->sq_spare_wqes) / qp->sq_max_wqes_per_wr;
446 qp->sq.wqe_cnt = 1 << ucmd->log_sq_bb_count;
449 qp->buf_size = (qp->rq.wqe_cnt << qp->rq.wqe_shift) +
450 (qp->sq.wqe_cnt << qp->sq.wqe_shift);
545 qp->sq.wrid = kmalloc(qp->sq.wqe_cnt * sizeof (u64), GFP_KERNEL);
546 qp->rq.wrid = kmalloc(qp->rq.wqe_cnt * sizeof (u64), GFP_KERNEL);
941 if (qp->rq.wqe_cnt)
942 context->rq_size_stride = ilog2(qp->rq.wqe_cnt) << 3;
945 if (qp->sq.wqe_cnt)
946 context->sq_size_stride = ilog2(qp->sq.wqe_cnt) << 3;
1099 for (i = 0; i < qp->sq.wqe_cnt; ++i) {
1560 ctrl = wqe = get_send_wqe(qp, ind & (qp->sq.wqe_cnt - 1));
1561 qp->sq.wrid[(qp->sq.head + nreq) & (qp->sq.wqe_cnt - 1)] = wr->wr_id;
1718 (ind & qp->sq.wqe_cnt ? cpu_to_be32(1 << 31) : 0) | blh;
1781 ind = qp->rq.head & (qp->rq.wqe_cnt - 1);
1809 ind = (ind + 1) & (qp->rq.wqe_cnt - 1);
1960 qp_attr->cap.max_recv_wr = qp->rq.wqe_cnt;
1964 qp_attr->cap.max_send_wr = qp->sq.wqe_cnt;