Lines Matching refs:net
36 int afs_open_socket(struct afs_net *net) in afs_open_socket() argument
44 ret = sock_create_kern(net->net, AF_RXRPC, SOCK_DGRAM, PF_INET6, &socket); in afs_open_socket()
91 net->socket = socket; in afs_open_socket()
92 afs_charge_preallocation(&net->charge_preallocation_work); in afs_open_socket()
106 void afs_close_socket(struct afs_net *net) in afs_close_socket() argument
110 kernel_listen(net->socket, 0); in afs_close_socket()
113 if (net->spare_incoming_call) { in afs_close_socket()
114 afs_put_call(net->spare_incoming_call); in afs_close_socket()
115 net->spare_incoming_call = NULL; in afs_close_socket()
118 _debug("outstanding %u", atomic_read(&net->nr_outstanding_calls)); in afs_close_socket()
119 wait_var_event(&net->nr_outstanding_calls, in afs_close_socket()
120 !atomic_read(&net->nr_outstanding_calls)); in afs_close_socket()
123 kernel_sock_shutdown(net->socket, SHUT_RDWR); in afs_close_socket()
125 sock_release(net->socket); in afs_close_socket()
134 static struct afs_call *afs_alloc_call(struct afs_net *net, in afs_alloc_call() argument
146 call->net = net; in afs_alloc_call()
154 o = atomic_inc_return(&net->nr_outstanding_calls); in afs_alloc_call()
165 struct afs_net *net = call->net; in afs_put_call() local
170 o = atomic_read(&net->nr_outstanding_calls); in afs_put_call()
179 rxrpc_kernel_end_call(net->socket, call->rxcall); in afs_put_call()
185 afs_unuse_server_notime(call->net, call->server, afs_server_trace_put_call); in afs_put_call()
193 o = atomic_dec_return(&net->nr_outstanding_calls); in afs_put_call()
195 wake_up_var(&net->nr_outstanding_calls); in afs_put_call()
207 atomic_read(&call->net->nr_outstanding_calls), in afs_get_call()
229 struct afs_call *afs_alloc_flat_call(struct afs_net *net, in afs_alloc_flat_call() argument
235 call = afs_alloc_call(net, type, GFP_NOFS); in afs_alloc_flat_call()
310 atomic_read(&call->net->nr_outstanding_calls)); in afs_make_call()
332 rxcall = rxrpc_kernel_begin_call(call->net->socket, srx, call->key, in afs_make_call()
351 rxrpc_kernel_set_max_life(call->net->socket, rxcall, in afs_make_call()
366 ret = rxrpc_kernel_send_data(call->net->socket, rxcall, in afs_make_call()
377 ret = rxrpc_kernel_send_data(call->net->socket, in afs_make_call()
398 rxrpc_kernel_abort_call(call->net->socket, rxcall, in afs_make_call()
403 rxrpc_kernel_recv_data(call->net->socket, rxcall, in afs_make_call()
420 rxrpc_kernel_end_call(call->net->socket, call->rxcall); in afs_make_call()
488 ret = rxrpc_kernel_recv_data(call->net->socket, in afs_deliver_to_call()
528 rxrpc_kernel_abort_call(call->net->socket, call->rxcall, in afs_deliver_to_call()
543 rxrpc_kernel_abort_call(call->net->socket, call->rxcall, in afs_deliver_to_call()
548 rxrpc_kernel_abort_call(call->net->socket, call->rxcall, in afs_deliver_to_call()
602 if (!rxrpc_kernel_check_life(call->net->socket, call->rxcall)) { in afs_wait_for_call_to_complete()
620 if (rxrpc_kernel_abort_call(call->net->socket, call->rxcall, in afs_wait_for_call_to_complete()
676 atomic_read(&call->net->nr_outstanding_calls), in afs_wake_up_async_call()
715 struct afs_net *net = in afs_charge_preallocation() local
717 struct afs_call *call = net->spare_incoming_call; in afs_charge_preallocation()
721 call = afs_alloc_call(net, &afs_RXCMxxxx, GFP_KERNEL); in afs_charge_preallocation()
732 if (rxrpc_kernel_charge_accept(net->socket, in afs_charge_preallocation()
741 net->spare_incoming_call = call; in afs_charge_preallocation()
762 struct afs_net *net = afs_sock2net(sk); in afs_rx_new_call() local
764 queue_work(afs_wq, &net->charge_preallocation_work); in afs_rx_new_call()
815 struct afs_net *net = call->net; in afs_send_empty_reply() local
820 rxrpc_kernel_set_tx_length(net->socket, call->rxcall, 0); in afs_send_empty_reply()
829 switch (rxrpc_kernel_send_data(net->socket, call->rxcall, &msg, 0, in afs_send_empty_reply()
837 rxrpc_kernel_abort_call(net->socket, call->rxcall, in afs_send_empty_reply()
851 struct afs_net *net = call->net; in afs_send_simple_reply() local
858 rxrpc_kernel_set_tx_length(net->socket, call->rxcall, len); in afs_send_simple_reply()
869 n = rxrpc_kernel_send_data(net->socket, call->rxcall, &msg, len, in afs_send_simple_reply()
879 rxrpc_kernel_abort_call(net->socket, call->rxcall, in afs_send_simple_reply()
890 struct afs_net *net = call->net; in afs_extract_data() local
899 ret = rxrpc_kernel_recv_data(net->socket, call->rxcall, iter, in afs_extract_data()