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()
243 int rxrpc_look_up_bundle(struct rxrpc_call *call, gfp_t gfp) in rxrpc_look_up_bundle() argument
246 struct rxrpc_local *local = call->local; in rxrpc_look_up_bundle()
249 bool upgrade = test_bit(RXRPC_CALL_UPGRADE, &call->flags); in rxrpc_look_up_bundle()
252 call->peer, key_serial(call->key), call->security_level, in rxrpc_look_up_bundle()
255 if (test_bit(RXRPC_CALL_EXCLUSIVE, &call->flags)) { in rxrpc_look_up_bundle()
256 call->bundle = rxrpc_alloc_bundle(call, gfp); in rxrpc_look_up_bundle()
257 return call->bundle ? 0 : -ENOMEM; in rxrpc_look_up_bundle()
268 diff = (cmp(bundle->peer, call->peer) ?: in rxrpc_look_up_bundle()
269 cmp(bundle->key, call->key) ?: in rxrpc_look_up_bundle()
270 cmp(bundle->security_level, call->security_level) ?: in rxrpc_look_up_bundle()
284 candidate = rxrpc_alloc_bundle(call, gfp); in rxrpc_look_up_bundle()
297 diff = (cmp(bundle->peer, call->peer) ?: in rxrpc_look_up_bundle()
298 cmp(bundle->key, call->key) ?: in rxrpc_look_up_bundle()
299 cmp(bundle->security_level, call->security_level) ?: in rxrpc_look_up_bundle()
313 call->bundle = rxrpc_get_bundle(candidate, rxrpc_bundle_get_client_call); in rxrpc_look_up_bundle()
315 _leave(" = B=%u [new]", call->bundle->debug_id); in rxrpc_look_up_bundle()
321 call->bundle = rxrpc_get_bundle(bundle, rxrpc_bundle_get_client_call); in rxrpc_look_up_bundle()
324 _leave(" = B=%u [found]", call->bundle->debug_id); in rxrpc_look_up_bundle()
399 * Assign a channel to the call at the front of the queue and wake the call up.
408 struct rxrpc_call *call = list_entry(bundle->waiting_calls.next, in rxrpc_activate_one_channel() local
414 list_del_init(&call->wait_link); in rxrpc_activate_one_channel()
418 /* Cancel the final ACK on the previous call if it hasn't been sent yet in rxrpc_activate_one_channel()
424 rxrpc_see_call(call, rxrpc_call_see_activate_client); in rxrpc_activate_one_channel()
425 call->conn = rxrpc_get_connection(conn, rxrpc_conn_get_activate_call); in rxrpc_activate_one_channel()
426 call->cid = conn->proto.cid | channel; in rxrpc_activate_one_channel()
427 call->call_id = call_id; in rxrpc_activate_one_channel()
428 call->dest_srx.srx_service = conn->service_id; in rxrpc_activate_one_channel()
429 call->cong_ssthresh = call->peer->cong_ssthresh; in rxrpc_activate_one_channel()
430 if (call->cong_cwnd >= call->cong_ssthresh) in rxrpc_activate_one_channel()
431 call->cong_mode = RXRPC_CALL_CONGEST_AVOIDANCE; in rxrpc_activate_one_channel()
433 call->cong_mode = RXRPC_CALL_SLOW_START; in rxrpc_activate_one_channel()
436 chan->call_debug_id = call->debug_id; in rxrpc_activate_one_channel()
437 chan->call = call; in rxrpc_activate_one_channel()
439 rxrpc_see_call(call, rxrpc_call_see_connected); in rxrpc_activate_one_channel()
440 trace_rxrpc_connect_call(call); in rxrpc_activate_one_channel()
441 call->tx_last_sent = ktime_get_real(); in rxrpc_activate_one_channel()
442 rxrpc_start_call_timer(call); in rxrpc_activate_one_channel()
443 rxrpc_set_call_state(call, RXRPC_CALL_CLIENT_SEND_REQUEST); in rxrpc_activate_one_channel()
444 wake_up(&call->waitq); in rxrpc_activate_one_channel()
501 struct rxrpc_call *call; in rxrpc_connect_client_calls() local
503 while ((call = list_first_entry_or_null(&local->new_client_calls, in rxrpc_connect_client_calls()
506 struct rxrpc_bundle *bundle = call->bundle; in rxrpc_connect_client_calls()
509 list_move_tail(&call->wait_link, &bundle->waiting_calls); in rxrpc_connect_client_calls()
510 rxrpc_see_call(call, rxrpc_call_see_waiting_call); in rxrpc_connect_client_calls()
519 * Note that a call, and thus a connection, is about to be exposed to the
522 void rxrpc_expose_client_call(struct rxrpc_call *call) in rxrpc_expose_client_call() argument
524 unsigned int channel = call->cid & RXRPC_CHANNELMASK; in rxrpc_expose_client_call()
525 struct rxrpc_connection *conn = call->conn; in rxrpc_expose_client_call()
528 if (!test_and_set_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_expose_client_call()
529 /* Mark the call ID as being used. If the callNumber counter in rxrpc_expose_client_call()
539 spin_lock(&call->peer->lock); in rxrpc_expose_client_call()
540 hlist_add_head(&call->error_link, &call->peer->error_targets); in rxrpc_expose_client_call()
541 spin_unlock(&call->peer->lock); in rxrpc_expose_client_call()
560 * Disconnect a client call.
562 void rxrpc_disconnect_client_call(struct rxrpc_bundle *bundle, struct rxrpc_call *call) in rxrpc_disconnect_client_call() argument
571 _enter("c=%x", call->debug_id); in rxrpc_disconnect_client_call()
576 conn = call->conn; in rxrpc_disconnect_client_call()
578 _debug("call is waiting"); in rxrpc_disconnect_client_call()
579 ASSERTCMP(call->call_id, ==, 0); in rxrpc_disconnect_client_call()
580 ASSERT(!test_bit(RXRPC_CALL_EXPOSED, &call->flags)); in rxrpc_disconnect_client_call()
583 list_del_init(&call->wait_link); in rxrpc_disconnect_client_call()
588 cid = call->cid; in rxrpc_disconnect_client_call()
593 if (WARN_ON(chan->call != call)) in rxrpc_disconnect_client_call()
598 /* If a client call was exposed to the world, we save the result for in rxrpc_disconnect_client_call()
601 * We use a barrier here so that the call number and abort code can be in rxrpc_disconnect_client_call()
605 * terminal retransmission without requiring access to the call. in rxrpc_disconnect_client_call()
607 if (test_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_disconnect_client_call()
608 _debug("exposed %u,%u", call->call_id, call->abort_code); in rxrpc_disconnect_client_call()
609 __rxrpc_disconnect_call(conn, call); in rxrpc_disconnect_client_call()
619 /* See if we can pass the channel directly to another call. */ in rxrpc_disconnect_client_call()
627 * can be skipped if we find a follow-on call. The first DATA packet in rxrpc_disconnect_client_call()
628 * of the follow on call will implicitly ACK this call. in rxrpc_disconnect_client_call()
630 if (call->completion == RXRPC_CALL_SUCCEEDED && in rxrpc_disconnect_client_call()
631 test_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_disconnect_client_call()
641 chan->call = NULL; in rxrpc_disconnect_client_call()