Lines Matching refs:srq
12 int rxe_srq_chk_attr(struct rxe_dev *rxe, struct rxe_srq *srq,
15 if (srq && srq->error) {
16 pr_warn("srq in error state\n");
32 if (srq && srq->limit && (attr->max_wr < srq->limit)) {
33 pr_warn("max_wr (%d) < srq->limit (%d)\n",
34 attr->max_wr, srq->limit);
49 if (srq && (attr->srq_limit > srq->rq.queue->buf->index_mask)) {
52 srq->rq.queue->buf->index_mask);
74 int rxe_srq_from_init(struct rxe_dev *rxe, struct rxe_srq *srq,
82 srq->ibsrq.event_handler = init->event_handler;
83 srq->ibsrq.srq_context = init->srq_context;
84 srq->limit = init->attr.srq_limit;
85 srq->srq_num = srq->pelem.index;
86 srq->rq.max_wr = init->attr.max_wr;
87 srq->rq.max_sge = init->attr.max_sge;
89 srq_wqe_size = rcv_wqe_size(srq->rq.max_sge);
91 spin_lock_init(&srq->rq.producer_lock);
92 spin_lock_init(&srq->rq.consumer_lock);
94 q = rxe_queue_init(rxe, &srq->rq.max_wr,
97 pr_warn("unable to allocate queue for srq\n");
101 srq->rq.queue = q;
112 if (copy_to_user(&uresp->srq_num, &srq->srq_num,
122 int rxe_srq_from_attr(struct rxe_dev *rxe, struct rxe_srq *srq,
127 struct rxe_queue *q = srq->rq.queue;
138 rcv_wqe_size(srq->rq.max_sge), udata, mi,
139 &srq->rq.producer_lock,
140 &srq->rq.consumer_lock);
146 srq->limit = attr->srq_limit;
152 srq->rq.queue = NULL;