/linux-6.6.21/net/sunrpc/ |
D | xprt.c | 72 static void xprt_init(struct rpc_xprt *xprt, struct net *net); 73 static __be32 xprt_alloc_xid(struct rpc_xprt *xprt); 74 static void xprt_destroy(struct rpc_xprt *xprt); 247 static void xprt_clear_locked(struct rpc_xprt *xprt) in xprt_clear_locked() argument 249 xprt->snd_task = NULL; in xprt_clear_locked() 250 if (!test_bit(XPRT_CLOSE_WAIT, &xprt->state)) in xprt_clear_locked() 251 clear_bit_unlock(XPRT_LOCKED, &xprt->state); in xprt_clear_locked() 253 queue_work(xprtiod_workqueue, &xprt->task_cleanup); in xprt_clear_locked() 265 int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task) in xprt_reserve_xprt() argument 269 if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) { in xprt_reserve_xprt() [all …]
|
D | svc_xprt.c | 30 static struct svc_deferred_req *svc_deferred_dequeue(struct svc_xprt *xprt); 34 static void svc_delete_xprt(struct svc_xprt *xprt); 159 void svc_xprt_deferred_close(struct svc_xprt *xprt) in svc_xprt_deferred_close() argument 161 if (!test_and_set_bit(XPT_CLOSE, &xprt->xpt_flags)) in svc_xprt_deferred_close() 162 svc_xprt_enqueue(xprt); in svc_xprt_deferred_close() 168 struct svc_xprt *xprt = in svc_xprt_free() local 170 struct module *owner = xprt->xpt_class->xcl_owner; in svc_xprt_free() 171 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) in svc_xprt_free() 172 svcauth_unix_info_release(xprt); in svc_xprt_free() 173 put_cred(xprt->xpt_cred); in svc_xprt_free() [all …]
|
D | xprtsock.c | 64 static void xs_close(struct rpc_xprt *xprt); 66 static void xs_tcp_set_socket_timeouts(struct rpc_xprt *xprt, 234 static inline struct sockaddr *xs_addr(struct rpc_xprt *xprt) in xs_addr() argument 236 return (struct sockaddr *) &xprt->addr; in xs_addr() 239 static inline struct sockaddr_un *xs_addr_un(struct rpc_xprt *xprt) in xs_addr_un() argument 241 return (struct sockaddr_un *) &xprt->addr; in xs_addr_un() 244 static inline struct sockaddr_in *xs_addr_in(struct rpc_xprt *xprt) in xs_addr_in() argument 246 return (struct sockaddr_in *) &xprt->addr; in xs_addr_in() 249 static inline struct sockaddr_in6 *xs_addr_in6(struct rpc_xprt *xprt) in xs_addr_in6() argument 251 return (struct sockaddr_in6 *) &xprt->addr; in xs_addr_in6() [all …]
|
D | backchannel_rqst.c | 22 unsigned int xprt_bc_max_slots(struct rpc_xprt *xprt) in xprt_bc_max_slots() argument 31 static inline int xprt_need_to_requeue(struct rpc_xprt *xprt) in xprt_need_to_requeue() argument 33 return xprt->bc_alloc_count < xprt->bc_alloc_max; in xprt_need_to_requeue() 75 static struct rpc_rqst *xprt_alloc_bc_req(struct rpc_xprt *xprt) in xprt_alloc_bc_req() argument 85 req->rq_xprt = xprt; in xprt_alloc_bc_req() 124 int xprt_setup_backchannel(struct rpc_xprt *xprt, unsigned int min_reqs) in xprt_setup_backchannel() argument 126 if (!xprt->ops->bc_setup) in xprt_setup_backchannel() 128 return xprt->ops->bc_setup(xprt, min_reqs); in xprt_setup_backchannel() 132 int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs) in xprt_setup_bc() argument 154 req = xprt_alloc_bc_req(xprt); in xprt_setup_bc() [all …]
|
D | sysfs.c | 68 return xprt_get(x->xprt); in rpc_sysfs_xprt_kobj_get_xprt() 93 struct rpc_xprt *xprt = rpc_sysfs_xprt_kobj_get_xprt(kobj); in rpc_sysfs_xprt_dstaddr_show() local 96 if (!xprt) { in rpc_sysfs_xprt_dstaddr_show() 100 ret = sprintf(buf, "%s\n", xprt->address_strings[RPC_DISPLAY_ADDR]); in rpc_sysfs_xprt_dstaddr_show() 101 xprt_put(xprt); in rpc_sysfs_xprt_dstaddr_show() 110 struct rpc_xprt *xprt = rpc_sysfs_xprt_kobj_get_xprt(kobj); in rpc_sysfs_xprt_srcaddr_show() local 114 if (!xprt || !xprt_connected(xprt)) { in rpc_sysfs_xprt_srcaddr_show() 116 } else if (xprt->ops->get_srcaddr) { in rpc_sysfs_xprt_srcaddr_show() 117 ret = xprt->ops->get_srcaddr(xprt, buf, buflen); in rpc_sysfs_xprt_srcaddr_show() 128 xprt_put(xprt); in rpc_sysfs_xprt_srcaddr_show() [all …]
|
D | xprtmultipath.c | 33 struct rpc_xprt *xprt) in xprt_switch_add_xprt_locked() argument 35 if (unlikely(xprt_get(xprt) == NULL)) in xprt_switch_add_xprt_locked() 37 list_add_tail_rcu(&xprt->xprt_switch, &xps->xps_xprt_list); in xprt_switch_add_xprt_locked() 40 xps->xps_net = xprt->xprt_net; in xprt_switch_add_xprt_locked() 53 struct rpc_xprt *xprt) in rpc_xprt_switch_add_xprt() argument 55 if (xprt == NULL) in rpc_xprt_switch_add_xprt() 58 if (xps->xps_net == xprt->xprt_net || xps->xps_net == NULL) in rpc_xprt_switch_add_xprt() 59 xprt_switch_add_xprt_locked(xps, xprt); in rpc_xprt_switch_add_xprt() 61 rpc_sysfs_xprt_setup(xps, xprt, GFP_KERNEL); in rpc_xprt_switch_add_xprt() 65 struct rpc_xprt *xprt, bool offline) in xprt_switch_remove_xprt_locked() argument [all …]
|
D | clnt.c | 269 struct rpc_xprt *xprt, in rpc_clnt_set_transport() argument 278 if (!xprt_bound(xprt)) in rpc_clnt_set_transport() 282 rcu_assign_pointer(clnt->cl_xprt, xprt); in rpc_clnt_set_transport() 365 struct rpc_xprt *xprt, in rpc_new_client() argument 412 timeout = xprt->timeout; in rpc_new_client() 419 rpc_clnt_set_transport(clnt, xprt, timeout); in rpc_new_client() 420 xprt->main = true; in rpc_new_client() 441 trace_rpc_clnt_new(clnt, xprt, args); in rpc_new_client() 455 xprt_put(xprt); in rpc_new_client() 461 struct rpc_xprt *xprt) in rpc_create_xprt() argument [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 | svcsock.c | 131 static void svc_tcp_release_ctxt(struct svc_xprt *xprt, void *ctxt) in svc_tcp_release_ctxt() argument 141 static void svc_udp_release_ctxt(struct svc_xprt *xprt, void *ctxt) in svc_udp_release_ctxt() argument 399 static int svc_tcp_has_wspace(struct svc_xprt *xprt) in svc_tcp_has_wspace() argument 401 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt); in svc_tcp_has_wspace() 403 if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) in svc_tcp_has_wspace() 408 static void svc_tcp_kill_temp_xprt(struct svc_xprt *xprt) in svc_tcp_kill_temp_xprt() argument 410 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt); in svc_tcp_kill_temp_xprt() 428 struct svc_xprt *xprt = data; in svc_tcp_handshake_done() local 429 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt); in svc_tcp_handshake_done() 433 set_bit(XPT_PEER_AUTH, &xprt->xpt_flags); in svc_tcp_handshake_done() [all …]
|
D | sysfs.h | 12 struct rpc_xprt *xprt; member 17 struct rpc_xprt *xprt; member 29 struct rpc_xprt *xprt, gfp_t gfp_flags); 30 void rpc_sysfs_xprt_switch_destroy(struct rpc_xprt_switch *xprt); 32 struct rpc_xprt *xprt, gfp_t gfp_flags); 33 void rpc_sysfs_xprt_destroy(struct rpc_xprt *xprt);
|
D | rpcb_clnt.c | 148 static void rpcb_wake_rpcbind_waiters(struct rpc_xprt *xprt, int status) in rpcb_wake_rpcbind_waiters() argument 150 xprt_clear_binding(xprt); in rpcb_wake_rpcbind_waiters() 151 rpc_wake_up_status(&xprt->binding, status); in rpcb_wake_rpcbind_waiters() 674 struct rpc_xprt *xprt; in rpcb_getport_async() local 686 xprt = xprt_get(task->tk_xprt); in rpcb_getport_async() 690 rpc_sleep_on_timeout(&xprt->binding, task, in rpcb_getport_async() 691 NULL, jiffies + xprt->bind_timeout); in rpcb_getport_async() 693 if (xprt_test_and_set_binding(xprt)) { in rpcb_getport_async() 694 xprt_put(xprt); in rpcb_getport_async() 699 if (xprt_bound(xprt)) { in rpcb_getport_async() [all …]
|
D | svcauth_unix.c | 338 ip_map_cached_get(struct svc_xprt *xprt) in ip_map_cached_get() argument 343 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) { in ip_map_cached_get() 344 spin_lock(&xprt->xpt_lock); in ip_map_cached_get() 345 ipm = xprt->xpt_auth_cache; in ip_map_cached_get() 347 sn = net_generic(xprt->xpt_net, sunrpc_net_id); in ip_map_cached_get() 354 xprt->xpt_auth_cache = NULL; in ip_map_cached_get() 355 spin_unlock(&xprt->xpt_lock); in ip_map_cached_get() 361 spin_unlock(&xprt->xpt_lock); in ip_map_cached_get() 367 ip_map_cached_put(struct svc_xprt *xprt, struct ip_map *ipm) in ip_map_cached_put() argument 369 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) { in ip_map_cached_put() [all …]
|
/linux-6.6.21/net/sunrpc/xprtrdma/ |
D | transport.c | 148 xprt_rdma_format_addresses4(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses4() argument 154 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses4() 156 xprt->address_strings[RPC_DISPLAY_NETID] = RPCBIND_NETID_RDMA; in xprt_rdma_format_addresses4() 160 xprt_rdma_format_addresses6(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses6() argument 166 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses6() 168 xprt->address_strings[RPC_DISPLAY_NETID] = RPCBIND_NETID_RDMA6; in xprt_rdma_format_addresses6() 172 xprt_rdma_format_addresses(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses() argument 178 xprt_rdma_format_addresses4(xprt, sap); in xprt_rdma_format_addresses() 181 xprt_rdma_format_addresses6(xprt, sap); in xprt_rdma_format_addresses() 189 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 | 25 int xprt_rdma_bc_setup(struct rpc_xprt *xprt, unsigned int reqs) in xprt_rdma_bc_setup() argument 27 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); in xprt_rdma_bc_setup() 40 size_t xprt_rdma_bc_maxpayload(struct rpc_xprt *xprt) in xprt_rdma_bc_maxpayload() argument 42 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); in xprt_rdma_bc_maxpayload() 51 unsigned int xprt_rdma_bc_max_slots(struct rpc_xprt *xprt) in xprt_rdma_bc_max_slots() argument 99 struct rpc_xprt *xprt = rqst->rq_xprt; in xprt_rdma_bc_send_reply() local 100 struct rpcrdma_xprt *r_xprt = rpcx_to_rdmax(xprt); in xprt_rdma_bc_send_reply() 104 if (!xprt_connected(xprt)) in xprt_rdma_bc_send_reply() 107 if (!xprt_request_get_cong(xprt, rqst)) in xprt_rdma_bc_send_reply() 122 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); 102 struct svc_xprt *xprt = context; in qp_event_handler() local 104 trace_svcrdma_qp_error(event, (struct sockaddr *)&xprt->xpt_remote); in qp_event_handler() 120 svc_xprt_deferred_close(xprt); in qp_event_handler() 273 struct svc_xprt *xprt = &rdma->sc_xprt; in svc_rdma_cma_handler() local 281 svc_xprt_enqueue(xprt); in svc_rdma_cma_handler() 285 svc_xprt_deferred_close(xprt); in svc_rdma_cma_handler() [all …]
|
D | rpc_rdma.c | 987 static void __rpcrdma_update_cwnd_locked(struct rpc_xprt *xprt, in __rpcrdma_update_cwnd_locked() argument 992 xprt->cwnd = grant << RPC_CWNDSHIFT; in __rpcrdma_update_cwnd_locked() 997 struct rpc_xprt *xprt = &r_xprt->rx_xprt; in rpcrdma_update_cwnd() local 999 spin_lock(&xprt->transport_lock); in rpcrdma_update_cwnd() 1000 __rpcrdma_update_cwnd_locked(xprt, &r_xprt->rx_buf, grant); in rpcrdma_update_cwnd() 1001 spin_unlock(&xprt->transport_lock); in rpcrdma_update_cwnd() 1013 struct rpc_xprt *xprt = &r_xprt->rx_xprt; in rpcrdma_reset_cwnd() local 1015 spin_lock(&xprt->transport_lock); in rpcrdma_reset_cwnd() 1016 xprt->cong = 0; in rpcrdma_reset_cwnd() 1017 __rpcrdma_update_cwnd_locked(xprt, &r_xprt->rx_buf, 1); in rpcrdma_reset_cwnd() [all …]
|
D | svc_rdma_recvfrom.c | 247 void svc_rdma_release_ctxt(struct svc_xprt *xprt, void *vctxt) in svc_rdma_release_ctxt() argument 251 container_of(xprt, struct svcxprt_rdma, sc_xprt); in svc_rdma_release_ctxt() 730 static bool svc_rdma_is_reverse_direction_reply(struct svc_xprt *xprt, in svc_rdma_is_reverse_direction_reply() argument 735 if (!xprt->xpt_bc_xprt) in svc_rdma_is_reverse_direction_reply() 787 struct svc_xprt *xprt = rqstp->rq_xprt; in svc_rdma_recvfrom() local 789 container_of(xprt, struct svcxprt_rdma, sc_xprt); in svc_rdma_recvfrom() 808 clear_bit(XPT_DATA, &xprt->xpt_flags); in svc_rdma_recvfrom() 812 svc_xprt_received(xprt); in svc_rdma_recvfrom() 828 if (svc_rdma_is_reverse_direction_reply(xprt, ctxt)) in svc_rdma_recvfrom() 842 svc_xprt_copy_addrs(rqstp, xprt); in svc_rdma_recvfrom() [all …]
|
/linux-6.6.21/include/linux/sunrpc/ |
D | xprt.h | 30 #define RPC_MAXCWND(xprt) ((xprt)->max_reqs << RPC_CWNDSHIFT) argument 31 #define RPCXPRT_CONGESTED(xprt) ((xprt)->cong >= (xprt)->cwnd) argument 148 void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); 149 int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); 150 void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); 151 void (*alloc_slot)(struct rpc_xprt *xprt, struct rpc_task *task); 152 void (*free_slot)(struct rpc_xprt *xprt, 155 void (*set_port)(struct rpc_xprt *xprt, unsigned short port); 156 void (*connect)(struct rpc_xprt *xprt, struct rpc_task *task); 157 int (*get_srcaddr)(struct rpc_xprt *xprt, char *buf, [all …]
|
D | svc_xprt.h | 26 void (*xpo_release_ctxt)(struct svc_xprt *xprt, void *ctxt); 30 void (*xpo_handshake)(struct svc_xprt *xprt); 128 static inline bool svc_xprt_is_dead(const struct svc_xprt *xprt) in svc_xprt_is_dead() argument 130 return (test_bit(XPT_DEAD, &xprt->xpt_flags) != 0) || in svc_xprt_is_dead() 131 (test_bit(XPT_CLOSE, &xprt->xpt_flags) != 0); in svc_xprt_is_dead() 143 void svc_xprt_received(struct svc_xprt *xprt); 144 void svc_xprt_enqueue(struct svc_xprt *xprt); 145 void svc_xprt_put(struct svc_xprt *xprt); 146 void svc_xprt_copy_addrs(struct svc_rqst *rqstp, struct svc_xprt *xprt); 147 void svc_xprt_close(struct svc_xprt *xprt); [all …]
|
D | bc_xprt.h | 21 struct rpc_rqst *xprt_lookup_bc_request(struct rpc_xprt *xprt, __be32 xid); 29 int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs); 30 void xprt_destroy_bc(struct rpc_xprt *xprt, unsigned int max_reqs); 32 unsigned int xprt_bc_max_slots(struct rpc_xprt *xprt); 47 static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, in xprt_setup_backchannel() argument 53 static inline void xprt_destroy_backchannel(struct rpc_xprt *xprt, in xprt_destroy_backchannel() argument
|
D | xprtmultipath.h | 47 extern struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt, 56 struct rpc_xprt *xprt); 58 struct rpc_xprt *xprt, bool offline);
|
D | clnt.h | 158 struct rpc_xprt *xprt, 192 struct rpc_xprt *xprt); 233 struct rpc_xprt *xprt, 260 void rpc_clnt_xprt_set_online(struct rpc_clnt *clnt, struct rpc_xprt *xprt);
|
/linux-6.6.21/include/trace/events/ |
D | sunrpc.h | 171 const struct rpc_xprt *xprt, 175 TP_ARGS(clnt, xprt, args), 182 __string(server, xprt->servername) 183 __string(addr, xprt->address_strings[RPC_DISPLAY_ADDR]) 184 __string(port, xprt->address_strings[RPC_DISPLAY_PORT]) 192 __assign_str(server, xprt->servername); 193 __assign_str(addr, xprt->address_strings[RPC_DISPLAY_ADDR]); 194 __assign_str(port, xprt->address_strings[RPC_DISPLAY_PORT]); 843 struct rpc_xprt *xprt, 847 TP_ARGS(xprt, socket), [all …]
|
/linux-6.6.21/fs/nfs/ |
D | callback.c | 128 static inline void nfs_callback_bc_serv(u32 minorversion, struct rpc_xprt *xprt, in nfs_callback_bc_serv() argument 136 xprt->bc_serv = serv; in nfs_callback_bc_serv() 139 static inline void nfs_callback_bc_serv(u32 minorversion, struct rpc_xprt *xprt, in nfs_callback_bc_serv() argument 145 static int nfs_callback_start_svc(int minorversion, struct rpc_xprt *xprt, in nfs_callback_start_svc() argument 151 nfs_callback_bc_serv(minorversion, xprt, serv); in nfs_callback_start_svc() 180 struct net *net, struct rpc_xprt *xprt) in nfs_callback_up_net() argument 199 else if (xprt->ops->bc_setup) in nfs_callback_up_net() 265 int nfs_callback_up(u32 minorversion, struct rpc_xprt *xprt) in nfs_callback_up() argument 270 struct net *net = xprt->xprt_net; in nfs_callback_up() 280 ret = nfs_callback_up_net(minorversion, serv, net, xprt); in nfs_callback_up() [all …]
|