Lines Matching refs:rxnet

15 	struct rxrpc_net *rxnet =  in rxrpc_service_conn_reap_timeout()  local
18 if (rxnet->live) in rxrpc_service_conn_reap_timeout()
19 rxrpc_queue_work(&rxnet->service_conn_reaper); in rxrpc_service_conn_reap_timeout()
24 struct rxrpc_net *rxnet = in rxrpc_peer_keepalive_timeout() local
27 if (rxnet->live) in rxrpc_peer_keepalive_timeout()
28 rxrpc_queue_work(&rxnet->peer_keepalive_work); in rxrpc_peer_keepalive_timeout()
36 struct rxrpc_net *rxnet = rxrpc_net(net); in rxrpc_init_net() local
39 rxnet->live = true; in rxrpc_init_net()
40 get_random_bytes(&rxnet->epoch, sizeof(rxnet->epoch)); in rxrpc_init_net()
41 rxnet->epoch |= RXRPC_RANDOM_EPOCH; in rxrpc_init_net()
43 INIT_LIST_HEAD(&rxnet->calls); in rxrpc_init_net()
44 spin_lock_init(&rxnet->call_lock); in rxrpc_init_net()
45 atomic_set(&rxnet->nr_calls, 1); in rxrpc_init_net()
47 atomic_set(&rxnet->nr_conns, 1); in rxrpc_init_net()
48 INIT_LIST_HEAD(&rxnet->bundle_proc_list); in rxrpc_init_net()
49 INIT_LIST_HEAD(&rxnet->conn_proc_list); in rxrpc_init_net()
50 INIT_LIST_HEAD(&rxnet->service_conns); in rxrpc_init_net()
51 rwlock_init(&rxnet->conn_lock); in rxrpc_init_net()
52 INIT_WORK(&rxnet->service_conn_reaper, in rxrpc_init_net()
54 timer_setup(&rxnet->service_conn_reap_timer, in rxrpc_init_net()
57 atomic_set(&rxnet->nr_client_conns, 0); in rxrpc_init_net()
59 INIT_HLIST_HEAD(&rxnet->local_endpoints); in rxrpc_init_net()
60 mutex_init(&rxnet->local_mutex); in rxrpc_init_net()
62 hash_init(rxnet->peer_hash); in rxrpc_init_net()
63 spin_lock_init(&rxnet->peer_hash_lock); in rxrpc_init_net()
64 for (i = 0; i < ARRAY_SIZE(rxnet->peer_keepalive); i++) in rxrpc_init_net()
65 INIT_LIST_HEAD(&rxnet->peer_keepalive[i]); in rxrpc_init_net()
66 INIT_LIST_HEAD(&rxnet->peer_keepalive_new); in rxrpc_init_net()
67 timer_setup(&rxnet->peer_keepalive_timer, in rxrpc_init_net()
69 INIT_WORK(&rxnet->peer_keepalive_work, rxrpc_peer_keepalive_worker); in rxrpc_init_net()
70 rxnet->peer_keepalive_base = ktime_get_seconds(); in rxrpc_init_net()
73 rxnet->proc_net = proc_net_mkdir(net, "rxrpc", net->proc_net); in rxrpc_init_net()
74 if (!rxnet->proc_net) in rxrpc_init_net()
77 proc_create_net("calls", 0444, rxnet->proc_net, &rxrpc_call_seq_ops, in rxrpc_init_net()
79 proc_create_net("conns", 0444, rxnet->proc_net, in rxrpc_init_net()
82 proc_create_net("bundles", 0444, rxnet->proc_net, in rxrpc_init_net()
85 proc_create_net("peers", 0444, rxnet->proc_net, in rxrpc_init_net()
88 proc_create_net("locals", 0444, rxnet->proc_net, in rxrpc_init_net()
91 proc_create_net_single_write("stats", S_IFREG | 0644, rxnet->proc_net, in rxrpc_init_net()
96 rxnet->live = false; in rxrpc_init_net()
105 struct rxrpc_net *rxnet = rxrpc_net(net); in rxrpc_exit_net() local
107 rxnet->live = false; in rxrpc_exit_net()
108 del_timer_sync(&rxnet->peer_keepalive_timer); in rxrpc_exit_net()
109 cancel_work_sync(&rxnet->peer_keepalive_work); in rxrpc_exit_net()
111 del_timer_sync(&rxnet->peer_keepalive_timer); in rxrpc_exit_net()
112 rxrpc_destroy_all_calls(rxnet); in rxrpc_exit_net()
113 rxrpc_destroy_all_connections(rxnet); in rxrpc_exit_net()
114 rxrpc_destroy_all_peers(rxnet); in rxrpc_exit_net()
115 rxrpc_destroy_all_locals(rxnet); in rxrpc_exit_net()
116 proc_remove(rxnet->proc_net); in rxrpc_exit_net()