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.
357 * Create or find a client bundle to use for a call.
359 * If we return with a connection, the call will be on its waiting list. It's
360 * left to the caller to assign a channel and wake up the call.
363 struct rxrpc_call *call,
370 _enter("{%d,%lx},", call->debug_id, call->user_call_ID);
376 call->cong_cwnd = cp->peer->cong_cwnd;
377 if (call->cong_cwnd >= call->cong_ssthresh)
378 call->cong_mode = RXRPC_CALL_CONGEST_AVOIDANCE;
380 call->cong_mode = RXRPC_CALL_SLOW_START;
382 __set_bit(RXRPC_CALL_UPGRADE, &call->flags);
389 /* Get this call queued. Someone else may activate it whilst we're
393 list_add_tail(&call->chan_wait_link, &bundle->waiting_calls);
477 struct rxrpc_call *call;
491 call = list_first_entry(&bundle->waiting_calls,
493 if (test_bit(RXRPC_CALL_UPGRADE, &call->flags))
515 * Assign a channel to the call at the front of the queue and wake the call up.
524 struct rxrpc_call *call = list_entry(bundle->waiting_calls.next,
532 /* Cancel the final ACK on the previous call if it hasn't been sent yet
538 rxrpc_see_call(call);
539 list_del_init(&call->chan_wait_link);
540 call->peer = rxrpc_get_peer(conn->params.peer);
541 call->conn = rxrpc_get_connection(conn);
542 call->cid = conn->proto.cid | channel;
543 call->call_id = call_id;
544 call->security = conn->security;
545 call->security_ix = conn->security_ix;
546 call->service_id = conn->service_id;
548 trace_rxrpc_connect_call(call);
549 _net("CONNECT call %08x:%08x as call %d on conn %d",
550 call->cid, call->call_id, call->debug_id, conn->debug_id);
552 write_lock_bh(&call->state_lock);
553 call->state = RXRPC_CALL_CLIENT_SEND_REQUEST;
554 write_unlock_bh(&call->state_lock);
561 * confirm it until the call is about to be exposed.
564 * at the call ID through a connection channel.
569 chan->call_debug_id = call->debug_id;
570 rcu_assign_pointer(chan->call, call);
571 wake_up(&call->waitq);
651 * Wait for a callNumber and a channel to be granted to a call.
654 struct rxrpc_call *call, gfp_t gfp)
659 _enter("%d", call->debug_id);
668 add_wait_queue_exclusive(&call->waitq, &myself);
676 switch (call->interruptibility) {
686 if (READ_ONCE(call->state) != RXRPC_CALL_CLIENT_AWAIT_CONN)
688 if ((call->interruptibility == RXRPC_INTERRUPTIBLE ||
689 call->interruptibility == RXRPC_PREINTERRUPTIBLE) &&
696 remove_wait_queue(&call->waitq, &myself);
705 * find a connection for a call
709 struct rxrpc_call *call,
718 _enter("{%d,%lx},", call->debug_id, call->user_call_ID);
722 bundle = rxrpc_prep_call(rx, call, cp, srx, gfp);
728 if (call->state == RXRPC_CALL_CLIENT_AWAIT_CONN) {
729 ret = rxrpc_wait_for_channel(bundle, call, gfp);
747 list_del_init(&call->chan_wait_link);
750 if (call->state != RXRPC_CALL_CLIENT_AWAIT_CONN) {
755 trace_rxrpc_client(call->conn, ret, rxrpc_client_chan_wait_failed);
756 rxrpc_set_call_completion(call, RXRPC_CALL_LOCAL_ERROR, 0, ret);
757 rxrpc_disconnect_client_call(bundle, call);
762 * Note that a call, and thus a connection, is about to be exposed to the
765 void rxrpc_expose_client_call(struct rxrpc_call *call)
767 unsigned int channel = call->cid & RXRPC_CHANNELMASK;
768 struct rxrpc_connection *conn = call->conn;
771 if (!test_and_set_bit(RXRPC_CALL_EXPOSED, &call->flags)) {
772 /* Mark the call ID as being used. If the callNumber counter
799 * Disconnect a client call.
801 void rxrpc_disconnect_client_call(struct rxrpc_bundle *bundle, struct rxrpc_call *call)
810 _enter("c=%x", call->debug_id);
813 set_bit(RXRPC_CALL_DISCONNECTED, &call->flags);
818 conn = call->conn;
820 _debug("call is waiting");
821 ASSERTCMP(call->call_id, ==, 0);
822 ASSERT(!test_bit(RXRPC_CALL_EXPOSED, &call->flags));
823 list_del_init(&call->chan_wait_link);
827 cid = call->cid;
832 if (rcu_access_pointer(chan->call) != call) {
839 /* If a client call was exposed to the world, we save the result for
842 * We use a barrier here so that the call number and abort code can be
846 * terminal retransmission without requiring access to the call.
848 if (test_bit(RXRPC_CALL_EXPOSED, &call->flags)) {
849 _debug("exposed %u,%u", call->call_id, call->abort_code);
850 __rxrpc_disconnect_call(conn, call);
861 /* See if we can pass the channel directly to another call. */
869 * can be skipped if we find a follow-on call. The first DATA packet
870 * of the follow on call will implicitly ACK this call.
872 if (call->completion == RXRPC_CALL_SUCCEEDED &&
873 test_bit(RXRPC_CALL_EXPOSED, &call->flags)) {
883 rcu_assign_pointer(chan->call, NULL);