Lines Matching full:call

8  * call so as to handle retransmitted DATA packets in case the server didn't
15 * or a call ID counter overflows.
73 static struct rxrpc_bundle *rxrpc_alloc_bundle(struct rxrpc_call *call, in rxrpc_alloc_bundle() argument
81 bundle->local = call->local; in rxrpc_alloc_bundle()
82 bundle->peer = rxrpc_get_peer(call->peer, rxrpc_peer_get_bundle); in rxrpc_alloc_bundle()
83 bundle->key = key_get(call->key); in rxrpc_alloc_bundle()
84 bundle->security = call->security; in rxrpc_alloc_bundle()
85 bundle->exclusive = test_bit(RXRPC_CALL_EXCLUSIVE, &call->flags); in rxrpc_alloc_bundle()
86 bundle->upgrade = test_bit(RXRPC_CALL_UPGRADE, &call->flags); in rxrpc_alloc_bundle()
87 bundle->service_id = call->dest_srx.srx_service; in rxrpc_alloc_bundle()
88 bundle->security_level = call->security_level; in rxrpc_alloc_bundle()
250 int rxrpc_look_up_bundle(struct rxrpc_call *call, gfp_t gfp) in rxrpc_look_up_bundle() argument
253 struct rxrpc_local *local = call->local; in rxrpc_look_up_bundle()
256 bool upgrade = test_bit(RXRPC_CALL_UPGRADE, &call->flags); in rxrpc_look_up_bundle()
259 call->peer, key_serial(call->key), call->security_level, in rxrpc_look_up_bundle()
262 if (test_bit(RXRPC_CALL_EXCLUSIVE, &call->flags)) { in rxrpc_look_up_bundle()
263 call->bundle = rxrpc_alloc_bundle(call, gfp); in rxrpc_look_up_bundle()
264 return call->bundle ? 0 : -ENOMEM; in rxrpc_look_up_bundle()
275 diff = (cmp(bundle->peer, call->peer) ?: in rxrpc_look_up_bundle()
276 cmp(bundle->key, call->key) ?: in rxrpc_look_up_bundle()
277 cmp(bundle->security_level, call->security_level) ?: in rxrpc_look_up_bundle()
291 candidate = rxrpc_alloc_bundle(call, gfp); in rxrpc_look_up_bundle()
304 diff = (cmp(bundle->peer, call->peer) ?: in rxrpc_look_up_bundle()
305 cmp(bundle->key, call->key) ?: in rxrpc_look_up_bundle()
306 cmp(bundle->security_level, call->security_level) ?: in rxrpc_look_up_bundle()
320 call->bundle = rxrpc_get_bundle(candidate, rxrpc_bundle_get_client_call); in rxrpc_look_up_bundle()
322 _leave(" = B=%u [new]", call->bundle->debug_id); in rxrpc_look_up_bundle()
328 call->bundle = rxrpc_get_bundle(bundle, rxrpc_bundle_get_client_call); in rxrpc_look_up_bundle()
331 _leave(" = B=%u [found]", call->bundle->debug_id); in rxrpc_look_up_bundle()
408 * Assign a channel to the call at the front of the queue and wake the call up.
417 struct rxrpc_call *call = list_entry(bundle->waiting_calls.next, in rxrpc_activate_one_channel() local
423 list_del_init(&call->wait_link); in rxrpc_activate_one_channel()
427 /* Cancel the final ACK on the previous call if it hasn't been sent yet in rxrpc_activate_one_channel()
433 rxrpc_see_call(call, rxrpc_call_see_activate_client); in rxrpc_activate_one_channel()
434 call->conn = rxrpc_get_connection(conn, rxrpc_conn_get_activate_call); in rxrpc_activate_one_channel()
435 call->cid = conn->proto.cid | channel; in rxrpc_activate_one_channel()
436 call->call_id = call_id; in rxrpc_activate_one_channel()
437 call->dest_srx.srx_service = conn->service_id; in rxrpc_activate_one_channel()
438 call->cong_ssthresh = call->peer->cong_ssthresh; in rxrpc_activate_one_channel()
439 if (call->cong_cwnd >= call->cong_ssthresh) in rxrpc_activate_one_channel()
440 call->cong_ca_state = RXRPC_CA_CONGEST_AVOIDANCE; in rxrpc_activate_one_channel()
442 call->cong_ca_state = RXRPC_CA_SLOW_START; in rxrpc_activate_one_channel()
445 chan->call_debug_id = call->debug_id; in rxrpc_activate_one_channel()
446 chan->call = call; in rxrpc_activate_one_channel()
448 rxrpc_see_call(call, rxrpc_call_see_connected); in rxrpc_activate_one_channel()
449 trace_rxrpc_connect_call(call); in rxrpc_activate_one_channel()
450 call->tx_last_sent = ktime_get_real(); in rxrpc_activate_one_channel()
451 rxrpc_start_call_timer(call); in rxrpc_activate_one_channel()
452 rxrpc_set_call_state(call, RXRPC_CALL_CLIENT_SEND_REQUEST); in rxrpc_activate_one_channel()
453 wake_up(&call->waitq); in rxrpc_activate_one_channel()
510 struct rxrpc_call *call; in rxrpc_connect_client_calls() local
517 while ((call = list_first_entry_or_null(&new_client_calls, in rxrpc_connect_client_calls()
519 struct rxrpc_bundle *bundle = call->bundle; in rxrpc_connect_client_calls()
521 list_move_tail(&call->wait_link, &bundle->waiting_calls); in rxrpc_connect_client_calls()
522 rxrpc_see_call(call, rxrpc_call_see_waiting_call); in rxrpc_connect_client_calls()
530 * Note that a call, and thus a connection, is about to be exposed to the
533 void rxrpc_expose_client_call(struct rxrpc_call *call) in rxrpc_expose_client_call() argument
535 unsigned int channel = call->cid & RXRPC_CHANNELMASK; in rxrpc_expose_client_call()
536 struct rxrpc_connection *conn = call->conn; in rxrpc_expose_client_call()
539 if (!test_and_set_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_expose_client_call()
540 /* Mark the call ID as being used. If the callNumber counter in rxrpc_expose_client_call()
550 spin_lock_irq(&call->peer->lock); in rxrpc_expose_client_call()
551 hlist_add_head(&call->error_link, &call->peer->error_targets); in rxrpc_expose_client_call()
552 spin_unlock_irq(&call->peer->lock); in rxrpc_expose_client_call()
571 * Disconnect a client call.
573 void rxrpc_disconnect_client_call(struct rxrpc_bundle *bundle, struct rxrpc_call *call) in rxrpc_disconnect_client_call() argument
582 _enter("c=%x", call->debug_id); in rxrpc_disconnect_client_call()
587 conn = call->conn; in rxrpc_disconnect_client_call()
589 _debug("call is waiting"); in rxrpc_disconnect_client_call()
590 ASSERTCMP(call->call_id, ==, 0); in rxrpc_disconnect_client_call()
591 ASSERT(!test_bit(RXRPC_CALL_EXPOSED, &call->flags)); in rxrpc_disconnect_client_call()
594 list_del_init(&call->wait_link); in rxrpc_disconnect_client_call()
599 cid = call->cid; in rxrpc_disconnect_client_call()
604 if (WARN_ON(chan->call != call)) in rxrpc_disconnect_client_call()
609 /* If a client call was exposed to the world, we save the result for in rxrpc_disconnect_client_call()
612 * We use a barrier here so that the call number and abort code can be in rxrpc_disconnect_client_call()
616 * terminal retransmission without requiring access to the call. in rxrpc_disconnect_client_call()
618 if (test_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_disconnect_client_call()
619 _debug("exposed %u,%u", call->call_id, call->abort_code); in rxrpc_disconnect_client_call()
620 __rxrpc_disconnect_call(conn, call); in rxrpc_disconnect_client_call()
630 /* See if we can pass the channel directly to another call. */ in rxrpc_disconnect_client_call()
638 * can be skipped if we find a follow-on call. The first DATA packet in rxrpc_disconnect_client_call()
639 * of the follow on call will implicitly ACK this call. in rxrpc_disconnect_client_call()
641 if (call->completion == RXRPC_CALL_SUCCEEDED && in rxrpc_disconnect_client_call()
642 test_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_disconnect_client_call()
652 chan->call = NULL; in rxrpc_disconnect_client_call()