From a30ba2fb839375580bce9c8cca1581ad73efeee0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Jul 2024 15:06:18 +0200 Subject: [PATCH] fix up tcp-avoid-too-many-retransmit-packets.patch --- .../tcp-avoid-too-many-retransmit-packets.patch | 15 ++++++++++++--- .../tcp-avoid-too-many-retransmit-packets.patch | 15 ++++++++++++--- .../tcp-avoid-too-many-retransmit-packets.patch | 15 ++++++++++++--- .../tcp-avoid-too-many-retransmit-packets.patch | 15 ++++++++++++--- .../tcp-avoid-too-many-retransmit-packets.patch | 15 ++++++++++++--- .../tcp-avoid-too-many-retransmit-packets.patch | 15 ++++++++++++--- 6 files changed, 72 insertions(+), 18 deletions(-) diff --git a/queue-4.19/tcp-avoid-too-many-retransmit-packets.patch b/queue-4.19/tcp-avoid-too-many-retransmit-packets.patch index 85c9adca888..e9a716f7ef3 100644 --- a/queue-4.19/tcp-avoid-too-many-retransmit-packets.patch +++ b/queue-4.19/tcp-avoid-too-many-retransmit-packets.patch @@ -36,12 +36,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- - net/ipv4/tcp_timer.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) + net/ipv4/tcp_timer.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c -@@ -414,16 +414,28 @@ static void tcp_fastopen_synack_timer(st +@@ -414,22 +414,34 @@ static void tcp_fastopen_synack_timer(st static bool tcp_rtx_probe0_timed_out(const struct sock *sk, const struct sk_buff *skb) { @@ -53,6 +53,9 @@ Signed-off-by: Greg Kroah-Hartman u32 rtx_delta; s32 rcv_delta; ++ rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - ++ (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); ++ + if (user_timeout) { + /* If user application specified a TCP_USER_TIMEOUT, + * it does not want win 0 packets to 'reset the timer' @@ -72,3 +75,9 @@ Signed-off-by: Greg Kroah-Hartman if (rcv_delta <= timeout) return false; +- rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - +- (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); +- + return rtx_delta > timeout; + } + diff --git a/queue-5.10/tcp-avoid-too-many-retransmit-packets.patch b/queue-5.10/tcp-avoid-too-many-retransmit-packets.patch index 2d1f65bef90..ad6899ef780 100644 --- a/queue-5.10/tcp-avoid-too-many-retransmit-packets.patch +++ b/queue-5.10/tcp-avoid-too-many-retransmit-packets.patch @@ -33,12 +33,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- - net/ipv4/tcp_timer.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) + net/ipv4/tcp_timer.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c -@@ -440,16 +440,28 @@ static void tcp_fastopen_synack_timer(st +@@ -440,22 +440,34 @@ static void tcp_fastopen_synack_timer(st static bool tcp_rtx_probe0_timed_out(const struct sock *sk, const struct sk_buff *skb) { @@ -50,6 +50,9 @@ Signed-off-by: Greg Kroah-Hartman u32 rtx_delta; s32 rcv_delta; ++ rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - ++ (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); ++ + if (user_timeout) { + /* If user application specified a TCP_USER_TIMEOUT, + * it does not want win 0 packets to 'reset the timer' @@ -69,3 +72,9 @@ Signed-off-by: Greg Kroah-Hartman if (rcv_delta <= timeout) return false; +- rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - +- (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); +- + return rtx_delta > timeout; + } + diff --git a/queue-5.15/tcp-avoid-too-many-retransmit-packets.patch b/queue-5.15/tcp-avoid-too-many-retransmit-packets.patch index 2d1f65bef90..ad6899ef780 100644 --- a/queue-5.15/tcp-avoid-too-many-retransmit-packets.patch +++ b/queue-5.15/tcp-avoid-too-many-retransmit-packets.patch @@ -33,12 +33,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- - net/ipv4/tcp_timer.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) + net/ipv4/tcp_timer.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c -@@ -440,16 +440,28 @@ static void tcp_fastopen_synack_timer(st +@@ -440,22 +440,34 @@ static void tcp_fastopen_synack_timer(st static bool tcp_rtx_probe0_timed_out(const struct sock *sk, const struct sk_buff *skb) { @@ -50,6 +50,9 @@ Signed-off-by: Greg Kroah-Hartman u32 rtx_delta; s32 rcv_delta; ++ rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - ++ (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); ++ + if (user_timeout) { + /* If user application specified a TCP_USER_TIMEOUT, + * it does not want win 0 packets to 'reset the timer' @@ -69,3 +72,9 @@ Signed-off-by: Greg Kroah-Hartman if (rcv_delta <= timeout) return false; +- rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - +- (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); +- + return rtx_delta > timeout; + } + diff --git a/queue-5.4/tcp-avoid-too-many-retransmit-packets.patch b/queue-5.4/tcp-avoid-too-many-retransmit-packets.patch index 2fd52751c6a..b962b61fceb 100644 --- a/queue-5.4/tcp-avoid-too-many-retransmit-packets.patch +++ b/queue-5.4/tcp-avoid-too-many-retransmit-packets.patch @@ -36,12 +36,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- - net/ipv4/tcp_timer.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) + net/ipv4/tcp_timer.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c -@@ -437,16 +437,28 @@ static void tcp_fastopen_synack_timer(st +@@ -437,22 +437,34 @@ static void tcp_fastopen_synack_timer(st static bool tcp_rtx_probe0_timed_out(const struct sock *sk, const struct sk_buff *skb) { @@ -53,6 +53,9 @@ Signed-off-by: Greg Kroah-Hartman u32 rtx_delta; s32 rcv_delta; ++ rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - ++ (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); ++ + if (user_timeout) { + /* If user application specified a TCP_USER_TIMEOUT, + * it does not want win 0 packets to 'reset the timer' @@ -72,3 +75,9 @@ Signed-off-by: Greg Kroah-Hartman if (rcv_delta <= timeout) return false; +- rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - +- (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); +- + return rtx_delta > timeout; + } + diff --git a/queue-6.1/tcp-avoid-too-many-retransmit-packets.patch b/queue-6.1/tcp-avoid-too-many-retransmit-packets.patch index d501e2e097d..6596c177d89 100644 --- a/queue-6.1/tcp-avoid-too-many-retransmit-packets.patch +++ b/queue-6.1/tcp-avoid-too-many-retransmit-packets.patch @@ -33,12 +33,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- - net/ipv4/tcp_timer.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) + net/ipv4/tcp_timer.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c -@@ -444,16 +444,28 @@ static void tcp_fastopen_synack_timer(st +@@ -444,22 +444,34 @@ static void tcp_fastopen_synack_timer(st static bool tcp_rtx_probe0_timed_out(const struct sock *sk, const struct sk_buff *skb) { @@ -50,6 +50,9 @@ Signed-off-by: Greg Kroah-Hartman u32 rtx_delta; s32 rcv_delta; ++ rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - ++ (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); ++ + if (user_timeout) { + /* If user application specified a TCP_USER_TIMEOUT, + * it does not want win 0 packets to 'reset the timer' @@ -69,3 +72,9 @@ Signed-off-by: Greg Kroah-Hartman if (rcv_delta <= timeout) return false; +- rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - +- (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); +- + return rtx_delta > timeout; + } + diff --git a/queue-6.6/tcp-avoid-too-many-retransmit-packets.patch b/queue-6.6/tcp-avoid-too-many-retransmit-packets.patch index 095da50cdd4..1fca7f68cdc 100644 --- a/queue-6.6/tcp-avoid-too-many-retransmit-packets.patch +++ b/queue-6.6/tcp-avoid-too-many-retransmit-packets.patch @@ -33,12 +33,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- - net/ipv4/tcp_timer.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) + net/ipv4/tcp_timer.c | 22 +++++++++++++++++----- + 1 file changed, 17 insertions(+), 5 deletions(-) --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c -@@ -457,16 +457,28 @@ static void tcp_fastopen_synack_timer(st +@@ -457,22 +457,34 @@ static void tcp_fastopen_synack_timer(st static bool tcp_rtx_probe0_timed_out(const struct sock *sk, const struct sk_buff *skb) { @@ -50,6 +50,9 @@ Signed-off-by: Greg Kroah-Hartman u32 rtx_delta; s32 rcv_delta; ++ rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - ++ (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); ++ + if (user_timeout) { + /* If user application specified a TCP_USER_TIMEOUT, + * it does not want win 0 packets to 'reset the timer' @@ -69,3 +72,9 @@ Signed-off-by: Greg Kroah-Hartman if (rcv_delta <= timeout) return false; +- rtx_delta = (u32)msecs_to_jiffies(tcp_time_stamp(tp) - +- (tp->retrans_stamp ?: tcp_skb_timestamp(skb))); +- + return rtx_delta > timeout; + } + -- 2.47.3