Lines Matching full:call

27 			      struct rxrpc_call *call, rxrpc_seq_t seq)  in rxrpc_proto_abort()  argument
29 if (rxrpc_abort_call(why, call, seq, RX_PROTOCOL_ERROR, -EBADMSG)) { in rxrpc_proto_abort()
30 set_bit(RXRPC_CALL_EV_ABORT, &call->events); in rxrpc_proto_abort()
31 rxrpc_queue_call(call); in rxrpc_proto_abort()
38 static void rxrpc_congestion_management(struct rxrpc_call *call, in rxrpc_congestion_management() argument
44 unsigned int cumulative_acks = call->cong_cumul_acks; in rxrpc_congestion_management()
45 unsigned int cwnd = call->cong_cwnd; in rxrpc_congestion_management()
49 (call->tx_top - call->tx_hard_ack) - summary->nr_acks; in rxrpc_congestion_management()
51 if (test_and_clear_bit(RXRPC_CALL_RETRANS_TIMEOUT, &call->flags)) { in rxrpc_congestion_management()
53 call->cong_ssthresh = max_t(unsigned int, in rxrpc_congestion_management()
56 if (cwnd >= call->cong_ssthresh && in rxrpc_congestion_management()
57 call->cong_mode == RXRPC_CALL_SLOW_START) { in rxrpc_congestion_management()
58 call->cong_mode = RXRPC_CALL_CONGEST_AVOIDANCE; in rxrpc_congestion_management()
59 call->cong_tstamp = skb->tstamp; in rxrpc_congestion_management()
69 summary->mode = call->cong_mode; in rxrpc_congestion_management()
70 summary->cwnd = call->cong_cwnd; in rxrpc_congestion_management()
71 summary->ssthresh = call->cong_ssthresh; in rxrpc_congestion_management()
73 summary->dup_acks = call->cong_dup_acks; in rxrpc_congestion_management()
75 switch (call->cong_mode) { in rxrpc_congestion_management()
81 if (cwnd >= call->cong_ssthresh) { in rxrpc_congestion_management()
82 call->cong_mode = RXRPC_CALL_CONGEST_AVOIDANCE; in rxrpc_congestion_management()
83 call->cong_tstamp = skb->tstamp; in rxrpc_congestion_management()
94 if (call->peer->rtt_count == 0) in rxrpc_congestion_management()
97 ktime_add_us(call->cong_tstamp, in rxrpc_congestion_management()
98 call->peer->srtt_us >> 3))) in rxrpc_congestion_management()
101 call->cong_tstamp = skb->tstamp; in rxrpc_congestion_management()
112 call->cong_dup_acks = 1; in rxrpc_congestion_management()
113 if (call->cong_extra > 1) in rxrpc_congestion_management()
114 call->cong_extra = 1; in rxrpc_congestion_management()
118 call->cong_dup_acks++; in rxrpc_congestion_management()
119 if (call->cong_dup_acks < 3) in rxrpc_congestion_management()
123 call->cong_mode = RXRPC_CALL_FAST_RETRANSMIT; in rxrpc_congestion_management()
124 call->cong_ssthresh = max_t(unsigned int, in rxrpc_congestion_management()
126 cwnd = call->cong_ssthresh + 3; in rxrpc_congestion_management()
127 call->cong_extra = 0; in rxrpc_congestion_management()
128 call->cong_dup_acks = 0; in rxrpc_congestion_management()
136 call->cong_dup_acks++; in rxrpc_congestion_management()
137 if (call->cong_dup_acks == 2) { in rxrpc_congestion_management()
139 call->cong_dup_acks = 0; in rxrpc_congestion_management()
144 cwnd = call->cong_ssthresh; in rxrpc_congestion_management()
157 call->cong_dup_acks = 0; in rxrpc_congestion_management()
158 call->cong_extra = 0; in rxrpc_congestion_management()
159 call->cong_tstamp = skb->tstamp; in rxrpc_congestion_management()
160 if (cwnd < call->cong_ssthresh) in rxrpc_congestion_management()
161 call->cong_mode = RXRPC_CALL_SLOW_START; in rxrpc_congestion_management()
163 call->cong_mode = RXRPC_CALL_CONGEST_AVOIDANCE; in rxrpc_congestion_management()
169 call->cong_cwnd = cwnd; in rxrpc_congestion_management()
170 call->cong_cumul_acks = cumulative_acks; in rxrpc_congestion_management()
171 trace_rxrpc_congest(call, summary, acked_serial, change); in rxrpc_congestion_management()
172 if (resend && !test_and_set_bit(RXRPC_CALL_EV_RESEND, &call->events)) in rxrpc_congestion_management()
173 rxrpc_queue_call(call); in rxrpc_congestion_management()
178 call->cong_mode = RXRPC_CALL_PACKET_LOSS; in rxrpc_congestion_management()
179 call->cong_dup_acks = 0; in rxrpc_congestion_management()
186 if (call->rxtx_annotations[call->tx_top & RXRPC_RXTX_BUFF_MASK] & in rxrpc_congestion_management()
188 summary->nr_acks != call->tx_top - call->tx_hard_ack) { in rxrpc_congestion_management()
189 call->cong_extra++; in rxrpc_congestion_management()
190 wake_up(&call->waitq); in rxrpc_congestion_management()
198 static bool rxrpc_rotate_tx_window(struct rxrpc_call *call, rxrpc_seq_t to, in rxrpc_rotate_tx_window() argument
206 if (call->acks_lowest_nak == call->tx_hard_ack) { in rxrpc_rotate_tx_window()
207 call->acks_lowest_nak = to; in rxrpc_rotate_tx_window()
208 } else if (before_eq(call->acks_lowest_nak, to)) { in rxrpc_rotate_tx_window()
210 call->acks_lowest_nak = to; in rxrpc_rotate_tx_window()
213 spin_lock(&call->lock); in rxrpc_rotate_tx_window()
215 while (before(call->tx_hard_ack, to)) { in rxrpc_rotate_tx_window()
216 call->tx_hard_ack++; in rxrpc_rotate_tx_window()
217 ix = call->tx_hard_ack & RXRPC_RXTX_BUFF_MASK; in rxrpc_rotate_tx_window()
218 skb = call->rxtx_buffer[ix]; in rxrpc_rotate_tx_window()
219 annotation = call->rxtx_annotations[ix]; in rxrpc_rotate_tx_window()
221 call->rxtx_buffer[ix] = NULL; in rxrpc_rotate_tx_window()
222 call->rxtx_annotations[ix] = 0; in rxrpc_rotate_tx_window()
227 set_bit(RXRPC_CALL_TX_LAST, &call->flags); in rxrpc_rotate_tx_window()
234 spin_unlock(&call->lock); in rxrpc_rotate_tx_window()
236 trace_rxrpc_transmit(call, (rot_last ? in rxrpc_rotate_tx_window()
239 wake_up(&call->waitq); in rxrpc_rotate_tx_window()
252 * End the transmission phase of a call.
257 static bool rxrpc_end_tx_phase(struct rxrpc_call *call, bool reply_begun, in rxrpc_end_tx_phase() argument
262 ASSERT(test_bit(RXRPC_CALL_TX_LAST, &call->flags)); in rxrpc_end_tx_phase()
264 write_lock(&call->state_lock); in rxrpc_end_tx_phase()
266 state = call->state; in rxrpc_end_tx_phase()
271 call->state = state = RXRPC_CALL_CLIENT_RECV_REPLY; in rxrpc_end_tx_phase()
273 call->state = state = RXRPC_CALL_CLIENT_AWAIT_REPLY; in rxrpc_end_tx_phase()
277 __rxrpc_call_completed(call); in rxrpc_end_tx_phase()
278 state = call->state; in rxrpc_end_tx_phase()
285 write_unlock(&call->state_lock); in rxrpc_end_tx_phase()
287 trace_rxrpc_transmit(call, rxrpc_transmit_await_reply); in rxrpc_end_tx_phase()
289 trace_rxrpc_transmit(call, rxrpc_transmit_end); in rxrpc_end_tx_phase()
294 write_unlock(&call->state_lock); in rxrpc_end_tx_phase()
295 kdebug("end_tx %s", rxrpc_call_states[call->state]); in rxrpc_end_tx_phase()
296 rxrpc_proto_abort(abort_why, call, call->tx_top); in rxrpc_end_tx_phase()
301 * Begin the reply reception phase of a call.
303 static bool rxrpc_receiving_reply(struct rxrpc_call *call) in rxrpc_receiving_reply() argument
307 rxrpc_seq_t top = READ_ONCE(call->tx_top); in rxrpc_receiving_reply()
309 if (call->ackr_reason) { in rxrpc_receiving_reply()
310 spin_lock_bh(&call->lock); in rxrpc_receiving_reply()
311 call->ackr_reason = 0; in rxrpc_receiving_reply()
312 spin_unlock_bh(&call->lock); in rxrpc_receiving_reply()
315 WRITE_ONCE(call->resend_at, timo); in rxrpc_receiving_reply()
316 WRITE_ONCE(call->ack_at, timo); in rxrpc_receiving_reply()
317 trace_rxrpc_timer(call, rxrpc_timer_init_for_reply, now); in rxrpc_receiving_reply()
320 if (!test_bit(RXRPC_CALL_TX_LAST, &call->flags)) { in rxrpc_receiving_reply()
321 if (!rxrpc_rotate_tx_window(call, top, &summary)) { in rxrpc_receiving_reply()
322 rxrpc_proto_abort("TXL", call, top); in rxrpc_receiving_reply()
326 if (!rxrpc_end_tx_phase(call, true, "ETD")) in rxrpc_receiving_reply()
328 call->tx_phase = false; in rxrpc_receiving_reply()
384 * space until the call times out.
387 * call. After that, we tell the other side we're no longer accepting jumbos
390 static void rxrpc_input_dup_data(struct rxrpc_call *call, rxrpc_seq_t seq, in rxrpc_input_dup_data() argument
399 * jumbos for this call. in rxrpc_input_dup_data()
402 call->nr_jumbo_bad++; in rxrpc_input_dup_data()
411 static void rxrpc_input_data(struct rxrpc_call *call, struct sk_buff *skb) in rxrpc_input_data() argument
422 call->rx_hard_ack, call->rx_top, skb->len, seq0); in rxrpc_input_data()
427 state = READ_ONCE(call->state); in rxrpc_input_data()
434 unsigned long timo = READ_ONCE(call->next_req_timo); in rxrpc_input_data()
440 WRITE_ONCE(call->expect_req_by, expect_req_by); in rxrpc_input_data()
441 rxrpc_reduce_call_timer(call, expect_req_by, now, in rxrpc_input_data()
446 spin_lock(&call->input_lock); in rxrpc_input_data()
453 !rxrpc_receiving_reply(call)) in rxrpc_input_data()
456 hard_ack = READ_ONCE(call->rx_hard_ack); in rxrpc_input_data()
460 if (call->nr_jumbo_bad > 3) { in rxrpc_input_data()
479 if (test_bit(RXRPC_CALL_RX_LAST, &call->flags) && in rxrpc_input_data()
480 seq != call->rx_top) { in rxrpc_input_data()
481 rxrpc_proto_abort("LSN", call, seq); in rxrpc_input_data()
485 if (test_bit(RXRPC_CALL_RX_LAST, &call->flags) && in rxrpc_input_data()
486 after_eq(seq, call->rx_top)) { in rxrpc_input_data()
487 rxrpc_proto_abort("LSA", call, seq); in rxrpc_input_data()
499 trace_rxrpc_rx_data(call->debug_id, seq, serial, flags, annotation); in rxrpc_input_data()
507 if (call->rxtx_buffer[ix]) { in rxrpc_input_data()
508 rxrpc_input_dup_data(call, seq, nr_subpackets > 1, in rxrpc_input_data()
518 if (after(seq, hard_ack + call->rx_winsize)) { in rxrpc_input_data()
523 call->nr_jumbo_bad++; in rxrpc_input_data()
536 if (after(seq0, call->ackr_highest_seq)) in rxrpc_input_data()
537 call->ackr_highest_seq = seq0; in rxrpc_input_data()
549 call->rxtx_annotations[ix] = annotation; in rxrpc_input_data()
551 call->rxtx_buffer[ix] = skb; in rxrpc_input_data()
552 if (after(seq, call->rx_top)) { in rxrpc_input_data()
553 smp_store_release(&call->rx_top, seq); in rxrpc_input_data()
554 } else if (before(seq, call->rx_top)) { in rxrpc_input_data()
575 set_bit(RXRPC_CALL_RX_LAST, &call->flags); in rxrpc_input_data()
580 trace_rxrpc_receive(call, rxrpc_receive_queue_last, serial, seq); in rxrpc_input_data()
582 trace_rxrpc_receive(call, rxrpc_receive_queue, serial, seq); in rxrpc_input_data()
585 if (after_eq(seq, call->rx_expect_next)) { in rxrpc_input_data()
586 if (after(seq, call->rx_expect_next)) { in rxrpc_input_data()
587 _net("OOS %u > %u", seq, call->rx_expect_next); in rxrpc_input_data()
591 call->rx_expect_next = seq + 1; in rxrpc_input_data()
598 if (atomic_add_return(nr_unacked, &call->ackr_nr_unacked) > 2 && !ack) in rxrpc_input_data()
602 rxrpc_propose_ACK(call, ack, ack_serial, in rxrpc_input_data()
606 rxrpc_propose_ACK(call, RXRPC_ACK_DELAY, serial, in rxrpc_input_data()
610 trace_rxrpc_notify_socket(call->debug_id, serial); in rxrpc_input_data()
611 rxrpc_notify_socket(call); in rxrpc_input_data()
614 spin_unlock(&call->input_lock); in rxrpc_input_data()
622 static void rxrpc_complete_rtt_probe(struct rxrpc_call *call, in rxrpc_complete_rtt_probe() argument
634 avail = READ_ONCE(call->rtt_avail); in rxrpc_complete_rtt_probe()
637 for (i = 0; i < ARRAY_SIZE(call->rtt_serial); i++) { in rxrpc_complete_rtt_probe()
641 sent_at = call->rtt_sent_at[i]; in rxrpc_complete_rtt_probe()
642 orig_serial = call->rtt_serial[i]; in rxrpc_complete_rtt_probe()
645 clear_bit(i + RXRPC_CALL_RTT_PEND_SHIFT, &call->rtt_avail); in rxrpc_complete_rtt_probe()
647 set_bit(i, &call->rtt_avail); in rxrpc_complete_rtt_probe()
649 rxrpc_peer_add_rtt(call, type, i, acked_serial, ack_serial, in rxrpc_complete_rtt_probe()
652 trace_rxrpc_rtt_rx(call, rxrpc_rtt_rx_cancel, i, in rxrpc_complete_rtt_probe()
661 trace_rxrpc_rtt_rx(call, rxrpc_rtt_rx_obsolete, i, in rxrpc_complete_rtt_probe()
663 clear_bit(i + RXRPC_CALL_RTT_PEND_SHIFT, &call->rtt_avail); in rxrpc_complete_rtt_probe()
665 set_bit(i, &call->rtt_avail); in rxrpc_complete_rtt_probe()
670 trace_rxrpc_rtt_rx(call, rxrpc_rtt_rx_lost, 9, 0, acked_serial, 0, 0); in rxrpc_complete_rtt_probe()
680 static void rxrpc_input_check_for_lost_ack(struct rxrpc_call *call) in rxrpc_input_check_for_lost_ack() argument
685 spin_lock_bh(&call->lock); in rxrpc_input_check_for_lost_ack()
687 bottom = call->tx_hard_ack + 1; in rxrpc_input_check_for_lost_ack()
688 top = call->acks_lost_top; in rxrpc_input_check_for_lost_ack()
692 u8 annotation = call->rxtx_annotations[ix]; in rxrpc_input_check_for_lost_ack()
699 call->rxtx_annotations[ix] = annotation; in rxrpc_input_check_for_lost_ack()
704 spin_unlock_bh(&call->lock); in rxrpc_input_check_for_lost_ack()
706 if (resend && !test_and_set_bit(RXRPC_CALL_EV_RESEND, &call->events)) in rxrpc_input_check_for_lost_ack()
707 rxrpc_queue_call(call); in rxrpc_input_check_for_lost_ack()
713 static void rxrpc_input_ping_response(struct rxrpc_call *call, in rxrpc_input_ping_response() argument
718 if (acked_serial == call->acks_lost_ping) in rxrpc_input_ping_response()
719 rxrpc_input_check_for_lost_ack(call); in rxrpc_input_ping_response()
725 static void rxrpc_input_ackinfo(struct rxrpc_call *call, struct sk_buff *skb, in rxrpc_input_ackinfo() argument
741 if (call->tx_winsize != rwind) { in rxrpc_input_ackinfo()
742 if (rwind > call->tx_winsize) in rxrpc_input_ackinfo()
744 trace_rxrpc_rx_rwind_change(call, sp->hdr.serial, rwind, wake); in rxrpc_input_ackinfo()
745 call->tx_winsize = rwind; in rxrpc_input_ackinfo()
748 if (call->cong_ssthresh > rwind) in rxrpc_input_ackinfo()
749 call->cong_ssthresh = rwind; in rxrpc_input_ackinfo()
753 peer = call->peer; in rxrpc_input_ackinfo()
763 wake_up(&call->waitq); in rxrpc_input_ackinfo()
775 static void rxrpc_input_soft_acks(struct rxrpc_call *call, u8 *acks, in rxrpc_input_soft_acks() argument
784 annotation = call->rxtx_annotations[ix]; in rxrpc_input_soft_acks()
793 call->rxtx_annotations[ix] = in rxrpc_input_soft_acks()
798 call->acks_lowest_nak != seq) { in rxrpc_input_soft_acks()
799 call->acks_lowest_nak = seq; in rxrpc_input_soft_acks()
808 call->rxtx_annotations[ix] = in rxrpc_input_soft_acks()
812 return rxrpc_proto_abort("SFT", call, 0); in rxrpc_input_soft_acks()
821 static bool rxrpc_is_ack_valid(struct rxrpc_call *call, in rxrpc_is_ack_valid() argument
824 rxrpc_seq_t base = READ_ONCE(call->acks_first_seq); in rxrpc_is_ack_valid()
832 if (after_eq(prev_pkt, call->acks_prev_seq)) in rxrpc_is_ack_valid()
836 if (after_eq(prev_pkt, base + call->tx_winsize)) in rxrpc_is_ack_valid()
851 static void rxrpc_input_ack(struct rxrpc_call *call, struct sk_buff *skb) in rxrpc_input_ack() argument
869 return rxrpc_proto_abort("XAK", call, 0); in rxrpc_input_ack()
882 trace_rxrpc_rx_ack(call, ack_serial, acked_serial, in rxrpc_input_ack()
888 rxrpc_input_ping_response(call, skb->tstamp, acked_serial, in rxrpc_input_ack()
890 rxrpc_complete_rtt_probe(call, skb->tstamp, acked_serial, ack_serial, in rxrpc_input_ack()
894 rxrpc_complete_rtt_probe(call, skb->tstamp, acked_serial, ack_serial, in rxrpc_input_ack()
899 rxrpc_complete_rtt_probe(call, skb->tstamp, acked_serial, ack_serial, in rxrpc_input_ack()
906 rxrpc_propose_ACK(call, RXRPC_ACK_PING_RESPONSE, in rxrpc_input_ack()
910 rxrpc_propose_ACK(call, RXRPC_ACK_REQUESTED, in rxrpc_input_ack()
917 * lost the call because it switched to a different peer. in rxrpc_input_ack()
922 rxrpc_is_client_call(call)) { in rxrpc_input_ack()
923 rxrpc_set_call_completion(call, RXRPC_CALL_REMOTELY_ABORTED, in rxrpc_input_ack()
929 * indicate a change of address. However, we can retransmit the call in rxrpc_input_ack()
935 call->tx_hard_ack == 0 && in rxrpc_input_ack()
936 rxrpc_is_client_call(call)) { in rxrpc_input_ack()
937 rxrpc_set_call_completion(call, RXRPC_CALL_REMOTELY_ABORTED, in rxrpc_input_ack()
943 if (!rxrpc_is_ack_valid(call, first_soft_ack, prev_pkt)) { in rxrpc_input_ack()
944 trace_rxrpc_rx_discard_ack(call->debug_id, ack_serial, in rxrpc_input_ack()
945 first_soft_ack, call->acks_first_seq, in rxrpc_input_ack()
946 prev_pkt, call->acks_prev_seq); in rxrpc_input_ack()
954 return rxrpc_proto_abort("XAI", call, 0); in rxrpc_input_ack()
956 spin_lock(&call->input_lock); in rxrpc_input_ack()
959 if (!rxrpc_is_ack_valid(call, first_soft_ack, prev_pkt)) { in rxrpc_input_ack()
960 trace_rxrpc_rx_discard_ack(call->debug_id, ack_serial, in rxrpc_input_ack()
961 first_soft_ack, call->acks_first_seq, in rxrpc_input_ack()
962 prev_pkt, call->acks_prev_seq); in rxrpc_input_ack()
965 call->acks_latest_ts = skb->tstamp; in rxrpc_input_ack()
967 call->acks_first_seq = first_soft_ack; in rxrpc_input_ack()
968 call->acks_prev_seq = prev_pkt; in rxrpc_input_ack()
972 rxrpc_input_ackinfo(call, skb, &buf.info); in rxrpc_input_ack()
975 rxrpc_proto_abort("AK0", call, 0); in rxrpc_input_ack()
980 switch (READ_ONCE(call->state)) { in rxrpc_input_ack()
990 if (before(hard_ack, call->tx_hard_ack) || in rxrpc_input_ack()
991 after(hard_ack, call->tx_top)) { in rxrpc_input_ack()
992 rxrpc_proto_abort("AKW", call, 0); in rxrpc_input_ack()
995 if (nr_acks > call->tx_top - hard_ack) { in rxrpc_input_ack()
996 rxrpc_proto_abort("AKN", call, 0); in rxrpc_input_ack()
1000 if (after(hard_ack, call->tx_hard_ack)) { in rxrpc_input_ack()
1001 if (rxrpc_rotate_tx_window(call, hard_ack, &summary)) { in rxrpc_input_ack()
1002 rxrpc_end_tx_phase(call, false, "ETA"); in rxrpc_input_ack()
1009 rxrpc_proto_abort("XSA", call, 0); in rxrpc_input_ack()
1012 rxrpc_input_soft_acks(call, buf.acks, first_soft_ack, nr_acks, in rxrpc_input_ack()
1016 if (call->rxtx_annotations[call->tx_top & RXRPC_RXTX_BUFF_MASK] & in rxrpc_input_ack()
1018 summary.nr_acks == call->tx_top - hard_ack && in rxrpc_input_ack()
1019 rxrpc_is_client_call(call)) in rxrpc_input_ack()
1020 rxrpc_propose_ACK(call, RXRPC_ACK_PING, ack_serial, in rxrpc_input_ack()
1024 rxrpc_congestion_management(call, skb, &summary, acked_serial); in rxrpc_input_ack()
1026 spin_unlock(&call->input_lock); in rxrpc_input_ack()
1032 static void rxrpc_input_ackall(struct rxrpc_call *call, struct sk_buff *skb) in rxrpc_input_ackall() argument
1039 spin_lock(&call->input_lock); in rxrpc_input_ackall()
1041 if (rxrpc_rotate_tx_window(call, call->tx_top, &summary)) in rxrpc_input_ackall()
1042 rxrpc_end_tx_phase(call, false, "ETL"); in rxrpc_input_ackall()
1044 spin_unlock(&call->input_lock); in rxrpc_input_ackall()
1048 * Process an ABORT packet directed at a call.
1050 static void rxrpc_input_abort(struct rxrpc_call *call, struct sk_buff *skb) in rxrpc_input_abort() argument
1063 trace_rxrpc_rx_abort(call, sp->hdr.serial, abort_code); in rxrpc_input_abort()
1067 rxrpc_set_call_completion(call, RXRPC_CALL_REMOTELY_ABORTED, in rxrpc_input_abort()
1072 * Process an incoming call packet.
1074 static void rxrpc_input_call_packet(struct rxrpc_call *call, in rxrpc_input_call_packet() argument
1080 _enter("%p,%p", call, skb); in rxrpc_input_call_packet()
1082 timo = READ_ONCE(call->next_rx_timo); in rxrpc_input_call_packet()
1087 WRITE_ONCE(call->expect_rx_by, expect_rx_by); in rxrpc_input_call_packet()
1088 rxrpc_reduce_call_timer(call, expect_rx_by, now, in rxrpc_input_call_packet()
1094 rxrpc_input_data(call, skb); in rxrpc_input_call_packet()
1098 rxrpc_input_ack(call, skb); in rxrpc_input_call_packet()
1111 rxrpc_input_abort(call, skb); in rxrpc_input_call_packet()
1115 rxrpc_input_ackall(call, skb); in rxrpc_input_call_packet()
1128 * Handle a new service call on a channel implicitly completing the preceding
1129 * call on that channel. This does not apply to client conns.
1135 struct rxrpc_call *call) in rxrpc_input_implicit_end_call() argument
1137 switch (READ_ONCE(call->state)) { in rxrpc_input_implicit_end_call()
1139 rxrpc_call_completed(call); in rxrpc_input_implicit_end_call()
1144 if (rxrpc_abort_call("IMP", call, 0, RX_CALL_DEAD, -ESHUTDOWN)) { in rxrpc_input_implicit_end_call()
1145 set_bit(RXRPC_CALL_EV_ABORT, &call->events); in rxrpc_input_implicit_end_call()
1146 rxrpc_queue_call(call); in rxrpc_input_implicit_end_call()
1148 trace_rxrpc_improper_term(call); in rxrpc_input_implicit_end_call()
1153 __rxrpc_disconnect_call(conn, call); in rxrpc_input_implicit_end_call()
1159 * - this includes challenges, responses, some aborts and call terminal packet
1246 struct rxrpc_call *call = NULL; in rxrpc_input_packet() local
1357 * that would begin a call are explicitly rejected and the rest in rxrpc_input_packet()
1398 /* Call-bound packets are routed by connection channel. */ in rxrpc_input_packet()
1407 if (chan->call || in rxrpc_input_packet()
1411 /* For the previous service call, if completed in rxrpc_input_packet()
1430 call = rcu_dereference(chan->call); in rxrpc_input_packet()
1435 if (call) in rxrpc_input_packet()
1436 rxrpc_input_implicit_end_call(rx, conn, call); in rxrpc_input_packet()
1437 call = NULL; in rxrpc_input_packet()
1440 if (call) { in rxrpc_input_packet()
1441 if (sp->hdr.serviceId != call->service_id) in rxrpc_input_packet()
1442 call->service_id = sp->hdr.serviceId; in rxrpc_input_packet()
1443 if ((int)sp->hdr.serial - (int)call->rx_serial > 0) in rxrpc_input_packet()
1444 call->rx_serial = sp->hdr.serial; in rxrpc_input_packet()
1445 if (!test_bit(RXRPC_CALL_RX_HEARD, &call->flags)) in rxrpc_input_packet()
1446 set_bit(RXRPC_CALL_RX_HEARD, &call->flags); in rxrpc_input_packet()
1450 if (!call || refcount_read(&call->ref) == 0) { in rxrpc_input_packet()
1456 call = rxrpc_new_incoming_call(local, rx, skb); in rxrpc_input_packet()
1457 if (!call) in rxrpc_input_packet()
1461 /* Process a call packet; this either discards or passes on the ref in rxrpc_input_packet()
1464 rxrpc_input_call_packet(call, skb); in rxrpc_input_packet()