Lines Matching refs:call
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()
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()
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_mode = RXRPC_CALL_CONGEST_AVOIDANCE; in rxrpc_activate_one_channel()
442 call->cong_mode = RXRPC_CALL_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
512 while ((call = list_first_entry_or_null(&local->new_client_calls, in rxrpc_connect_client_calls()
515 struct rxrpc_bundle *bundle = call->bundle; in rxrpc_connect_client_calls()
518 list_move_tail(&call->wait_link, &bundle->waiting_calls); in rxrpc_connect_client_calls()
519 rxrpc_see_call(call, rxrpc_call_see_waiting_call); in rxrpc_connect_client_calls()
531 void rxrpc_expose_client_call(struct rxrpc_call *call) in rxrpc_expose_client_call() argument
533 unsigned int channel = call->cid & RXRPC_CHANNELMASK; in rxrpc_expose_client_call()
534 struct rxrpc_connection *conn = call->conn; in rxrpc_expose_client_call()
537 if (!test_and_set_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_expose_client_call()
548 spin_lock(&call->peer->lock); in rxrpc_expose_client_call()
549 hlist_add_head(&call->error_link, &call->peer->error_targets); in rxrpc_expose_client_call()
550 spin_unlock(&call->peer->lock); in rxrpc_expose_client_call()
571 void rxrpc_disconnect_client_call(struct rxrpc_bundle *bundle, struct rxrpc_call *call) in rxrpc_disconnect_client_call() argument
580 _enter("c=%x", call->debug_id); in rxrpc_disconnect_client_call()
585 conn = call->conn; in rxrpc_disconnect_client_call()
588 ASSERTCMP(call->call_id, ==, 0); in rxrpc_disconnect_client_call()
589 ASSERT(!test_bit(RXRPC_CALL_EXPOSED, &call->flags)); in rxrpc_disconnect_client_call()
592 list_del_init(&call->wait_link); in rxrpc_disconnect_client_call()
597 cid = call->cid; in rxrpc_disconnect_client_call()
602 if (WARN_ON(chan->call != call)) in rxrpc_disconnect_client_call()
616 if (test_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_disconnect_client_call()
617 _debug("exposed %u,%u", call->call_id, call->abort_code); in rxrpc_disconnect_client_call()
618 __rxrpc_disconnect_call(conn, call); in rxrpc_disconnect_client_call()
639 if (call->completion == RXRPC_CALL_SUCCEEDED && in rxrpc_disconnect_client_call()
640 test_bit(RXRPC_CALL_EXPOSED, &call->flags)) { in rxrpc_disconnect_client_call()
650 chan->call = NULL; in rxrpc_disconnect_client_call()