Lines Matching defs: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,
81 bundle->local = call->local;
82 bundle->peer = rxrpc_get_peer(call->peer, rxrpc_peer_get_bundle);
83 bundle->key = key_get(call->key);
84 bundle->security = call->security;
85 bundle->exclusive = test_bit(RXRPC_CALL_EXCLUSIVE, &call->flags);
86 bundle->upgrade = test_bit(RXRPC_CALL_UPGRADE, &call->flags);
87 bundle->service_id = call->dest_srx.srx_service;
88 bundle->security_level = call->security_level;
243 int rxrpc_look_up_bundle(struct rxrpc_call *call, gfp_t gfp)
246 struct rxrpc_local *local = call->local;
249 bool upgrade = test_bit(RXRPC_CALL_UPGRADE, &call->flags);
252 call->peer, key_serial(call->key), call->security_level,
255 if (test_bit(RXRPC_CALL_EXCLUSIVE, &call->flags)) {
256 call->bundle = rxrpc_alloc_bundle(call, gfp);
257 return call->bundle ? 0 : -ENOMEM;
268 diff = (cmp(bundle->peer, call->peer) ?:
269 cmp(bundle->key, call->key) ?:
270 cmp(bundle->security_level, call->security_level) ?:
284 candidate = rxrpc_alloc_bundle(call, gfp);
297 diff = (cmp(bundle->peer, call->peer) ?:
298 cmp(bundle->key, call->key) ?:
299 cmp(bundle->security_level, call->security_level) ?:
313 call->bundle = rxrpc_get_bundle(candidate, rxrpc_bundle_get_client_call);
315 _leave(" = B=%u [new]", call->bundle->debug_id);
321 call->bundle = rxrpc_get_bundle(bundle, rxrpc_bundle_get_client_call);
324 _leave(" = B=%u [found]", call->bundle->debug_id);
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,
414 list_del_init(&call->wait_link);
418 /* Cancel the final ACK on the previous call if it hasn't been sent yet
424 rxrpc_see_call(call, rxrpc_call_see_activate_client);
425 call->conn = rxrpc_get_connection(conn, rxrpc_conn_get_activate_call);
426 call->cid = conn->proto.cid | channel;
427 call->call_id = call_id;
428 call->dest_srx.srx_service = conn->service_id;
429 call->cong_ssthresh = call->peer->cong_ssthresh;
430 if (call->cong_cwnd >= call->cong_ssthresh)
431 call->cong_mode = RXRPC_CALL_CONGEST_AVOIDANCE;
433 call->cong_mode = RXRPC_CALL_SLOW_START;
436 chan->call_debug_id = call->debug_id;
437 chan->call = call;
439 rxrpc_see_call(call, rxrpc_call_see_connected);
440 trace_rxrpc_connect_call(call);
441 call->tx_last_sent = ktime_get_real();
442 rxrpc_start_call_timer(call);
443 rxrpc_set_call_state(call, RXRPC_CALL_CLIENT_SEND_REQUEST);
444 wake_up(&call->waitq);
501 struct rxrpc_call *call;
503 while ((call = list_first_entry_or_null(&local->new_client_calls,
506 struct rxrpc_bundle *bundle = call->bundle;
509 list_move_tail(&call->wait_link, &bundle->waiting_calls);
518 * Note that a call, and thus a connection, is about to be exposed to the
521 void rxrpc_expose_client_call(struct rxrpc_call *call)
523 unsigned int channel = call->cid & RXRPC_CHANNELMASK;
524 struct rxrpc_connection *conn = call->conn;
527 if (!test_and_set_bit(RXRPC_CALL_EXPOSED, &call->flags)) {
528 /* Mark the call ID as being used. If the callNumber counter
538 spin_lock(&call->peer->lock);
539 hlist_add_head(&call->error_link, &call->peer->error_targets);
540 spin_unlock(&call->peer->lock);
559 * Disconnect a client call.
561 void rxrpc_disconnect_client_call(struct rxrpc_bundle *bundle, struct rxrpc_call *call)
570 _enter("c=%x", call->debug_id);
575 conn = call->conn;
577 _debug("call is waiting");
578 ASSERTCMP(call->call_id, ==, 0);
579 ASSERT(!test_bit(RXRPC_CALL_EXPOSED, &call->flags));
580 list_del_init(&call->wait_link);
584 cid = call->cid;
589 if (WARN_ON(chan->call != call))
594 /* If a client call was exposed to the world, we save the result for
597 * We use a barrier here so that the call number and abort code can be
601 * terminal retransmission without requiring access to the call.
603 if (test_bit(RXRPC_CALL_EXPOSED, &call->flags)) {
604 _debug("exposed %u,%u", call->call_id, call->abort_code);
605 __rxrpc_disconnect_call(conn, call);
615 /* See if we can pass the channel directly to another call. */
623 * can be skipped if we find a follow-on call. The first DATA packet
624 * of the follow on call will implicitly ACK this call.
626 if (call->completion == RXRPC_CALL_SUCCEEDED &&
627 test_bit(RXRPC_CALL_EXPOSED, &call->flags)) {
637 chan->call = NULL;