Lines Matching refs:rxnet
15 struct rxrpc_net *rxnet =
18 if (rxnet->live)
19 rxrpc_queue_work(&rxnet->client_conn_reaper);
24 struct rxrpc_net *rxnet =
27 if (rxnet->live)
28 rxrpc_queue_work(&rxnet->service_conn_reaper);
33 struct rxrpc_net *rxnet =
36 if (rxnet->live)
37 rxrpc_queue_work(&rxnet->peer_keepalive_work);
45 struct rxrpc_net *rxnet = rxrpc_net(net);
48 rxnet->live = true;
49 get_random_bytes(&rxnet->epoch, sizeof(rxnet->epoch));
50 rxnet->epoch |= RXRPC_RANDOM_EPOCH;
52 INIT_LIST_HEAD(&rxnet->calls);
53 rwlock_init(&rxnet->call_lock);
54 atomic_set(&rxnet->nr_calls, 1);
56 atomic_set(&rxnet->nr_conns, 1);
57 INIT_LIST_HEAD(&rxnet->conn_proc_list);
58 INIT_LIST_HEAD(&rxnet->service_conns);
59 rwlock_init(&rxnet->conn_lock);
60 INIT_WORK(&rxnet->service_conn_reaper,
62 timer_setup(&rxnet->service_conn_reap_timer,
65 atomic_set(&rxnet->nr_client_conns, 0);
66 rxnet->kill_all_client_conns = false;
67 spin_lock_init(&rxnet->client_conn_cache_lock);
68 spin_lock_init(&rxnet->client_conn_discard_lock);
69 INIT_LIST_HEAD(&rxnet->idle_client_conns);
70 INIT_WORK(&rxnet->client_conn_reaper,
72 timer_setup(&rxnet->client_conn_reap_timer,
75 INIT_HLIST_HEAD(&rxnet->local_endpoints);
76 mutex_init(&rxnet->local_mutex);
78 hash_init(rxnet->peer_hash);
79 spin_lock_init(&rxnet->peer_hash_lock);
80 for (i = 0; i < ARRAY_SIZE(rxnet->peer_keepalive); i++)
81 INIT_LIST_HEAD(&rxnet->peer_keepalive[i]);
82 INIT_LIST_HEAD(&rxnet->peer_keepalive_new);
83 timer_setup(&rxnet->peer_keepalive_timer,
85 INIT_WORK(&rxnet->peer_keepalive_work, rxrpc_peer_keepalive_worker);
86 rxnet->peer_keepalive_base = ktime_get_seconds();
89 rxnet->proc_net = proc_net_mkdir(net, "rxrpc", net->proc_net);
90 if (!rxnet->proc_net)
93 proc_create_net("calls", 0444, rxnet->proc_net, &rxrpc_call_seq_ops,
95 proc_create_net("conns", 0444, rxnet->proc_net,
98 proc_create_net("peers", 0444, rxnet->proc_net,
101 proc_create_net("locals", 0444, rxnet->proc_net,
107 rxnet->live = false;
116 struct rxrpc_net *rxnet = rxrpc_net(net);
118 rxnet->live = false;
119 del_timer_sync(&rxnet->peer_keepalive_timer);
120 cancel_work_sync(&rxnet->peer_keepalive_work);
122 del_timer_sync(&rxnet->peer_keepalive_timer);
123 rxrpc_destroy_all_calls(rxnet);
124 rxrpc_destroy_all_connections(rxnet);
125 rxrpc_destroy_all_peers(rxnet);
126 rxrpc_destroy_all_locals(rxnet);
127 proc_remove(rxnet->proc_net);