Lines Matching refs:xprt
266 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
467 xps = xprt_switch_alloc(xprt, GFP_KERNEL); in rpc_create_xprt()
469 xprt_put(xprt); in rpc_create_xprt()
472 if (xprt->bc_xprt) { in rpc_create_xprt()
474 xprt->bc_xprt->xpt_bc_xps = xps; in rpc_create_xprt()
477 clnt = rpc_new_client(args, xps, xprt, NULL); in rpc_create_xprt()
526 struct rpc_xprt *xprt; in rpc_create() local
542 xprt = args->bc_xprt->xpt_bc_xprt; in rpc_create()
543 if (xprt) { in rpc_create()
544 xprt_get(xprt); in rpc_create()
545 return rpc_create_xprt(args, xprt); in rpc_create()
587 xprt = xprt_create_transport(&xprtargs); in rpc_create()
588 if (IS_ERR(xprt)) in rpc_create()
589 return (struct rpc_clnt *)xprt; in rpc_create()
597 xprt->resvport = 1; in rpc_create()
599 xprt->resvport = 0; in rpc_create()
600 xprt->reuseport = 0; in rpc_create()
602 xprt->reuseport = 1; in rpc_create()
604 clnt = rpc_create_xprt(args, xprt); in rpc_create()
625 struct rpc_xprt *xprt; in __rpc_clone_client() local
631 xprt = xprt_get(rcu_dereference(clnt->cl_xprt)); in __rpc_clone_client()
634 if (xprt == NULL || xps == NULL) { in __rpc_clone_client()
635 xprt_put(xprt); in __rpc_clone_client()
639 args->servername = xprt->servername; in __rpc_clone_client()
642 new = rpc_new_client(args, xps, xprt, clnt); in __rpc_clone_client()
726 struct rpc_xprt *xprt, *old; in rpc_switch_client_transport() local
730 xprt = xprt_create_transport(args); in rpc_switch_client_transport()
731 if (IS_ERR(xprt)) in rpc_switch_client_transport()
732 return PTR_ERR(xprt); in rpc_switch_client_transport()
734 xps = xprt_switch_alloc(xprt, GFP_KERNEL); in rpc_switch_client_transport()
736 xprt_put(xprt); in rpc_switch_client_transport()
743 old = rpc_clnt_set_transport(clnt, xprt, timeout); in rpc_switch_client_transport()
782 xprt_put(xprt); in rpc_switch_client_transport()
839 struct rpc_xprt *xprt = xprt_iter_get_next(&xpi); in rpc_clnt_iterate_for_each_xprt() local
841 if (!xprt) in rpc_clnt_iterate_for_each_xprt()
843 ret = fn(clnt, xprt, data); in rpc_clnt_iterate_for_each_xprt()
844 xprt_put(xprt); in rpc_clnt_iterate_for_each_xprt()
914 struct rpc_xprt *xprt, void *dummy) in rpc_clnt_disconnect_xprt() argument
916 if (xprt_connected(xprt)) in rpc_clnt_disconnect_xprt()
917 xprt_force_disconnect(xprt); in rpc_clnt_disconnect_xprt()
1062 rpc_task_get_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt) in rpc_task_get_xprt() argument
1066 if (!xprt) in rpc_task_get_xprt()
1072 atomic_long_inc(&xprt->queuelen); in rpc_task_get_xprt()
1074 return xprt; in rpc_task_get_xprt()
1078 rpc_task_release_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt) in rpc_task_release_xprt() argument
1082 atomic_long_dec(&xprt->queuelen); in rpc_task_release_xprt()
1088 xprt_put(xprt); in rpc_task_release_xprt()
1093 struct rpc_xprt *xprt = task->tk_xprt; in rpc_task_release_transport() local
1095 if (xprt) { in rpc_task_release_transport()
1098 rpc_task_release_xprt(task->tk_client, xprt); in rpc_task_release_transport()
1100 xprt_put(xprt); in rpc_task_release_transport()
1124 struct rpc_xprt *xprt; in rpc_task_get_first_xprt() local
1127 xprt = xprt_get(rcu_dereference(clnt->cl_xprt)); in rpc_task_get_first_xprt()
1129 return rpc_task_get_xprt(clnt, xprt); in rpc_task_get_first_xprt()
1363 struct rpc_xprt *xprt; in rpc_peeraddr() local
1366 xprt = rcu_dereference(clnt->cl_xprt); in rpc_peeraddr()
1368 bytes = xprt->addrlen; in rpc_peeraddr()
1371 memcpy(buf, &xprt->addr, bytes); in rpc_peeraddr()
1390 struct rpc_xprt *xprt; in rpc_peeraddr2str() local
1392 xprt = rcu_dereference(clnt->cl_xprt); in rpc_peeraddr2str()
1394 if (xprt->address_strings[format] != NULL) in rpc_peeraddr2str()
1395 return xprt->address_strings[format]; in rpc_peeraddr2str()
1529 struct rpc_xprt *xprt; in rpc_localaddr() local
1535 xprt = rcu_dereference(clnt->cl_xprt); in rpc_localaddr()
1536 salen = xprt->addrlen; in rpc_localaddr()
1537 memcpy(sap, &xprt->addr, salen); in rpc_localaddr()
1538 net = get_net(xprt->xprt_net); in rpc_localaddr()
1554 struct rpc_xprt *xprt; in rpc_setbufsize() local
1557 xprt = rcu_dereference(clnt->cl_xprt); in rpc_setbufsize()
1558 if (xprt->ops->set_buffer_size) in rpc_setbufsize()
1559 xprt->ops->set_buffer_size(xprt, sndsize, rcvsize); in rpc_setbufsize()
1606 struct rpc_xprt *xprt; in rpc_max_bc_payload() local
1610 xprt = rcu_dereference(clnt->cl_xprt); in rpc_max_bc_payload()
1611 ret = xprt->ops->bc_maxpayload(xprt); in rpc_max_bc_payload()
1619 struct rpc_xprt *xprt; in rpc_num_bc_slots() local
1623 xprt = rcu_dereference(clnt->cl_xprt); in rpc_num_bc_slots()
1624 ret = xprt->ops->bc_num_slots(xprt); in rpc_num_bc_slots()
1848 struct rpc_xprt *xprt = req->rq_xprt; in call_allocate() local
1880 status = xprt->ops->buf_alloc(task); in call_allocate()
2002 struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt; in call_bind() local
2009 if (xprt_bound(xprt)) { in call_bind()
2018 xprt->ops->rpcbind(task); in call_bind()
2027 struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt; in call_bind_status() local
2037 if (xprt_bound(xprt)) { in call_bind_status()
2110 struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt; in call_connect() local
2117 if (xprt_connected(xprt)) { in call_connect()
2140 struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt; in call_connect_status() local
2155 if (xprt_connected(xprt)) { in call_connect_status()
2191 test_bit(XPRT_REMOVE, &xprt->state)) { in call_connect_status()
2202 value = atomic_long_dec_return(&xprt->queuelen); in call_connect_status()
2801 struct rpc_xprt *xprt, struct rpc_cred *cred, int flags, in rpc_call_null_helper() argument
2809 .rpc_xprt = xprt, in rpc_call_null_helper()
2864 struct rpc_xprt *xprt; member
2872 rpc_xprt_switch_add_xprt(data->xps, data->xprt); in rpc_cb_add_xprt_done()
2879 xprt_put(data->xprt); in rpc_cb_add_xprt_release()
2898 struct rpc_xprt_switch *xps, struct rpc_xprt *xprt, in rpc_clnt_test_and_add_xprt() argument
2917 data->xprt = xprt_get(xprt); in rpc_clnt_test_and_add_xprt()
2918 if (rpc_xprt_switch_has_addr(data->xps, (struct sockaddr *)&xprt->addr)) { in rpc_clnt_test_and_add_xprt()
2923 task = rpc_call_null_helper(clnt, xprt, NULL, RPC_TASK_ASYNC, in rpc_clnt_test_and_add_xprt()
2936 struct rpc_xprt *xprt, in rpc_clnt_add_xprt_helper() argument
2943 task = rpc_call_null_helper(clnt, xprt, NULL, 0, NULL, NULL); in rpc_clnt_add_xprt_helper()
2954 data->add_xprt_test(clnt, xprt, data->data); in rpc_clnt_add_xprt_helper()
2979 struct rpc_xprt *xprt, in rpc_clnt_setup_test_and_add_xprt() argument
2984 xprt = xprt_get(xprt); in rpc_clnt_setup_test_and_add_xprt()
2987 if (rpc_xprt_switch_has_addr(xps, (struct sockaddr *)&xprt->addr)) in rpc_clnt_setup_test_and_add_xprt()
2990 status = rpc_clnt_add_xprt_helper(clnt, xprt, data); in rpc_clnt_setup_test_and_add_xprt()
2996 xprt_put(xprt); in rpc_clnt_setup_test_and_add_xprt()
3001 xprt->address_strings[RPC_DISPLAY_ADDR]); in rpc_clnt_setup_test_and_add_xprt()
3029 struct rpc_xprt *xprt; in rpc_clnt_add_xprt() local
3037 xprt = xprt_iter_xprt(&clnt->cl_xpi); in rpc_clnt_add_xprt()
3038 if (xps == NULL || xprt == NULL) { in rpc_clnt_add_xprt()
3043 resvport = xprt->resvport; in rpc_clnt_add_xprt()
3044 reuseport = xprt->reuseport; in rpc_clnt_add_xprt()
3045 connect_timeout = xprt->connect_timeout; in rpc_clnt_add_xprt()
3046 reconnect_timeout = xprt->max_reconnect_timeout; in rpc_clnt_add_xprt()
3047 ident = xprt->xprt_class->ident; in rpc_clnt_add_xprt()
3052 xprt = xprt_create_transport(xprtargs); in rpc_clnt_add_xprt()
3053 if (IS_ERR(xprt)) { in rpc_clnt_add_xprt()
3054 ret = PTR_ERR(xprt); in rpc_clnt_add_xprt()
3057 xprt->resvport = resvport; in rpc_clnt_add_xprt()
3058 xprt->reuseport = reuseport; in rpc_clnt_add_xprt()
3059 if (xprt->ops->set_connect_timeout != NULL) in rpc_clnt_add_xprt()
3060 xprt->ops->set_connect_timeout(xprt, in rpc_clnt_add_xprt()
3066 ret = setup(clnt, xps, xprt, data); in rpc_clnt_add_xprt()
3070 rpc_xprt_switch_add_xprt(xps, xprt); in rpc_clnt_add_xprt()
3072 xprt_put(xprt); in rpc_clnt_add_xprt()
3080 struct rpc_xprt *xprt, in rpc_xprt_probe_trunked() argument
3087 xprt_get(xprt); in rpc_xprt_probe_trunked()
3092 status = rpc_cmp_addr_port((struct sockaddr *)&xprt->addr, in rpc_xprt_probe_trunked()
3096 if (status || !test_bit(XPRT_OFFLINE, &xprt->state)) in rpc_xprt_probe_trunked()
3099 status = rpc_clnt_add_xprt_helper(clnt, xprt, data); in rpc_xprt_probe_trunked()
3101 xprt_put(xprt); in rpc_xprt_probe_trunked()
3123 struct rpc_xprt *xprt = xprt_iter_get_next(&xpi); in rpc_clnt_probe_trunked_xprts() local
3125 if (!xprt) in rpc_clnt_probe_trunked_xprts()
3127 ret = rpc_xprt_probe_trunked(clnt, xprt, data); in rpc_clnt_probe_trunked_xprts()
3128 xprt_put(xprt); in rpc_clnt_probe_trunked_xprts()
3138 struct rpc_xprt *xprt, in rpc_xprt_offline() argument
3145 xprt_get(xprt); in rpc_xprt_offline()
3150 err = rpc_cmp_addr_port((struct sockaddr *)&xprt->addr, in rpc_xprt_offline()
3157 if (wait_on_bit_lock(&xprt->state, XPRT_LOCKED, TASK_KILLABLE)) { in rpc_xprt_offline()
3161 xprt_set_offline_locked(xprt, xps); in rpc_xprt_offline()
3163 xprt_release_write(xprt, NULL); in rpc_xprt_offline()
3165 xprt_put(xprt); in rpc_xprt_offline()
3190 struct rpc_xprt *xprt, in rpc_xprt_set_connect_timeout() argument
3195 if (xprt->ops->set_connect_timeout) in rpc_xprt_set_connect_timeout()
3196 xprt->ops->set_connect_timeout(xprt, in rpc_xprt_set_connect_timeout()
3225 void rpc_clnt_xprt_set_online(struct rpc_clnt *clnt, struct rpc_xprt *xprt) in rpc_clnt_xprt_set_online() argument
3232 xprt_set_online_locked(xprt, xps); in rpc_clnt_xprt_set_online()
3235 void rpc_clnt_xprt_switch_add_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt) in rpc_clnt_xprt_switch_add_xprt() argument
3238 (const struct sockaddr *)&xprt->addr)) { in rpc_clnt_xprt_switch_add_xprt()
3239 return rpc_clnt_xprt_set_online(clnt, xprt); in rpc_clnt_xprt_switch_add_xprt()
3243 xprt); in rpc_clnt_xprt_switch_add_xprt()
3248 void rpc_clnt_xprt_switch_remove_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt) in rpc_clnt_xprt_switch_remove_xprt() argument
3255 xprt, 0); in rpc_clnt_xprt_switch_remove_xprt()
3323 struct rpc_xprt *xprt, in rpc_clnt_swap_activate_callback() argument
3326 return xprt_enable_swap(xprt); in rpc_clnt_swap_activate_callback()
3343 struct rpc_xprt *xprt, in rpc_clnt_swap_deactivate_callback() argument
3346 xprt_disable_swap(xprt); in rpc_clnt_swap_deactivate_callback()