hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/net/dccp/timer.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * net/dccp/timer.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>
....@@ -89,7 +85,7 @@
8985 struct inet_connection_sock *icsk = inet_csk(sk);
9086
9187 /*
92
- * More than than 4MSL (8 minutes) has passed, a RESET(aborted) was
88
+ * More than 4MSL (8 minutes) has passed, a RESET(aborted) was
9389 * sent, no need to retransmit, this sock is dead.
9490 */
9591 if (dccp_write_timeout(sk))
....@@ -180,7 +176,6 @@
180176 bh_lock_sock(sk);
181177 if (sock_owned_by_user(sk)) {
182178 /* Try again later. */
183
- icsk->icsk_ack.blocked = 1;
184179 __NET_INC_STATS(sock_net(sk), LINUX_MIB_DELAYEDACKLOCKED);
185180 sk_reset_timer(sk, &icsk->icsk_delack_timer,
186181 jiffies + TCP_DELACK_MIN);
....@@ -199,7 +194,7 @@
199194 icsk->icsk_ack.pending &= ~ICSK_ACK_TIMER;
200195
201196 if (inet_csk_ack_scheduled(sk)) {
202
- if (!icsk->icsk_ack.pingpong) {
197
+ if (!inet_csk_in_pingpong_mode(sk)) {
203198 /* Delayed ACK missed: inflate ATO. */
204199 icsk->icsk_ack.ato = min(icsk->icsk_ack.ato << 1,
205200 icsk->icsk_rto);
....@@ -207,7 +202,7 @@
207202 /* Delayed ACK missed: leave pingpong mode and
208203 * deflate ATO.
209204 */
210
- icsk->icsk_ack.pingpong = 0;
205
+ inet_csk_exit_pingpong_mode(sk);
211206 icsk->icsk_ack.ato = TCP_ATO_MIN;
212207 }
213208 dccp_send_ack(sk);
....@@ -220,6 +215,8 @@
220215
221216 /**
222217 * dccp_write_xmitlet - Workhorse for CCID packet dequeueing interface
218
+ * @data: Socket to act on
219
+ *
223220 * See the comments above %ccid_dequeueing_decision for supported modes.
224221 */
225222 static void dccp_write_xmitlet(unsigned long data)