Lines Matching refs:rep
164 struct rpcrdma_rep *rep = container_of(cqe, struct rpcrdma_rep,
169 trace_xprtrdma_wc_receive(wc, &rep->rr_cid);
175 rpcrdma_set_xdrlen(&rep->rr_hdrbuf, wc->byte_len);
176 rep->rr_wc_flags = wc->wc_flags;
177 rep->rr_inv_rkey = wc->ex.invalidate_rkey;
179 ib_dma_sync_single_for_cpu(rdmab_device(rep->rr_rdmabuf),
180 rdmab_addr(rep->rr_rdmabuf),
183 rpcrdma_reply_handler(rep);
188 rpcrdma_rep_put(&r_xprt->rx_buf, rep);
953 struct rpcrdma_rep *rep;
955 rep = kzalloc(sizeof(*rep), XPRTRDMA_GFP_FLAGS);
956 if (rep == NULL)
959 rep->rr_rdmabuf = rpcrdma_regbuf_alloc_node(ep->re_inline_recv,
962 if (!rep->rr_rdmabuf)
965 rep->rr_cid.ci_completion_id =
968 xdr_buf_init(&rep->rr_hdrbuf, rdmab_data(rep->rr_rdmabuf),
969 rdmab_length(rep->rr_rdmabuf));
970 rep->rr_cqe.done = rpcrdma_wc_receive;
971 rep->rr_rxprt = r_xprt;
972 rep->rr_recv_wr.next = NULL;
973 rep->rr_recv_wr.wr_cqe = &rep->rr_cqe;
974 rep->rr_recv_wr.sg_list = &rep->rr_rdmabuf->rg_iov;
975 rep->rr_recv_wr.num_sge = 1;
978 list_add(&rep->rr_all, &buf->rb_all_reps);
980 return rep;
983 kfree(rep);
988 static void rpcrdma_rep_free(struct rpcrdma_rep *rep)
990 rpcrdma_regbuf_free(rep->rr_rdmabuf);
991 kfree(rep);
1008 * @rep: rep to release
1011 void rpcrdma_rep_put(struct rpcrdma_buffer *buf, struct rpcrdma_rep *rep)
1013 llist_add(&rep->rr_node, &buf->rb_free_reps);
1023 struct rpcrdma_rep *rep;
1025 list_for_each_entry(rep, &buf->rb_all_reps, rr_all)
1026 rpcrdma_regbuf_dma_unmap(rep->rr_rdmabuf);
1031 struct rpcrdma_rep *rep;
1034 while ((rep = list_first_entry_or_null(&buf->rb_all_reps,
1037 list_del(&rep->rr_all);
1040 rpcrdma_rep_free(rep);
1048 * rpcrdma_buffer_create - Create initial set of req/rep objects
1353 struct rpcrdma_rep *rep;
1370 rep = rpcrdma_rep_get_locked(buf);
1371 if (!rep)
1372 rep = rpcrdma_rep_create(r_xprt);
1373 if (!rep)
1375 if (!rpcrdma_regbuf_dma_map(r_xprt, rep->rr_rdmabuf)) {
1376 rpcrdma_rep_put(buf, rep);
1380 rep->rr_cid.ci_queue_id = ep->re_attr.recv_cq->res.id;
1381 trace_xprtrdma_post_recv(&rep->rr_cid);
1382 rep->rr_recv_wr.next = wr;
1383 wr = &rep->rr_recv_wr;
1395 struct rpcrdma_rep *rep;
1397 rep = container_of(wr, struct rpcrdma_rep, rr_recv_wr);
1399 rpcrdma_rep_put(buf, rep);