/net/sunrpc/ |
D | xprt.c | 70 static void xprt_init(struct rpc_xprt *xprt, struct net *net); 71 static __be32 xprt_alloc_xid(struct rpc_xprt *xprt); 72 static void xprt_destroy(struct rpc_xprt *xprt); 216 static void xprt_clear_locked(struct rpc_xprt *xprt) in xprt_clear_locked() argument 218 xprt->snd_task = NULL; in xprt_clear_locked() 219 if (!test_bit(XPRT_CLOSE_WAIT, &xprt->state)) { in xprt_clear_locked() 221 clear_bit(XPRT_LOCKED, &xprt->state); in xprt_clear_locked() 224 queue_work(xprtiod_workqueue, &xprt->task_cleanup); in xprt_clear_locked() 236 int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task) in xprt_reserve_xprt() argument 240 if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) { in xprt_reserve_xprt() [all …]
|
D | xprtsock.c | 60 static void xs_close(struct rpc_xprt *xprt); 61 static void xs_tcp_set_socket_timeouts(struct rpc_xprt *xprt, 227 static inline struct sockaddr *xs_addr(struct rpc_xprt *xprt) in xs_addr() argument 229 return (struct sockaddr *) &xprt->addr; in xs_addr() 232 static inline struct sockaddr_un *xs_addr_un(struct rpc_xprt *xprt) in xs_addr_un() argument 234 return (struct sockaddr_un *) &xprt->addr; in xs_addr_un() 237 static inline struct sockaddr_in *xs_addr_in(struct rpc_xprt *xprt) in xs_addr_in() argument 239 return (struct sockaddr_in *) &xprt->addr; in xs_addr_in() 242 static inline struct sockaddr_in6 *xs_addr_in6(struct rpc_xprt *xprt) in xs_addr_in6() argument 244 return (struct sockaddr_in6 *) &xprt->addr; in xs_addr_in6() [all …]
|
D | svc_xprt.c | 29 static struct svc_deferred_req *svc_deferred_dequeue(struct svc_xprt *xprt); 33 static void svc_delete_xprt(struct svc_xprt *xprt); 144 struct svc_xprt *xprt = in svc_xprt_free() local 146 struct module *owner = xprt->xpt_class->xcl_owner; in svc_xprt_free() 147 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) in svc_xprt_free() 148 svcauth_unix_info_release(xprt); in svc_xprt_free() 149 put_cred(xprt->xpt_cred); in svc_xprt_free() 150 put_net(xprt->xpt_net); in svc_xprt_free() 152 if (xprt->xpt_bc_xprt) in svc_xprt_free() 153 xprt_put(xprt->xpt_bc_xprt); in svc_xprt_free() [all …]
|
D | backchannel_rqst.c | 36 unsigned int xprt_bc_max_slots(struct rpc_xprt *xprt) in xprt_bc_max_slots() argument 45 static inline int xprt_need_to_requeue(struct rpc_xprt *xprt) in xprt_need_to_requeue() argument 47 return xprt->bc_alloc_count < xprt->bc_alloc_max; in xprt_need_to_requeue() 90 struct rpc_rqst *xprt_alloc_bc_req(struct rpc_xprt *xprt, gfp_t gfp_flags) in xprt_alloc_bc_req() argument 99 req->rq_xprt = xprt; in xprt_alloc_bc_req() 138 int xprt_setup_backchannel(struct rpc_xprt *xprt, unsigned int min_reqs) in xprt_setup_backchannel() argument 140 if (!xprt->ops->bc_setup) in xprt_setup_backchannel() 142 return xprt->ops->bc_setup(xprt, min_reqs); in xprt_setup_backchannel() 146 int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs) in xprt_setup_bc() argument 168 req = xprt_alloc_bc_req(xprt, GFP_KERNEL); in xprt_setup_bc() [all …]
|
D | xprtmultipath.c | 30 struct rpc_xprt *xprt) in xprt_switch_add_xprt_locked() argument 32 if (unlikely(xprt_get(xprt) == NULL)) in xprt_switch_add_xprt_locked() 34 list_add_tail_rcu(&xprt->xprt_switch, &xps->xps_xprt_list); in xprt_switch_add_xprt_locked() 37 xps->xps_net = xprt->xprt_net; in xprt_switch_add_xprt_locked() 50 struct rpc_xprt *xprt) in rpc_xprt_switch_add_xprt() argument 52 if (xprt == NULL) in rpc_xprt_switch_add_xprt() 55 if (xps->xps_net == xprt->xprt_net || xps->xps_net == NULL) in rpc_xprt_switch_add_xprt() 56 xprt_switch_add_xprt_locked(xps, xprt); in rpc_xprt_switch_add_xprt() 61 struct rpc_xprt *xprt) in xprt_switch_remove_xprt_locked() argument 63 if (unlikely(xprt == NULL)) in xprt_switch_remove_xprt_locked() [all …]
|
D | clnt.c | 267 struct rpc_xprt *xprt, in rpc_clnt_set_transport() argument 276 if (!xprt_bound(xprt)) in rpc_clnt_set_transport() 280 rcu_assign_pointer(clnt->cl_xprt, xprt); in rpc_clnt_set_transport() 362 struct rpc_xprt *xprt, in rpc_new_client() argument 408 timeout = xprt->timeout; in rpc_new_client() 415 rpc_clnt_set_transport(clnt, xprt, timeout); in rpc_new_client() 435 trace_rpc_clnt_new(clnt, xprt, program->name, args->servername); in rpc_new_client() 449 xprt_put(xprt); in rpc_new_client() 455 struct rpc_xprt *xprt) in rpc_create_xprt() argument 465 xps = xprt_switch_alloc(xprt, GFP_KERNEL); in rpc_create_xprt() [all …]
|
D | debugfs.c | 120 static int do_xprt_debugfs(struct rpc_clnt *clnt, struct rpc_xprt *xprt, void *numv) in do_xprt_debugfs() argument 127 if (IS_ERR_OR_NULL(xprt->debugfs)) in do_xprt_debugfs() 130 xprt->debugfs->d_name.name); in do_xprt_debugfs() 176 struct rpc_xprt *xprt = f->private; in xprt_info_show() local 178 seq_printf(f, "netid: %s\n", xprt->address_strings[RPC_DISPLAY_NETID]); in xprt_info_show() 179 seq_printf(f, "addr: %s\n", xprt->address_strings[RPC_DISPLAY_ADDR]); in xprt_info_show() 180 seq_printf(f, "port: %s\n", xprt->address_strings[RPC_DISPLAY_PORT]); in xprt_info_show() 181 seq_printf(f, "state: 0x%lx\n", xprt->state); in xprt_info_show() 189 struct rpc_xprt *xprt = inode->i_private; in xprt_info_open() local 191 ret = single_open(filp, xprt_info_show, xprt); in xprt_info_open() [all …]
|
D | rpcb_clnt.c | 147 static void rpcb_wake_rpcbind_waiters(struct rpc_xprt *xprt, int status) in rpcb_wake_rpcbind_waiters() argument 149 xprt_clear_binding(xprt); in rpcb_wake_rpcbind_waiters() 150 rpc_wake_up_status(&xprt->binding, status); in rpcb_wake_rpcbind_waiters() 649 struct rpc_xprt *xprt; in rpcb_getport_async() local 661 xprt = xprt_get(task->tk_xprt); in rpcb_getport_async() 665 rpc_sleep_on_timeout(&xprt->binding, task, in rpcb_getport_async() 666 NULL, jiffies + xprt->bind_timeout); in rpcb_getport_async() 668 if (xprt_test_and_set_binding(xprt)) { in rpcb_getport_async() 669 xprt_put(xprt); in rpcb_getport_async() 674 if (xprt_bound(xprt)) { in rpcb_getport_async() [all …]
|
D | svcsock.c | 350 static int svc_tcp_has_wspace(struct svc_xprt *xprt) in svc_tcp_has_wspace() argument 352 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt); in svc_tcp_has_wspace() 354 if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) in svc_tcp_has_wspace() 359 static void svc_tcp_kill_temp_xprt(struct svc_xprt *xprt) in svc_tcp_kill_temp_xprt() argument 361 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt); in svc_tcp_kill_temp_xprt() 553 struct svc_xprt *xprt = rqstp->rq_xprt; in svc_udp_sendto() local 554 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt); in svc_udp_sendto() 574 mutex_lock(&xprt->xpt_mutex); in svc_udp_sendto() 576 if (svc_xprt_is_dead(xprt)) in svc_udp_sendto() 586 trace_svcsock_udp_send(xprt, err); in svc_udp_sendto() [all …]
|
D | svcauth_unix.c | 345 ip_map_cached_get(struct svc_xprt *xprt) in ip_map_cached_get() argument 350 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) { in ip_map_cached_get() 351 spin_lock(&xprt->xpt_lock); in ip_map_cached_get() 352 ipm = xprt->xpt_auth_cache; in ip_map_cached_get() 354 sn = net_generic(xprt->xpt_net, sunrpc_net_id); in ip_map_cached_get() 361 xprt->xpt_auth_cache = NULL; in ip_map_cached_get() 362 spin_unlock(&xprt->xpt_lock); in ip_map_cached_get() 368 spin_unlock(&xprt->xpt_lock); in ip_map_cached_get() 374 ip_map_cached_put(struct svc_xprt *xprt, struct ip_map *ipm) in ip_map_cached_put() argument 376 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) { in ip_map_cached_put() [all …]
|
D | stats.c | 242 static int do_print_stats(struct rpc_clnt *clnt, struct rpc_xprt *xprt, void *seqv) in do_print_stats() argument 246 xprt->ops->print_stats(xprt, seq); in do_print_stats()
|
D | Makefile | 11 sunrpc-y := clnt.o xprt.o socklib.o xprtsock.o sched.o \
|
/net/sunrpc/xprtrdma/ |
D | transport.c | 160 xprt_rdma_format_addresses4(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses4() argument 166 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses4() 168 xprt->address_strings[RPC_DISPLAY_NETID] = RPCBIND_NETID_RDMA; in xprt_rdma_format_addresses4() 172 xprt_rdma_format_addresses6(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses6() argument 178 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses6() 180 xprt->address_strings[RPC_DISPLAY_NETID] = RPCBIND_NETID_RDMA6; in xprt_rdma_format_addresses6() 184 xprt_rdma_format_addresses(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses() argument 190 xprt_rdma_format_addresses4(xprt, sap); in xprt_rdma_format_addresses() 193 xprt_rdma_format_addresses6(xprt, sap); in xprt_rdma_format_addresses() 201 xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses() [all …]
|
D | svc_rdma_backchannel.c | 23 struct rpc_xprt *xprt = sxprt->xpt_bc_xprt; in svc_rdma_handle_bc_reply() local 24 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); in svc_rdma_handle_bc_reply() 31 spin_lock(&xprt->queue_lock); in svc_rdma_handle_bc_reply() 32 req = xprt_lookup_rqst(xprt, *rdma_resp); in svc_rdma_handle_bc_reply() 42 spin_unlock(&xprt->queue_lock); in svc_rdma_handle_bc_reply() 49 spin_lock(&xprt->transport_lock); in svc_rdma_handle_bc_reply() 50 xprt->cwnd = credits << RPC_CWNDSHIFT; in svc_rdma_handle_bc_reply() 51 spin_unlock(&xprt->transport_lock); in svc_rdma_handle_bc_reply() 53 spin_lock(&xprt->queue_lock); in svc_rdma_handle_bc_reply() 59 spin_unlock(&xprt->queue_lock); in svc_rdma_handle_bc_reply() [all …]
|
D | backchannel.c | 29 int xprt_rdma_bc_setup(struct rpc_xprt *xprt, unsigned int reqs) in xprt_rdma_bc_setup() argument 31 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); in xprt_rdma_bc_setup() 44 size_t xprt_rdma_bc_maxpayload(struct rpc_xprt *xprt) in xprt_rdma_bc_maxpayload() argument 46 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); in xprt_rdma_bc_maxpayload() 55 unsigned int xprt_rdma_bc_max_slots(struct rpc_xprt *xprt) in xprt_rdma_bc_max_slots() argument 103 struct rpc_xprt *xprt = rqst->rq_xprt; in xprt_rdma_bc_send_reply() local 104 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); in xprt_rdma_bc_send_reply() 108 if (!xprt_connected(xprt)) in xprt_rdma_bc_send_reply() 111 if (!xprt_request_get_cong(xprt, rqst)) in xprt_rdma_bc_send_reply() 126 xprt_rdma_close(xprt); in xprt_rdma_bc_send_reply() [all …]
|
D | svc_rdma_transport.c | 72 static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt); 73 static void svc_rdma_detach(struct svc_xprt *xprt); 74 static void svc_rdma_free(struct svc_xprt *xprt); 75 static int svc_rdma_has_wspace(struct svc_xprt *xprt); 104 struct svc_xprt *xprt = context; in qp_event_handler() local 106 trace_svcrdma_qp_error(event, (struct sockaddr *)&xprt->xpt_remote); in qp_event_handler() 122 set_bit(XPT_CLOSE, &xprt->xpt_flags); in qp_event_handler() 123 svc_xprt_enqueue(xprt); in qp_event_handler() 277 struct svc_xprt *xprt = &rdma->sc_xprt; in svc_rdma_cma_handler() local 282 svc_xprt_enqueue(xprt); in svc_rdma_cma_handler() [all …]
|
D | rpc_rdma.c | 1003 static void __rpcrdma_update_cwnd_locked(struct rpc_xprt *xprt, in __rpcrdma_update_cwnd_locked() argument 1008 xprt->cwnd = grant << RPC_CWNDSHIFT; in __rpcrdma_update_cwnd_locked() 1013 struct rpc_xprt *xprt = &r_xprt->rx_xprt; in rpcrdma_update_cwnd() local 1015 spin_lock(&xprt->transport_lock); in rpcrdma_update_cwnd() 1016 __rpcrdma_update_cwnd_locked(xprt, &r_xprt->rx_buf, grant); in rpcrdma_update_cwnd() 1017 spin_unlock(&xprt->transport_lock); in rpcrdma_update_cwnd() 1029 struct rpc_xprt *xprt = &r_xprt->rx_xprt; in rpcrdma_reset_cwnd() local 1031 spin_lock(&xprt->transport_lock); in rpcrdma_reset_cwnd() 1032 xprt->cong = 0; in rpcrdma_reset_cwnd() 1033 __rpcrdma_update_cwnd_locked(xprt, &r_xprt->rx_buf, 1); in rpcrdma_reset_cwnd() [all …]
|
D | svc_rdma_recvfrom.c | 246 struct svc_xprt *xprt = rqstp->rq_xprt; in svc_rdma_release_rqst() local 248 container_of(xprt, struct svcxprt_rdma, sc_xprt); in svc_rdma_release_rqst() 738 static bool svc_rdma_is_backchannel_reply(struct svc_xprt *xprt, in svc_rdma_is_backchannel_reply() argument 743 if (!xprt->xpt_bc_xprt) in svc_rdma_is_backchannel_reply() 799 struct svc_xprt *xprt = rqstp->rq_xprt; in svc_rdma_recvfrom() local 801 container_of(xprt, struct svcxprt_rdma, sc_xprt); in svc_rdma_recvfrom() 819 clear_bit(XPT_DATA, &xprt->xpt_flags); in svc_rdma_recvfrom() 844 if (svc_rdma_is_backchannel_reply(xprt, p)) in svc_rdma_recvfrom() 856 svc_xprt_copy_addrs(rqstp, xprt); in svc_rdma_recvfrom()
|
D | xprt_rdma.h | 568 void xprt_rdma_format_addresses(struct rpc_xprt *xprt, struct sockaddr *sap); 569 void xprt_rdma_free_addresses(struct rpc_xprt *xprt); 570 void xprt_rdma_close(struct rpc_xprt *xprt); 571 void xprt_rdma_print_stats(struct rpc_xprt *xprt, struct seq_file *seq);
|
D | verbs.c | 315 struct rpc_xprt *xprt = &r_xprt->rx_xprt; in rpcrdma_create_id() local 321 id = rdma_create_id(xprt->xprt_net, rpcrdma_cm_event_handler, ep, in rpcrdma_create_id() 327 rc = rdma_resolve_addr(id, NULL, (struct sockaddr *)&xprt->addr, in rpcrdma_create_id() 525 struct rpc_xprt *xprt = &r_xprt->rx_xprt; in rpcrdma_xprt_connect() local 534 xprt_clear_connected(xprt); in rpcrdma_xprt_connect() 547 if (xprt->reestablish_timeout < RPCRDMA_INIT_REEST_TO) in rpcrdma_xprt_connect() 548 xprt->reestablish_timeout = RPCRDMA_INIT_REEST_TO; in rpcrdma_xprt_connect()
|
D | svc_rdma_sendto.c | 892 struct svc_xprt *xprt = rqstp->rq_xprt; in svc_rdma_sendto() local 894 container_of(xprt, struct svcxprt_rdma, sc_xprt); in svc_rdma_sendto() 905 if (svc_xprt_is_dead(xprt)) in svc_rdma_sendto() 977 set_bit(XPT_CLOSE, &xprt->xpt_flags); in svc_rdma_sendto()
|
D | svc_rdma_rw.c | 337 struct svc_xprt *xprt = &rdma->sc_xprt; in svc_rdma_post_chunk_ctxt() local 376 set_bit(XPT_CLOSE, &xprt->xpt_flags); in svc_rdma_post_chunk_ctxt()
|