diff options
| author | Eric Dumazet <[email protected]> | 2025-06-18 09:12:46 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-06-19 23:15:34 +0000 |
| commit | f64bd2045d6202c0dfff043c1168d5247acdf777 (patch) | |
| tree | b2e2ad7a8b57559d742dbd1d014ab9eec8821412 /net/ipv4/tcp_input.c | |
| parent | neighbour: add support for NUD_PERMANENT proxy entries (diff) | |
| download | kernel-f64bd2045d6202c0dfff043c1168d5247acdf777.tar.gz kernel-f64bd2045d6202c0dfff043c1168d5247acdf777.zip | |
tcp: tcp_time_to_recover() cleanup
tcp_time_to_recover() does not need the @flag argument.
Its first parameter can be marked const, and of tcp_sock type.
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_input.c')
| -rw-r--r-- | net/ipv4/tcp_input.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 3e70b31076b2..19a1542883df 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2336,10 +2336,8 @@ static bool tcp_check_sack_reneging(struct sock *sk, int *ack_flag) * Main question: may we further continue forward transmission * with the same cwnd? */ -static bool tcp_time_to_recover(struct sock *sk, int flag) +static bool tcp_time_to_recover(const struct tcp_sock *tp) { - struct tcp_sock *tp = tcp_sk(sk); - /* Has loss detection marked at least one packet lost? */ return tp->lost_out != 0; } @@ -3013,7 +3011,7 @@ static void tcp_fastretrans_alert(struct sock *sk, const u32 prior_snd_una, tcp_identify_packet_loss(sk, ack_flag); if (icsk->icsk_ca_state != TCP_CA_Recovery) { - if (!tcp_time_to_recover(sk, flag)) + if (!tcp_time_to_recover(tp)) return; /* Undo reverts the recovery state. If loss is evident, * starts a new recovery (e.g. reordering then loss); @@ -3042,7 +3040,7 @@ static void tcp_fastretrans_alert(struct sock *sk, const u32 prior_snd_una, tcp_try_undo_dsack(sk); tcp_identify_packet_loss(sk, ack_flag); - if (!tcp_time_to_recover(sk, flag)) { + if (!tcp_time_to_recover(tp)) { tcp_try_to_open(sk, flag); return; } |
