Lines Matching refs:rep

154 	struct rpcrdma_rep *rep = container_of(cqe, struct rpcrdma_rep,  in rpcrdma_wc_receive()  local
156 struct rpcrdma_xprt *r_xprt = rep->rr_rxprt; in rpcrdma_wc_receive()
165 rpcrdma_set_xdrlen(&rep->rr_hdrbuf, wc->byte_len); in rpcrdma_wc_receive()
166 rep->rr_wc_flags = wc->wc_flags; in rpcrdma_wc_receive()
167 rep->rr_inv_rkey = wc->ex.invalidate_rkey; in rpcrdma_wc_receive()
169 ib_dma_sync_single_for_cpu(rdmab_device(rep->rr_rdmabuf), in rpcrdma_wc_receive()
170 rdmab_addr(rep->rr_rdmabuf), in rpcrdma_wc_receive()
174 rpcrdma_reply_handler(rep); in rpcrdma_wc_receive()
178 rpcrdma_recv_buffer_put(rep); in rpcrdma_wc_receive()
1048 struct rpcrdma_rep *rep; in rpcrdma_rep_create() local
1050 rep = kzalloc(sizeof(*rep), GFP_KERNEL); in rpcrdma_rep_create()
1051 if (rep == NULL) in rpcrdma_rep_create()
1054 rep->rr_rdmabuf = rpcrdma_regbuf_alloc(r_xprt->rx_ep.rep_inline_recv, in rpcrdma_rep_create()
1056 if (!rep->rr_rdmabuf) in rpcrdma_rep_create()
1059 xdr_buf_init(&rep->rr_hdrbuf, rdmab_data(rep->rr_rdmabuf), in rpcrdma_rep_create()
1060 rdmab_length(rep->rr_rdmabuf)); in rpcrdma_rep_create()
1061 rep->rr_cqe.done = rpcrdma_wc_receive; in rpcrdma_rep_create()
1062 rep->rr_rxprt = r_xprt; in rpcrdma_rep_create()
1063 rep->rr_recv_wr.next = NULL; in rpcrdma_rep_create()
1064 rep->rr_recv_wr.wr_cqe = &rep->rr_cqe; in rpcrdma_rep_create()
1065 rep->rr_recv_wr.sg_list = &rep->rr_rdmabuf->rg_iov; in rpcrdma_rep_create()
1066 rep->rr_recv_wr.num_sge = 1; in rpcrdma_rep_create()
1067 rep->rr_temp = temp; in rpcrdma_rep_create()
1068 return rep; in rpcrdma_rep_create()
1071 kfree(rep); in rpcrdma_rep_create()
1076 static void rpcrdma_rep_destroy(struct rpcrdma_rep *rep) in rpcrdma_rep_destroy() argument
1078 rpcrdma_regbuf_free(rep->rr_rdmabuf); in rpcrdma_rep_destroy()
1079 kfree(rep); in rpcrdma_rep_destroy()
1094 struct rpcrdma_rep *rep) in rpcrdma_rep_put() argument
1096 if (!rep->rr_temp) in rpcrdma_rep_put()
1097 llist_add(&rep->rr_node, &buf->rb_free_reps); in rpcrdma_rep_put()
1099 rpcrdma_rep_destroy(rep); in rpcrdma_rep_put()
1104 struct rpcrdma_rep *rep; in rpcrdma_reps_destroy() local
1106 while ((rep = rpcrdma_rep_get_locked(buf)) != NULL) in rpcrdma_reps_destroy()
1107 rpcrdma_rep_destroy(rep); in rpcrdma_reps_destroy()
1321 void rpcrdma_recv_buffer_put(struct rpcrdma_rep *rep) in rpcrdma_recv_buffer_put() argument
1323 rpcrdma_rep_put(&rep->rr_rxprt->rx_buf, rep); in rpcrdma_recv_buffer_put()
1464 struct rpcrdma_rep *rep; in rpcrdma_post_recvs() local
1480 rep = rpcrdma_rep_get_locked(buf); in rpcrdma_post_recvs()
1481 if (!rep) in rpcrdma_post_recvs()
1482 rep = rpcrdma_rep_create(r_xprt, temp); in rpcrdma_post_recvs()
1483 if (!rep) in rpcrdma_post_recvs()
1486 rep->rr_recv_wr.next = wr; in rpcrdma_post_recvs()
1487 wr = &rep->rr_recv_wr; in rpcrdma_post_recvs()
1494 rep = container_of(i, struct rpcrdma_rep, rr_recv_wr); in rpcrdma_post_recvs()
1496 if (!rpcrdma_regbuf_dma_map(r_xprt, rep->rr_rdmabuf)) in rpcrdma_post_recvs()
1499 trace_xprtrdma_post_recv(rep); in rpcrdma_post_recvs()
1509 struct rpcrdma_rep *rep; in rpcrdma_post_recvs() local
1511 rep = container_of(wr, struct rpcrdma_rep, rr_recv_wr); in rpcrdma_post_recvs()
1513 rpcrdma_recv_buffer_put(rep); in rpcrdma_post_recvs()
1522 rep = container_of(i, struct rpcrdma_rep, rr_recv_wr); in rpcrdma_post_recvs()
1524 rpcrdma_recv_buffer_put(rep); in rpcrdma_post_recvs()