Lines Matching refs:rq

63 	return qp->buf.buf + (n << qp->rq.wqe_shift);
79 qp->rq.next_ind = 0;
80 qp->rq.last_comp = qp->rq.max - 1;
81 qp->rq.head = 0;
82 qp->rq.tail = 0;
83 qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1);
283 qp->wrid[ind + qp->rq.max] = wr->wr_id;
348 pthread_spin_lock(&qp->rq.lock);
350 ind = qp->rq.next_ind;
353 if (wq_overflow(&qp->rq, nreq, to_mcq(qp->ibv_qp.recv_cq))) {
360 prev_wqe = qp->rq.last;
361 qp->rq.last = wqe;
371 if (wr->num_sge > qp->rq.max_gs) {
397 if (ind >= qp->rq.max)
398 ind -= qp->rq.max;
404 doorbell[0] = htonl((qp->rq.next_ind << qp->rq.wqe_shift) | size0);
415 qp->rq.next_ind = ind;
416 qp->rq.head += MTHCA_TAVOR_MAX_WQES_PER_RECV_DB;
423 doorbell[0] = htonl((qp->rq.next_ind << qp->rq.wqe_shift) | size0);
435 qp->rq.next_ind = ind;
436 qp->rq.head += nreq;
438 pthread_spin_unlock(&qp->rq.lock);
649 qp->wrid[ind + qp->rq.max] = wr->wr_id;
717 pthread_spin_lock(&qp->rq.lock);
721 ind = qp->rq.head & (qp->rq.max - 1);
724 if (wq_overflow(&qp->rq, nreq, to_mcq(qp->ibv_qp.recv_cq))) {
736 if (wr->num_sge > qp->rq.max_gs) {
752 if (i < qp->rq.max_gs) {
761 if (ind >= qp->rq.max)
762 ind -= qp->rq.max;
766 qp->rq.head += nreq;
773 *qp->rq.db = htonl(qp->rq.head & 0xffff);
776 pthread_spin_unlock(&qp->rq.lock);
788 qp->rq.max_gs = cap->max_recv_sge;
795 qp->wrid = malloc((qp->rq.max + qp->sq.max) * sizeof (uint64_t));
800 qp->rq.max_gs * sizeof (struct mthca_data_seg);
802 for (qp->rq.wqe_shift = 6; 1 << qp->rq.wqe_shift < size;
803 qp->rq.wqe_shift++)
846 qp->send_wqe_offset = align(qp->rq.max << qp->rq.wqe_shift,
865 qp->rq.max_gs * sizeof (struct mthca_data_seg)) / 16);
867 for (i = 0; i < qp->rq.max; ++i) {
869 next->nda_op = htonl(((i + 1) & (qp->rq.max - 1)) <<
870 qp->rq.wqe_shift);
874 (void *) scatter < (void *) next + (1 << qp->rq.wqe_shift);
886 for (i = 0; i < qp->rq.max; ++i) {
888 next->nda_op = htonl((((i + 1) % qp->rq.max) <<
889 qp->rq.wqe_shift) | 1);
894 qp->rq.last = get_recv_wqe(qp, qp->rq.max - 1);