Lines Matching refs:rep
162 struct rpcrdma_rep *rep = container_of(cqe, struct rpcrdma_rep, in rpcrdma_wc_receive() local
171 rpcrdma_set_xdrlen(&rep->rr_hdrbuf, wc->byte_len); in rpcrdma_wc_receive()
172 rep->rr_wc_flags = wc->wc_flags; in rpcrdma_wc_receive()
173 rep->rr_inv_rkey = wc->ex.invalidate_rkey; in rpcrdma_wc_receive()
175 ib_dma_sync_single_for_cpu(rdmab_device(rep->rr_rdmabuf), in rpcrdma_wc_receive()
176 rdmab_addr(rep->rr_rdmabuf), in rpcrdma_wc_receive()
180 rpcrdma_reply_handler(rep); in rpcrdma_wc_receive()
188 rpcrdma_set_xdrlen(&rep->rr_hdrbuf, 0); in rpcrdma_wc_receive()
435 struct rpcrdma_rep *rep; in rpcrdma_ia_remove() local
459 list_for_each_entry(rep, &buf->rb_recv_bufs, rr_list) in rpcrdma_ia_remove()
460 rpcrdma_dma_unmap_regbuf(rep->rr_rdmabuf); in rpcrdma_ia_remove()
1096 struct rpcrdma_rep *rep; in rpcrdma_create_rep() local
1100 rep = kzalloc(sizeof(*rep), GFP_KERNEL); in rpcrdma_create_rep()
1101 if (rep == NULL) in rpcrdma_create_rep()
1104 rep->rr_rdmabuf = rpcrdma_alloc_regbuf(cdata->inline_rsize, in rpcrdma_create_rep()
1106 if (IS_ERR(rep->rr_rdmabuf)) { in rpcrdma_create_rep()
1107 rc = PTR_ERR(rep->rr_rdmabuf); in rpcrdma_create_rep()
1110 xdr_buf_init(&rep->rr_hdrbuf, rep->rr_rdmabuf->rg_base, in rpcrdma_create_rep()
1111 rdmab_length(rep->rr_rdmabuf)); in rpcrdma_create_rep()
1113 rep->rr_cqe.done = rpcrdma_wc_receive; in rpcrdma_create_rep()
1114 rep->rr_rxprt = r_xprt; in rpcrdma_create_rep()
1115 INIT_WORK(&rep->rr_work, rpcrdma_deferred_completion); in rpcrdma_create_rep()
1116 rep->rr_recv_wr.next = NULL; in rpcrdma_create_rep()
1117 rep->rr_recv_wr.wr_cqe = &rep->rr_cqe; in rpcrdma_create_rep()
1118 rep->rr_recv_wr.sg_list = &rep->rr_rdmabuf->rg_iov; in rpcrdma_create_rep()
1119 rep->rr_recv_wr.num_sge = 1; in rpcrdma_create_rep()
1120 rep->rr_temp = temp; in rpcrdma_create_rep()
1123 list_add(&rep->rr_list, &buf->rb_recv_bufs); in rpcrdma_create_rep()
1128 kfree(rep); in rpcrdma_create_rep()
1187 rpcrdma_destroy_rep(struct rpcrdma_rep *rep) in rpcrdma_destroy_rep() argument
1189 rpcrdma_free_regbuf(rep->rr_rdmabuf); in rpcrdma_destroy_rep()
1190 kfree(rep); in rpcrdma_destroy_rep()
1242 struct rpcrdma_rep *rep; in rpcrdma_buffer_destroy() local
1244 rep = list_first_entry(&buf->rb_recv_bufs, in rpcrdma_buffer_destroy()
1246 list_del(&rep->rr_list); in rpcrdma_buffer_destroy()
1247 rpcrdma_destroy_rep(rep); in rpcrdma_buffer_destroy()
1364 struct rpcrdma_rep *rep = req->rl_reply; in rpcrdma_buffer_put() local
1370 if (rep) { in rpcrdma_buffer_put()
1371 if (!rep->rr_temp) { in rpcrdma_buffer_put()
1372 list_add(&rep->rr_list, &buffers->rb_recv_bufs); in rpcrdma_buffer_put()
1373 rep = NULL; in rpcrdma_buffer_put()
1377 if (rep) in rpcrdma_buffer_put()
1378 rpcrdma_destroy_rep(rep); in rpcrdma_buffer_put()
1386 rpcrdma_recv_buffer_put(struct rpcrdma_rep *rep) in rpcrdma_recv_buffer_put() argument
1388 struct rpcrdma_buffer *buffers = &rep->rr_rxprt->rx_buf; in rpcrdma_recv_buffer_put()
1390 if (!rep->rr_temp) { in rpcrdma_recv_buffer_put()
1392 list_add(&rep->rr_list, &buffers->rb_recv_bufs); in rpcrdma_recv_buffer_put()
1395 rpcrdma_destroy_rep(rep); in rpcrdma_recv_buffer_put()
1530 struct rpcrdma_rep *rep; in rpcrdma_post_recvs() local
1533 rep = list_first_entry_or_null(&buf->rb_recv_bufs, in rpcrdma_post_recvs()
1535 if (likely(rep)) in rpcrdma_post_recvs()
1536 list_del(&rep->rr_list); in rpcrdma_post_recvs()
1538 if (!rep) { in rpcrdma_post_recvs()
1544 rb = rep->rr_rdmabuf; in rpcrdma_post_recvs()
1547 rpcrdma_recv_buffer_put(rep); in rpcrdma_post_recvs()
1552 trace_xprtrdma_post_recv(rep->rr_recv_wr.wr_cqe); in rpcrdma_post_recvs()
1553 rep->rr_recv_wr.next = wr; in rpcrdma_post_recvs()
1554 wr = &rep->rr_recv_wr; in rpcrdma_post_recvs()
1565 struct rpcrdma_rep *rep; in rpcrdma_post_recvs() local
1567 rep = container_of(wr, struct rpcrdma_rep, rr_recv_wr); in rpcrdma_post_recvs()
1568 rpcrdma_recv_buffer_put(rep); in rpcrdma_post_recvs()