Lines Matching refs:rx

34 static int rxrpc_service_prealloc_one(struct rxrpc_sock *rx,  in rxrpc_service_prealloc_one()  argument
43 struct rxrpc_net *rxnet = rxrpc_net(sock_net(&rx->sk)); in rxrpc_service_prealloc_one()
49 max = rx->sk.sk_max_ack_backlog; in rxrpc_service_prealloc_one()
50 tmp = rx->sk.sk_ack_backlog; in rxrpc_service_prealloc_one()
73 struct rxrpc_peer *peer = rxrpc_alloc_peer(rx->local, gfp); in rxrpc_service_prealloc_one()
100 call = rxrpc_alloc_call(rx, gfp, debug_id); in rxrpc_service_prealloc_one()
110 write_lock(&rx->call_lock); in rxrpc_service_prealloc_one()
113 pp = &rx->calls.rb_node; in rxrpc_service_prealloc_one()
135 rb_insert_color(&call->sock_node, &rx->calls); in rxrpc_service_prealloc_one()
138 list_add(&call->sock_link, &rx->sock_calls); in rxrpc_service_prealloc_one()
140 write_unlock(&rx->call_lock); in rxrpc_service_prealloc_one()
153 write_unlock(&rx->call_lock); in rxrpc_service_prealloc_one()
163 int rxrpc_service_prealloc(struct rxrpc_sock *rx, gfp_t gfp) in rxrpc_service_prealloc() argument
165 struct rxrpc_backlog *b = rx->backlog; in rxrpc_service_prealloc()
171 rx->backlog = b; in rxrpc_service_prealloc()
180 void rxrpc_discard_prealloc(struct rxrpc_sock *rx) in rxrpc_discard_prealloc() argument
182 struct rxrpc_backlog *b = rx->backlog; in rxrpc_discard_prealloc()
183 struct rxrpc_net *rxnet = rxrpc_net(sock_net(&rx->sk)); in rxrpc_discard_prealloc()
188 rx->backlog = NULL; in rxrpc_discard_prealloc()
193 spin_lock_bh(&rx->incoming_lock); in rxrpc_discard_prealloc()
194 spin_unlock_bh(&rx->incoming_lock); in rxrpc_discard_prealloc()
223 rcu_assign_pointer(call->socket, rx); in rxrpc_discard_prealloc()
224 if (rx->discard_new_call) { in rxrpc_discard_prealloc()
226 rx->discard_new_call(call, call->user_call_ID); in rxrpc_discard_prealloc()
232 rxrpc_release_call(rx, call); in rxrpc_discard_prealloc()
260 static struct rxrpc_call *rxrpc_alloc_incoming_call(struct rxrpc_sock *rx, in rxrpc_alloc_incoming_call() argument
267 struct rxrpc_backlog *b = rx->backlog; in rxrpc_alloc_incoming_call()
301 rxrpc_new_incoming_peer(rx, local, peer); in rxrpc_alloc_incoming_call()
312 rxrpc_new_incoming_connection(rx, conn, sec, skb); in rxrpc_alloc_incoming_call()
348 struct rxrpc_sock *rx, in rxrpc_new_incoming_call() argument
359 spin_lock(&rx->incoming_lock); in rxrpc_new_incoming_call()
360 if (rx->sk.sk_state == RXRPC_SERVER_LISTEN_DISABLED || in rxrpc_new_incoming_call()
361 rx->sk.sk_state == RXRPC_CLOSE) { in rxrpc_new_incoming_call()
377 sec = rxrpc_get_incoming_security(rx, skb); in rxrpc_new_incoming_call()
382 call = rxrpc_alloc_incoming_call(rx, local, peer, conn, sec, skb); in rxrpc_new_incoming_call()
392 rxrpc_incoming_call(rx, call, skb); in rxrpc_new_incoming_call()
395 if (rx->notify_new_call) in rxrpc_new_incoming_call()
396 rx->notify_new_call(&rx->sk, call, call->user_call_ID); in rxrpc_new_incoming_call()
425 spin_unlock(&rx->incoming_lock); in rxrpc_new_incoming_call()
440 spin_unlock(&rx->incoming_lock); in rxrpc_new_incoming_call()
448 int rxrpc_user_charge_accept(struct rxrpc_sock *rx, unsigned long user_call_ID) in rxrpc_user_charge_accept() argument
450 struct rxrpc_backlog *b = rx->backlog; in rxrpc_user_charge_accept()
452 if (rx->sk.sk_state == RXRPC_CLOSE) in rxrpc_user_charge_accept()
455 return rxrpc_service_prealloc_one(rx, b, NULL, NULL, user_call_ID, in rxrpc_user_charge_accept()
481 struct rxrpc_sock *rx = rxrpc_sk(sock->sk); in rxrpc_kernel_charge_accept() local
482 struct rxrpc_backlog *b = rx->backlog; in rxrpc_kernel_charge_accept()
487 return rxrpc_service_prealloc_one(rx, b, notify_rx, in rxrpc_kernel_charge_accept()