hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/dccp/input.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * net/dccp/input.c
34 *
45 * An implementation of the DCCP protocol
56 * 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.
117 */
128
139 #include <linux/dccp.h>
....@@ -68,7 +64,7 @@
6864 */
6965 if (dccp_sk(sk)->dccps_role != DCCP_ROLE_CLIENT)
7066 break;
71
- /* fall through */
67
+ fallthrough;
7268 case DCCP_REQUESTING:
7369 case DCCP_ACTIVE_CLOSEREQ:
7470 dccp_send_reset(sk, DCCP_RESET_CODE_CLOSED);
....@@ -80,7 +76,7 @@
8076 queued = 1;
8177 dccp_fin(sk, skb);
8278 dccp_set_state(sk, DCCP_PASSIVE_CLOSE);
83
- /* fall through */
79
+ fallthrough;
8480 case DCCP_PASSIVE_CLOSE:
8581 /*
8682 * Retransmitted Close: we have already enqueued the first one.
....@@ -117,7 +113,7 @@
117113 queued = 1;
118114 dccp_fin(sk, skb);
119115 dccp_set_state(sk, DCCP_PASSIVE_CLOSEREQ);
120
- /* fall through */
116
+ fallthrough;
121117 case DCCP_PASSIVE_CLOSEREQ:
122118 sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_HUP);
123119 }
....@@ -480,7 +476,7 @@
480476 sk_wake_async(sk, SOCK_WAKE_IO, POLL_OUT);
481477 }
482478
483
- if (sk->sk_write_pending || icsk->icsk_ack.pingpong ||
479
+ if (sk->sk_write_pending || inet_csk_in_pingpong_mode(sk) ||
484480 icsk->icsk_accept_queue.rskq_defer_accept) {
485481 /* Save one ACK. Data will be ready after
486482 * several ticks, if write_pending is set.
....@@ -534,7 +530,7 @@
534530 case DCCP_PKT_DATA:
535531 if (sk->sk_state == DCCP_RESPOND)
536532 break;
537
- /* fall through */
533
+ fallthrough;
538534 case DCCP_PKT_DATAACK:
539535 case DCCP_PKT_ACK:
540536 /*
....@@ -688,7 +684,7 @@
688684 /* Step 8: if using Ack Vectors, mark packet acknowledgeable */
689685 dccp_handle_ackvec_processing(sk, skb);
690686 dccp_deliver_input_to_ccids(sk, skb);
691
- /* fall through */
687
+ fallthrough;
692688 case DCCP_RESPOND:
693689 queued = dccp_rcv_respond_partopen_state_process(sk, skb,
694690 dh, len);
....@@ -719,6 +715,7 @@
719715
720716 /**
721717 * dccp_sample_rtt - Validate and finalise computation of RTT sample
718
+ * @sk: socket structure
722719 * @delta: number of microseconds between packet and acknowledgment
723720 *
724721 * The routine is kept generic to work in different contexts. It should be