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
80 bundle->local = call->local; in rxrpc_alloc_bundle()
81 bundle->peer = rxrpc_get_peer(call->peer, rxrpc_peer_get_bundle); in rxrpc_alloc_bundle()
82 bundle->key = key_get(call->key); in rxrpc_alloc_bundle()
83 bundle->security = call->security; in rxrpc_alloc_bundle()
84 bundle->exclusive = test_bit(RXRPC_CALL_EXCLUSIVE, &call->flags); in rxrpc_alloc_bundle()
85 bundle->upgrade = test_bit(RXRPC_CALL_UPGRADE, &call->flags); in rxrpc_alloc_bundle()
86 bundle->service_id = call->dest_srx.srx_service; in rxrpc_alloc_bundle()
87 bundle->security_level = call->security_level; in rxrpc_alloc_bundle()
240 int rxrpc_look_up_bundle(struct rxrpc_call *call, gfp_t gfp) in rxrpc_look_up_bundle() argument
244 struct rxrpc_local *local = call->local; in rxrpc_look_up_bundle()
247 bool upgrade = test_bit(RXRPC_CALL_UPGRADE, &call->flags); in rxrpc_look_up_bundle()
250 call->peer, key_serial(call->key), call->security_level, in rxrpc_look_up_bundle()
253 if (test_bit(RXRPC_CALL_EXCLUSIVE, &call->flags)) { in rxrpc_look_up_bundle()
254 call->bundle = rxrpc_alloc_bundle(call, gfp); in rxrpc_look_up_bundle()
255 return call->bundle ? 0 : -ENOMEM; in rxrpc_look_up_bundle()
266 diff = (cmp(bundle->peer, call->peer) ?: in rxrpc_look_up_bundle()
267 cmp(bundle->key, call->key) ?: in rxrpc_look_up_bundle()
268 cmp(bundle->security_level, call->security_level) ?: in rxrpc_look_up_bundle()
282 candidate = rxrpc_alloc_bundle(call, gfp); in rxrpc_look_up_bundle()
295 diff = (cmp(bundle->peer, call->peer) ?: in rxrpc_look_up_bundle()
296 cmp(bundle->key, call->key) ?: in rxrpc_look_up_bundle()
297 cmp(bundle->security_level, call->security_level) ?: in rxrpc_look_up_bundle()
312 call->bundle = rxrpc_get_bundle(candidate, rxrpc_bundle_get_client_call); in rxrpc_look_up_bundle()
314 _leave(" = B=%u [new]", call->bundle->debug_id); in rxrpc_look_up_bundle()
320 call->bundle = rxrpc_get_bundle(bundle, rxrpc_bundle_get_client_call); in rxrpc_look_up_bundle()
323 _leave(" = B=%u [found]", call->bundle->debug_id); in rxrpc_look_up_bundle()
398 * Assign a channel to the call at the front of the queue and wake the call up.
407 struct rxrpc_call *call = list_entry(bundle->waiting_calls.next, in rxrpc_activate_one_channel() local
413 list_del_init(&call->wait_link); in rxrpc_activate_one_channel()
417 /* Cancel the final ACK on the previous call if it hasn't been sent yet in rxrpc_activate_one_channel()
423 rxrpc_see_call(call, rxrpc_call_see_activate_client); in rxrpc_activate_one_channel()
424 call->conn = rxrpc_get_connection(conn, rxrpc_conn_get_activate_call); in rxrpc_activate_one_channel()
425 call->cid = conn->proto.cid | channel; in rxrpc_activate_one_channel()
426 call->call_id = call_id; in rxrpc_activate_one_channel()
427 call->dest_srx.srx_service = conn->service_id; in rxrpc_activate_one_channel()
428 call->cong_ssthresh = call->peer->cong_ssthresh; in rxrpc_activate_one_channel()
429 if (call->cong_cwnd >= call->cong_ssthresh) in rxrpc_activate_one_channel()
430 call->cong_mode = RXRPC_CALL_CONGEST_AVOIDANCE; in rxrpc_activate_one_channel()
432 call->cong_mode = RXRPC_CALL_SLOW_START; in rxrpc_activate_one_channel()
435 chan->call_debug_id = call->debug_id; in rxrpc_activate_one_channel()
436 chan->call = call; in rxrpc_activate_one_channel()
438 rxrpc_see_call(call, rxrpc_call_see_connected); in rxrpc_activate_one_channel()
439 trace_rxrpc_connect_call(call); in rxrpc_activate_one_channel()
440 call->tx_last_sent = ktime_get_real(); in rxrpc_activate_one_channel()
441 rxrpc_start_call_timer(call); in rxrpc_activate_one_channel()
442 rxrpc_set_call_state(call, RXRPC_CALL_CLIENT_SEND_REQUEST); in rxrpc_activate_one_channel()
443 wake_up(&call->waitq); in rxrpc_activate_one_channel()
500 struct rxrpc_call *call; in rxrpc_connect_client_calls() local
502 while ((call = list_first_entry_or_null(&local->new_client_calls, in rxrpc_connect_client_calls()
505 struct rxrpc_bundle *bundle = call->bundle; in rxrpc_connect_client_calls()
508 list_move_tail(&call->wait_link, &bundle->waiting_calls); in rxrpc_connect_client_calls()
517 * Note that a call, and thus a connection, is about to be exposed to the
520 void rxrpc_expose_client_call(struct rxrpc_call *call) in rxrpc_expose_client_call() argument
522 unsigned int channel = call->cid & RXRPC_CHANNELMASK; in rxrpc_expose_client_call()
523 struct rxrpc_connection *conn = call->conn; in rxrpc_expose_client_call()
526 if (!test_and_set_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_expose_client_call()
527 /* Mark the call ID as being used. If the callNumber counter in rxrpc_expose_client_call()
537 spin_lock(&call->peer->lock); in rxrpc_expose_client_call()
538 hlist_add_head(&call->error_link, &call->peer->error_targets); in rxrpc_expose_client_call()
539 spin_unlock(&call->peer->lock); in rxrpc_expose_client_call()
558 * Disconnect a client call.
560 void rxrpc_disconnect_client_call(struct rxrpc_bundle *bundle, struct rxrpc_call *call) in rxrpc_disconnect_client_call() argument
569 _enter("c=%x", call->debug_id); in rxrpc_disconnect_client_call()
574 conn = call->conn; in rxrpc_disconnect_client_call()
576 _debug("call is waiting"); in rxrpc_disconnect_client_call()
577 ASSERTCMP(call->call_id, ==, 0); in rxrpc_disconnect_client_call()
578 ASSERT(!test_bit(RXRPC_CALL_EXPOSED, &call->flags)); in rxrpc_disconnect_client_call()
579 list_del_init(&call->wait_link); in rxrpc_disconnect_client_call()
583 cid = call->cid; in rxrpc_disconnect_client_call()
588 if (WARN_ON(chan->call != call)) in rxrpc_disconnect_client_call()
593 /* If a client call was exposed to the world, we save the result for in rxrpc_disconnect_client_call()
596 * We use a barrier here so that the call number and abort code can be in rxrpc_disconnect_client_call()
600 * terminal retransmission without requiring access to the call. in rxrpc_disconnect_client_call()
602 if (test_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_disconnect_client_call()
603 _debug("exposed %u,%u", call->call_id, call->abort_code); in rxrpc_disconnect_client_call()
604 __rxrpc_disconnect_call(conn, call); in rxrpc_disconnect_client_call()
614 /* See if we can pass the channel directly to another call. */ in rxrpc_disconnect_client_call()
622 * can be skipped if we find a follow-on call. The first DATA packet in rxrpc_disconnect_client_call()
623 * of the follow on call will implicitly ACK this call. in rxrpc_disconnect_client_call()
625 if (call->completion == RXRPC_CALL_SUCCEEDED && in rxrpc_disconnect_client_call()
626 test_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_disconnect_client_call()
636 chan->call = NULL; in rxrpc_disconnect_client_call()