Lines Matching refs:req

57 static void xprt_free_allocation(struct rpc_rqst *req)  in xprt_free_allocation()  argument
61 dprintk("RPC: free allocations for req= %p\n", req); in xprt_free_allocation()
62 WARN_ON_ONCE(test_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state)); in xprt_free_allocation()
63 xbufp = &req->rq_rcv_buf; in xprt_free_allocation()
65 xbufp = &req->rq_snd_buf; in xprt_free_allocation()
67 kfree(req); in xprt_free_allocation()
92 struct rpc_rqst *req, *tmp; in xprt_setup_backchannel() local
109 req = kzalloc(sizeof(struct rpc_rqst), GFP_KERNEL); in xprt_setup_backchannel()
110 if (req == NULL) { in xprt_setup_backchannel()
116 dprintk("RPC: adding req= %p\n", req); in xprt_setup_backchannel()
117 list_add(&req->rq_bc_pa_list, &tmp_list); in xprt_setup_backchannel()
119 req->rq_xprt = xprt; in xprt_setup_backchannel()
120 INIT_LIST_HEAD(&req->rq_list); in xprt_setup_backchannel()
121 INIT_LIST_HEAD(&req->rq_bc_list); in xprt_setup_backchannel()
129 xbufp = &req->rq_rcv_buf; in xprt_setup_backchannel()
145 xbufp = &req->rq_snd_buf; in xprt_setup_backchannel()
170 list_for_each_entry_safe(req, tmp, &tmp_list, rq_bc_pa_list) { in xprt_setup_backchannel()
171 list_del(&req->rq_bc_pa_list); in xprt_setup_backchannel()
172 xprt_free_allocation(req); in xprt_setup_backchannel()
191 struct rpc_rqst *req = NULL, *tmp = NULL; in xprt_destroy_backchannel() local
200 list_for_each_entry_safe(req, tmp, &xprt->bc_pa_list, rq_bc_pa_list) { in xprt_destroy_backchannel()
201 dprintk("RPC: req=%p\n", req); in xprt_destroy_backchannel()
202 list_del(&req->rq_bc_pa_list); in xprt_destroy_backchannel()
203 xprt_free_allocation(req); in xprt_destroy_backchannel()
217 struct rpc_rqst *req = NULL; in xprt_alloc_bc_request() local
223 req = list_first_entry(&xprt->bc_pa_list, struct rpc_rqst, in xprt_alloc_bc_request()
225 req->rq_reply_bytes_recvd = 0; in xprt_alloc_bc_request()
226 req->rq_bytes_sent = 0; in xprt_alloc_bc_request()
227 memcpy(&req->rq_private_buf, &req->rq_rcv_buf, in xprt_alloc_bc_request()
228 sizeof(req->rq_private_buf)); in xprt_alloc_bc_request()
229 req->rq_xid = xid; in xprt_alloc_bc_request()
230 req->rq_connect_cookie = xprt->connect_cookie; in xprt_alloc_bc_request()
232 dprintk("RPC: backchannel req=%p\n", req); in xprt_alloc_bc_request()
233 return req; in xprt_alloc_bc_request()
240 void xprt_free_bc_request(struct rpc_rqst *req) in xprt_free_bc_request() argument
242 struct rpc_xprt *xprt = req->rq_xprt; in xprt_free_bc_request()
244 dprintk("RPC: free backchannel req=%p\n", req); in xprt_free_bc_request()
246 req->rq_connect_cookie = xprt->connect_cookie - 1; in xprt_free_bc_request()
248 WARN_ON_ONCE(!test_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state)); in xprt_free_bc_request()
249 clear_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state); in xprt_free_bc_request()
259 dprintk("RPC: Last session removed req=%p\n", req); in xprt_free_bc_request()
260 xprt_free_allocation(req); in xprt_free_bc_request()
269 list_add_tail(&req->rq_bc_pa_list, &xprt->bc_pa_list); in xprt_free_bc_request()
286 struct rpc_rqst *req; in xprt_lookup_bc_request() local
289 list_for_each_entry(req, &xprt->bc_pa_list, rq_bc_pa_list) { in xprt_lookup_bc_request()
290 if (req->rq_connect_cookie != xprt->connect_cookie) in xprt_lookup_bc_request()
292 if (req->rq_xid == xid) in xprt_lookup_bc_request()
295 req = xprt_alloc_bc_request(xprt, xid); in xprt_lookup_bc_request()
298 return req; in xprt_lookup_bc_request()
307 void xprt_complete_bc_request(struct rpc_rqst *req, uint32_t copied) in xprt_complete_bc_request() argument
309 struct rpc_xprt *xprt = req->rq_xprt; in xprt_complete_bc_request()
313 list_del(&req->rq_bc_pa_list); in xprt_complete_bc_request()
316 req->rq_private_buf.len = copied; in xprt_complete_bc_request()
317 set_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state); in xprt_complete_bc_request()
321 list_add(&req->rq_bc_list, &bc_serv->sv_cb_list); in xprt_complete_bc_request()