Lines Matching refs:rx
34 static int rxrpc_service_prealloc_one(struct rxrpc_sock *rx, in rxrpc_service_prealloc_one() argument
42 struct rxrpc_net *rxnet = rxrpc_net(sock_net(&rx->sk)); in rxrpc_service_prealloc_one()
48 max = rx->sk.sk_max_ack_backlog; in rxrpc_service_prealloc_one()
49 tmp = rx->sk.sk_ack_backlog; in rxrpc_service_prealloc_one()
74 peer = rxrpc_alloc_peer(rx->local, gfp, rxrpc_peer_new_prealloc); in rxrpc_service_prealloc_one()
98 call = rxrpc_alloc_call(rx, gfp, debug_id); in rxrpc_service_prealloc_one()
108 write_lock(&rx->call_lock); in rxrpc_service_prealloc_one()
111 pp = &rx->calls.rb_node; in rxrpc_service_prealloc_one()
133 rb_insert_color(&call->sock_node, &rx->calls); in rxrpc_service_prealloc_one()
136 list_add(&call->sock_link, &rx->sock_calls); in rxrpc_service_prealloc_one()
138 write_unlock(&rx->call_lock); in rxrpc_service_prealloc_one()
151 write_unlock(&rx->call_lock); in rxrpc_service_prealloc_one()
161 int rxrpc_service_prealloc(struct rxrpc_sock *rx, gfp_t gfp) in rxrpc_service_prealloc() argument
163 struct rxrpc_backlog *b = rx->backlog; in rxrpc_service_prealloc()
169 rx->backlog = b; in rxrpc_service_prealloc()
178 void rxrpc_discard_prealloc(struct rxrpc_sock *rx) in rxrpc_discard_prealloc() argument
180 struct rxrpc_backlog *b = rx->backlog; in rxrpc_discard_prealloc()
181 struct rxrpc_net *rxnet = rxrpc_net(sock_net(&rx->sk)); in rxrpc_discard_prealloc()
186 rx->backlog = NULL; in rxrpc_discard_prealloc()
191 spin_lock(&rx->incoming_lock); in rxrpc_discard_prealloc()
192 spin_unlock(&rx->incoming_lock); in rxrpc_discard_prealloc()
221 rcu_assign_pointer(call->socket, rx); in rxrpc_discard_prealloc()
222 if (rx->discard_new_call) { in rxrpc_discard_prealloc()
224 rx->discard_new_call(call, call->user_call_ID); in rxrpc_discard_prealloc()
230 rxrpc_release_call(rx, call); in rxrpc_discard_prealloc()
242 static struct rxrpc_call *rxrpc_alloc_incoming_call(struct rxrpc_sock *rx, in rxrpc_alloc_incoming_call() argument
250 struct rxrpc_backlog *b = rx->backlog; in rxrpc_alloc_incoming_call()
294 rxrpc_new_incoming_connection(rx, conn, sec, skb); in rxrpc_alloc_incoming_call()
338 struct rxrpc_sock *rx; in rxrpc_new_incoming_call() local
352 rx = local->service; in rxrpc_new_incoming_call()
353 if (!rx || (sp->hdr.serviceId != rx->srx.srx_service && in rxrpc_new_incoming_call()
354 sp->hdr.serviceId != rx->second_service) in rxrpc_new_incoming_call()
363 sec = rxrpc_get_incoming_security(rx, skb); in rxrpc_new_incoming_call()
368 spin_lock(&rx->incoming_lock); in rxrpc_new_incoming_call()
369 if (rx->sk.sk_state == RXRPC_SERVER_LISTEN_DISABLED || in rxrpc_new_incoming_call()
370 rx->sk.sk_state == RXRPC_CLOSE) { in rxrpc_new_incoming_call()
376 call = rxrpc_alloc_incoming_call(rx, local, peer, conn, sec, peer_srx, in rxrpc_new_incoming_call()
387 rxrpc_incoming_call(rx, call, skb); in rxrpc_new_incoming_call()
390 if (rx->notify_new_call) in rxrpc_new_incoming_call()
391 rx->notify_new_call(&rx->sk, call, call->user_call_ID); in rxrpc_new_incoming_call()
401 spin_unlock(&rx->incoming_lock); in rxrpc_new_incoming_call()
424 spin_unlock(&rx->incoming_lock); in rxrpc_new_incoming_call()
436 int rxrpc_user_charge_accept(struct rxrpc_sock *rx, unsigned long user_call_ID) in rxrpc_user_charge_accept() argument
438 struct rxrpc_backlog *b = rx->backlog; in rxrpc_user_charge_accept()
440 if (rx->sk.sk_state == RXRPC_CLOSE) in rxrpc_user_charge_accept()
443 return rxrpc_service_prealloc_one(rx, b, NULL, NULL, user_call_ID, in rxrpc_user_charge_accept()
469 struct rxrpc_sock *rx = rxrpc_sk(sock->sk); in rxrpc_kernel_charge_accept() local
470 struct rxrpc_backlog *b = rx->backlog; in rxrpc_kernel_charge_accept()
475 return rxrpc_service_prealloc_one(rx, b, notify_rx, in rxrpc_kernel_charge_accept()