diff options
author | David Morley <morleyd@google.com> | 2023-10-06 01:18:40 +0000 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-10-10 10:02:59 +0200 |
commit | 95b9a87c6a6b708cccda1f9b7baf9920b80cdabf (patch) | |
tree | d06f62ced178016f8a07a882290350d1b01ca1a9 /net/ipv4/tcp_timer.c | |
parent | 8cea95b0bd7930367f11e2abceda6e096dd18943 (diff) | |
download | linux-stable-95b9a87c6a6b708cccda1f9b7baf9920b80cdabf.tar.gz linux-stable-95b9a87c6a6b708cccda1f9b7baf9920b80cdabf.tar.bz2 linux-stable-95b9a87c6a6b708cccda1f9b7baf9920b80cdabf.zip |
tcp: record last received ipv6 flowlabel
In order to better estimate whether a data packet has been
retransmitted or is the result of a TLP, we save the last received
ipv6 flowlabel.
To make space for this field we resize the "ato" field in
inet_connection_sock as the current value of TCP_DELACK_MAX can be
fully contained in 8 bits and add a compile_time_assert ensuring this
field is the required size.
v2: addressed kernel bot feedback about dccp_delack_timer()
v3: addressed build error introduced by commit bbf80d713fe7 ("tcp:
derive delack_max from rto_min")
Signed-off-by: David Morley <morleyd@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Tested-by: David Morley <morleyd@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 3f61c6a70a1f..0862b73dd3b5 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -322,7 +322,7 @@ void tcp_delack_timer_handler(struct sock *sk) if (inet_csk_ack_scheduled(sk)) { if (!inet_csk_in_pingpong_mode(sk)) { /* Delayed ACK missed: inflate ATO. */ - icsk->icsk_ack.ato = min(icsk->icsk_ack.ato << 1, icsk->icsk_rto); + icsk->icsk_ack.ato = min_t(u32, icsk->icsk_ack.ato << 1, icsk->icsk_rto); } else { /* Delayed ACK missed: leave pingpong mode and * deflate ATO. |