| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * net/dccp/input.c |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * An implementation of the DCCP protocol |
|---|
| 5 | 6 | * Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or |
|---|
| 8 | | - * modify it under the terms of the GNU General Public License |
|---|
| 9 | | - * as published by the Free Software Foundation; either version |
|---|
| 10 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 11 | 7 | */ |
|---|
| 12 | 8 | |
|---|
| 13 | 9 | #include <linux/dccp.h> |
|---|
| .. | .. |
|---|
| 68 | 64 | */ |
|---|
| 69 | 65 | if (dccp_sk(sk)->dccps_role != DCCP_ROLE_CLIENT) |
|---|
| 70 | 66 | break; |
|---|
| 71 | | - /* fall through */ |
|---|
| 67 | + fallthrough; |
|---|
| 72 | 68 | case DCCP_REQUESTING: |
|---|
| 73 | 69 | case DCCP_ACTIVE_CLOSEREQ: |
|---|
| 74 | 70 | dccp_send_reset(sk, DCCP_RESET_CODE_CLOSED); |
|---|
| .. | .. |
|---|
| 80 | 76 | queued = 1; |
|---|
| 81 | 77 | dccp_fin(sk, skb); |
|---|
| 82 | 78 | dccp_set_state(sk, DCCP_PASSIVE_CLOSE); |
|---|
| 83 | | - /* fall through */ |
|---|
| 79 | + fallthrough; |
|---|
| 84 | 80 | case DCCP_PASSIVE_CLOSE: |
|---|
| 85 | 81 | /* |
|---|
| 86 | 82 | * Retransmitted Close: we have already enqueued the first one. |
|---|
| .. | .. |
|---|
| 117 | 113 | queued = 1; |
|---|
| 118 | 114 | dccp_fin(sk, skb); |
|---|
| 119 | 115 | dccp_set_state(sk, DCCP_PASSIVE_CLOSEREQ); |
|---|
| 120 | | - /* fall through */ |
|---|
| 116 | + fallthrough; |
|---|
| 121 | 117 | case DCCP_PASSIVE_CLOSEREQ: |
|---|
| 122 | 118 | sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_HUP); |
|---|
| 123 | 119 | } |
|---|
| .. | .. |
|---|
| 480 | 476 | sk_wake_async(sk, SOCK_WAKE_IO, POLL_OUT); |
|---|
| 481 | 477 | } |
|---|
| 482 | 478 | |
|---|
| 483 | | - if (sk->sk_write_pending || icsk->icsk_ack.pingpong || |
|---|
| 479 | + if (sk->sk_write_pending || inet_csk_in_pingpong_mode(sk) || |
|---|
| 484 | 480 | icsk->icsk_accept_queue.rskq_defer_accept) { |
|---|
| 485 | 481 | /* Save one ACK. Data will be ready after |
|---|
| 486 | 482 | * several ticks, if write_pending is set. |
|---|
| .. | .. |
|---|
| 534 | 530 | case DCCP_PKT_DATA: |
|---|
| 535 | 531 | if (sk->sk_state == DCCP_RESPOND) |
|---|
| 536 | 532 | break; |
|---|
| 537 | | - /* fall through */ |
|---|
| 533 | + fallthrough; |
|---|
| 538 | 534 | case DCCP_PKT_DATAACK: |
|---|
| 539 | 535 | case DCCP_PKT_ACK: |
|---|
| 540 | 536 | /* |
|---|
| .. | .. |
|---|
| 688 | 684 | /* Step 8: if using Ack Vectors, mark packet acknowledgeable */ |
|---|
| 689 | 685 | dccp_handle_ackvec_processing(sk, skb); |
|---|
| 690 | 686 | dccp_deliver_input_to_ccids(sk, skb); |
|---|
| 691 | | - /* fall through */ |
|---|
| 687 | + fallthrough; |
|---|
| 692 | 688 | case DCCP_RESPOND: |
|---|
| 693 | 689 | queued = dccp_rcv_respond_partopen_state_process(sk, skb, |
|---|
| 694 | 690 | dh, len); |
|---|
| .. | .. |
|---|
| 719 | 715 | |
|---|
| 720 | 716 | /** |
|---|
| 721 | 717 | * dccp_sample_rtt - Validate and finalise computation of RTT sample |
|---|
| 718 | + * @sk: socket structure |
|---|
| 722 | 719 | * @delta: number of microseconds between packet and acknowledgment |
|---|
| 723 | 720 | * |
|---|
| 724 | 721 | * The routine is kept generic to work in different contexts. It should be |
|---|