Lines Matching refs:rep
83 static void rpcrdma_rep_destroy(struct rpcrdma_rep *rep);
184 struct rpcrdma_rep *rep = container_of(cqe, struct rpcrdma_rep,
195 rpcrdma_set_xdrlen(&rep->rr_hdrbuf, wc->byte_len);
196 rep->rr_wc_flags = wc->wc_flags;
197 rep->rr_inv_rkey = wc->ex.invalidate_rkey;
199 ib_dma_sync_single_for_cpu(rdmab_device(rep->rr_rdmabuf),
200 rdmab_addr(rep->rr_rdmabuf),
203 rpcrdma_reply_handler(rep);
208 rpcrdma_rep_destroy(rep);
964 struct rpcrdma_rep *rep;
966 rep = kzalloc(sizeof(*rep), GFP_KERNEL);
967 if (rep == NULL)
970 rep->rr_rdmabuf = rpcrdma_regbuf_alloc(r_xprt->rx_ep->re_inline_recv,
972 if (!rep->rr_rdmabuf)
975 xdr_buf_init(&rep->rr_hdrbuf, rdmab_data(rep->rr_rdmabuf),
976 rdmab_length(rep->rr_rdmabuf));
977 rep->rr_cqe.done = rpcrdma_wc_receive;
978 rep->rr_rxprt = r_xprt;
979 rep->rr_recv_wr.next = NULL;
980 rep->rr_recv_wr.wr_cqe = &rep->rr_cqe;
981 rep->rr_recv_wr.sg_list = &rep->rr_rdmabuf->rg_iov;
982 rep->rr_recv_wr.num_sge = 1;
983 rep->rr_temp = temp;
984 list_add(&rep->rr_all, &r_xprt->rx_buf.rb_all_reps);
985 return rep;
988 kfree(rep);
996 static void rpcrdma_rep_destroy(struct rpcrdma_rep *rep)
998 list_del(&rep->rr_all);
999 rpcrdma_regbuf_free(rep->rr_rdmabuf);
1000 kfree(rep);
1015 struct rpcrdma_rep *rep)
1017 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);
1027 rep->rr_temp = true;
1033 struct rpcrdma_rep *rep;
1035 while ((rep = rpcrdma_rep_get_locked(buf)) != NULL)
1036 rpcrdma_rep_destroy(rep);
1040 * rpcrdma_buffer_create - Create initial set of req/rep objects
1249 * @rep: rep to release
1253 void rpcrdma_recv_buffer_put(struct rpcrdma_rep *rep)
1255 rpcrdma_rep_put(&rep->rr_rxprt->rx_buf, rep);
1399 struct rpcrdma_rep *rep;
1414 rep = rpcrdma_rep_get_locked(buf);
1415 if (rep && rep->rr_temp) {
1416 rpcrdma_rep_destroy(rep);
1419 if (!rep)
1420 rep = rpcrdma_rep_create(r_xprt, temp);
1421 if (!rep)
1423 if (!rpcrdma_regbuf_dma_map(r_xprt, rep->rr_rdmabuf)) {
1424 rpcrdma_rep_put(buf, rep);
1428 trace_xprtrdma_post_recv(rep);
1429 rep->rr_recv_wr.next = wr;
1430 wr = &rep->rr_recv_wr;
1443 struct rpcrdma_rep *rep;
1445 rep = container_of(wr, struct rpcrdma_rep, rr_recv_wr);
1447 rpcrdma_recv_buffer_put(rep);