Home
last modified time | relevance | path

Searched refs:xprt (Results 1 – 25 of 45) sorted by relevance

12

/linux-6.1.9/net/sunrpc/
Dxprt.c72 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 …]
Dxprtsock.c60 static void xs_close(struct rpc_xprt *xprt);
62 static void xs_tcp_set_socket_timeouts(struct rpc_xprt *xprt,
233 static inline struct sockaddr *xs_addr(struct rpc_xprt *xprt) in xs_addr() argument
235 return (struct sockaddr *) &xprt->addr; in xs_addr()
238 static inline struct sockaddr_un *xs_addr_un(struct rpc_xprt *xprt) in xs_addr_un() argument
240 return (struct sockaddr_un *) &xprt->addr; in xs_addr_un()
243 static inline struct sockaddr_in *xs_addr_in(struct rpc_xprt *xprt) in xs_addr_in() argument
245 return (struct sockaddr_in *) &xprt->addr; in xs_addr_in()
248 static inline struct sockaddr_in6 *xs_addr_in6(struct rpc_xprt *xprt) in xs_addr_in6() argument
250 return (struct sockaddr_in6 *) &xprt->addr; in xs_addr_in6()
[all …]
Dsvc_xprt.c30 static struct svc_deferred_req *svc_deferred_dequeue(struct svc_xprt *xprt);
34 static void svc_delete_xprt(struct svc_xprt *xprt);
150 void svc_xprt_deferred_close(struct svc_xprt *xprt) in svc_xprt_deferred_close() argument
152 if (!test_and_set_bit(XPT_CLOSE, &xprt->xpt_flags)) in svc_xprt_deferred_close()
153 svc_xprt_enqueue(xprt); in svc_xprt_deferred_close()
159 struct svc_xprt *xprt = in svc_xprt_free() local
161 struct module *owner = xprt->xpt_class->xcl_owner; in svc_xprt_free()
162 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) in svc_xprt_free()
163 svcauth_unix_info_release(xprt); in svc_xprt_free()
164 put_cred(xprt->xpt_cred); in svc_xprt_free()
[all …]
Dbackchannel_rqst.c22 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 …]
Dsysfs.c68 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 …]
Dclnt.c266 struct rpc_xprt *xprt, in rpc_clnt_set_transport() argument
275 if (!xprt_bound(xprt)) in rpc_clnt_set_transport()
279 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()
416 xprt->main = true; in rpc_new_client()
437 trace_rpc_clnt_new(clnt, xprt, program->name, args->servername); in rpc_new_client()
451 xprt_put(xprt); in rpc_new_client()
457 struct rpc_xprt *xprt) in rpc_create_xprt() argument
[all …]
Dxprtmultipath.c33 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 …]
Ddebugfs.c120 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 …]
Dsysfs.h19 struct rpc_xprt *xprt; member
24 struct rpc_xprt *xprt; member
36 struct rpc_xprt *xprt, gfp_t gfp_flags);
37 void rpc_sysfs_xprt_switch_destroy(struct rpc_xprt_switch *xprt);
39 struct rpc_xprt *xprt, gfp_t gfp_flags);
40 void rpc_sysfs_xprt_destroy(struct rpc_xprt *xprt);
Drpcb_clnt.c147 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()
651 struct rpc_xprt *xprt; in rpcb_getport_async() local
663 xprt = xprt_get(task->tk_xprt); in rpcb_getport_async()
667 rpc_sleep_on_timeout(&xprt->binding, task, in rpcb_getport_async()
668 NULL, jiffies + xprt->bind_timeout); in rpcb_getport_async()
670 if (xprt_test_and_set_binding(xprt)) { in rpcb_getport_async()
671 xprt_put(xprt); in rpcb_getport_async()
676 if (xprt_bound(xprt)) { in rpcb_getport_async()
[all …]
Dsvcsock.c339 static int svc_tcp_has_wspace(struct svc_xprt *xprt) in svc_tcp_has_wspace() argument
341 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt); in svc_tcp_has_wspace()
343 if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) in svc_tcp_has_wspace()
348 static void svc_tcp_kill_temp_xprt(struct svc_xprt *xprt) in svc_tcp_kill_temp_xprt() argument
350 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt); in svc_tcp_kill_temp_xprt()
545 struct svc_xprt *xprt = rqstp->rq_xprt; in svc_udp_sendto() local
546 struct svc_sock *svsk = container_of(xprt, struct svc_sock, sk_xprt); in svc_udp_sendto()
566 mutex_lock(&xprt->xpt_mutex); in svc_udp_sendto()
568 if (svc_xprt_is_dead(xprt)) in svc_udp_sendto()
581 trace_svcsock_udp_send(xprt, err); in svc_udp_sendto()
[all …]
Dsvcauth_unix.c337 ip_map_cached_get(struct svc_xprt *xprt) in ip_map_cached_get() argument
342 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) { in ip_map_cached_get()
343 spin_lock(&xprt->xpt_lock); in ip_map_cached_get()
344 ipm = xprt->xpt_auth_cache; in ip_map_cached_get()
346 sn = net_generic(xprt->xpt_net, sunrpc_net_id); in ip_map_cached_get()
353 xprt->xpt_auth_cache = NULL; in ip_map_cached_get()
354 spin_unlock(&xprt->xpt_lock); in ip_map_cached_get()
360 spin_unlock(&xprt->xpt_lock); in ip_map_cached_get()
366 ip_map_cached_put(struct svc_xprt *xprt, struct ip_map *ipm) in ip_map_cached_put() argument
368 if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) { in ip_map_cached_put()
[all …]
/linux-6.1.9/include/linux/sunrpc/
Dxprt.h30 #define RPC_MAXCWND(xprt) ((xprt)->max_reqs << RPC_CWNDSHIFT) argument
31 #define RPCXPRT_CONGESTED(xprt) ((xprt)->cong >= (xprt)->cwnd) argument
133 void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);
134 int (*reserve_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
135 void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
136 void (*alloc_slot)(struct rpc_xprt *xprt, struct rpc_task *task);
137 void (*free_slot)(struct rpc_xprt *xprt,
140 void (*set_port)(struct rpc_xprt *xprt, unsigned short port);
141 void (*connect)(struct rpc_xprt *xprt, struct rpc_task *task);
142 int (*get_srcaddr)(struct rpc_xprt *xprt, char *buf,
[all …]
Dsvc_xprt.h122 static inline bool svc_xprt_is_dead(const struct svc_xprt *xprt) in svc_xprt_is_dead() argument
124 return (test_bit(XPT_DEAD, &xprt->xpt_flags) != 0) || in svc_xprt_is_dead()
125 (test_bit(XPT_CLOSE, &xprt->xpt_flags) != 0); in svc_xprt_is_dead()
137 void svc_xprt_received(struct svc_xprt *xprt);
138 void svc_xprt_enqueue(struct svc_xprt *xprt);
139 void svc_xprt_put(struct svc_xprt *xprt);
140 void svc_xprt_copy_addrs(struct svc_rqst *rqstp, struct svc_xprt *xprt);
141 void svc_xprt_close(struct svc_xprt *xprt);
148 void svc_add_new_perm_xprt(struct svc_serv *serv, struct svc_xprt *xprt);
150 void svc_xprt_deferred_close(struct svc_xprt *xprt);
[all …]
Dbc_xprt.h21 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
Dxprtmultipath.h47 extern struct rpc_xprt_switch *xprt_switch_alloc(struct rpc_xprt *xprt,
56 struct rpc_xprt *xprt);
58 struct rpc_xprt *xprt, bool offline);
Dclnt.h146 struct rpc_xprt *xprt,
180 struct rpc_xprt *xprt);
221 struct rpc_xprt *xprt,
248 void rpc_clnt_xprt_set_online(struct rpc_clnt *clnt, struct rpc_xprt *xprt);
/linux-6.1.9/net/sunrpc/xprtrdma/
Dtransport.c157 xprt_rdma_format_addresses4(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses4() argument
163 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses4()
165 xprt->address_strings[RPC_DISPLAY_NETID] = RPCBIND_NETID_RDMA; in xprt_rdma_format_addresses4()
169 xprt_rdma_format_addresses6(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses6() argument
175 xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses6()
177 xprt->address_strings[RPC_DISPLAY_NETID] = RPCBIND_NETID_RDMA6; in xprt_rdma_format_addresses6()
181 xprt_rdma_format_addresses(struct rpc_xprt *xprt, struct sockaddr *sap) in xprt_rdma_format_addresses() argument
187 xprt_rdma_format_addresses4(xprt, sap); in xprt_rdma_format_addresses()
190 xprt_rdma_format_addresses6(xprt, sap); in xprt_rdma_format_addresses()
198 xprt->address_strings[RPC_DISPLAY_ADDR] = kstrdup(buf, GFP_KERNEL); in xprt_rdma_format_addresses()
[all …]
Dsvc_rdma_backchannel.c23 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 …]
Dbackchannel.c25 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 …]
Dsvc_rdma_transport.c72 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 svc_xprt_deferred_close(xprt); in qp_event_handler()
275 struct svc_xprt *xprt = &rdma->sc_xprt; in svc_rdma_cma_handler() local
283 svc_xprt_enqueue(xprt); in svc_rdma_cma_handler()
287 svc_xprt_deferred_close(xprt); in svc_rdma_cma_handler()
[all …]
Drpc_rdma.c987 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 …]
Dsvc_rdma_recvfrom.c252 struct svc_xprt *xprt = rqstp->rq_xprt; in svc_rdma_release_rqst() local
254 container_of(xprt, struct svcxprt_rdma, sc_xprt); in svc_rdma_release_rqst()
735 static bool svc_rdma_is_reverse_direction_reply(struct svc_xprt *xprt, in svc_rdma_is_reverse_direction_reply() argument
740 if (!xprt->xpt_bc_xprt) in svc_rdma_is_reverse_direction_reply()
794 struct svc_xprt *xprt = rqstp->rq_xprt; in svc_rdma_recvfrom() local
796 container_of(xprt, struct svcxprt_rdma, sc_xprt); in svc_rdma_recvfrom()
809 clear_bit(XPT_DATA, &xprt->xpt_flags); in svc_rdma_recvfrom()
813 svc_xprt_received(xprt); in svc_rdma_recvfrom()
835 if (svc_rdma_is_reverse_direction_reply(xprt, ctxt)) in svc_rdma_recvfrom()
849 svc_xprt_copy_addrs(rqstp, xprt); in svc_rdma_recvfrom()
/linux-6.1.9/include/trace/events/
Dsunrpc.h145 const struct rpc_xprt *xprt,
150 TP_ARGS(clnt, xprt, program, server),
154 __string(addr, xprt->address_strings[RPC_DISPLAY_ADDR])
155 __string(port, xprt->address_strings[RPC_DISPLAY_PORT])
162 __assign_str(addr, xprt->address_strings[RPC_DISPLAY_ADDR]);
163 __assign_str(port, xprt->address_strings[RPC_DISPLAY_PORT]);
811 struct rpc_xprt *xprt,
815 TP_ARGS(xprt, socket),
856 struct rpc_xprt *xprt, \
859 TP_ARGS(xprt, socket))
[all …]
/linux-6.1.9/fs/nfs/
Dcallback.c143 static inline void nfs_callback_bc_serv(u32 minorversion, struct rpc_xprt *xprt, in nfs_callback_bc_serv() argument
151 xprt->bc_serv = serv; in nfs_callback_bc_serv()
154 static inline void nfs_callback_bc_serv(u32 minorversion, struct rpc_xprt *xprt, in nfs_callback_bc_serv() argument
160 static int nfs_callback_start_svc(int minorversion, struct rpc_xprt *xprt, in nfs_callback_start_svc() argument
166 nfs_callback_bc_serv(minorversion, xprt, serv); in nfs_callback_start_svc()
195 struct net *net, struct rpc_xprt *xprt) in nfs_callback_up_net() argument
214 else if (xprt->ops->bc_setup) in nfs_callback_up_net()
280 int nfs_callback_up(u32 minorversion, struct rpc_xprt *xprt) in nfs_callback_up() argument
285 struct net *net = xprt->xprt_net; in nfs_callback_up()
295 ret = nfs_callback_up_net(minorversion, serv, net, xprt); in nfs_callback_up()
[all …]

12