Lines Matching refs:srq

44 int rxe_srq_from_init(struct rxe_dev *rxe, struct rxe_srq *srq,
52 srq->ibsrq.event_handler = init->event_handler;
53 srq->ibsrq.srq_context = init->srq_context;
54 srq->limit = init->attr.srq_limit;
55 srq->srq_num = srq->elem.index;
56 srq->rq.max_wr = init->attr.max_wr;
57 srq->rq.max_sge = init->attr.max_sge;
60 srq->rq.max_sge*sizeof(struct ib_sge);
62 spin_lock_init(&srq->rq.producer_lock);
63 spin_lock_init(&srq->rq.consumer_lock);
65 q = rxe_queue_init(rxe, &srq->rq.max_wr, wqe_size,
68 rxe_dbg_srq(srq, "Unable to allocate queue\n");
76 rxe_dbg_srq(srq, "Unable to init mmap info for caller\n");
80 srq->rq.queue = q;
81 init->attr.max_wr = srq->rq.max_wr;
84 if (copy_to_user(&uresp->srq_num, &srq->srq_num,
100 int rxe_srq_chk_attr(struct rxe_dev *rxe, struct rxe_srq *srq,
103 if (srq->error) {
104 rxe_dbg_srq(srq, "in error state\n");
110 rxe_dbg_srq(srq, "max_wr(%d) > max_srq_wr(%d)\n",
116 rxe_dbg_srq(srq, "max_wr(%d) <= 0\n", attr->max_wr);
120 if (srq->limit && (attr->max_wr < srq->limit)) {
121 rxe_dbg_srq(srq, "max_wr (%d) < srq->limit (%d)\n",
122 attr->max_wr, srq->limit);
132 rxe_dbg_srq(srq, "srq_limit(%d) > max_srq_wr(%d)\n",
137 if (attr->srq_limit > srq->rq.queue->buf->index_mask) {
138 rxe_dbg_srq(srq, "srq_limit (%d) > cur limit(%d)\n",
140 srq->rq.queue->buf->index_mask);
151 int rxe_srq_from_attr(struct rxe_dev *rxe, struct rxe_srq *srq,
155 struct rxe_queue *q = srq->rq.queue;
168 srq->rq.max_sge*sizeof(struct ib_sge);
171 udata, mi, &srq->rq.producer_lock,
172 &srq->rq.consumer_lock);
176 srq->rq.max_wr = attr->max_wr;
180 srq->limit = attr->srq_limit;
186 srq->rq.queue = NULL;
192 struct rxe_srq *srq = container_of(elem, typeof(*srq), elem);
194 if (srq->pd)
195 rxe_put(srq->pd);
197 if (srq->rq.queue)
198 rxe_queue_cleanup(srq->rq.queue);