]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up tcp-avoid-too-many-retransmit-packets.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Jul 2024 13:06:18 +0000 (15:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Jul 2024 13:06:18 +0000 (15:06 +0200)
queue-4.19/tcp-avoid-too-many-retransmit-packets.patch
queue-5.10/tcp-avoid-too-many-retransmit-packets.patch
queue-5.15/tcp-avoid-too-many-retransmit-packets.patch
queue-5.4/tcp-avoid-too-many-retransmit-packets.patch
queue-6.1/tcp-avoid-too-many-retransmit-packets.patch
queue-6.6/tcp-avoid-too-many-retransmit-packets.patch

index 85c9adca888bea68505f01abbab0df504cf83e0e..e9a716f7ef396d1a7dcd027977ff0ae25fb5e184 100644 (file)
@@ -36,12 +36,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- 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 <gregkh@linuxfoundation.org>
        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 <gregkh@linuxfoundation.org>
        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;
+ }
index 2d1f65bef907b7eb112d2b69d8368a6589bcd51e..ad6899ef780011178100552e6b3f522a337fdc07 100644 (file)
@@ -33,12 +33,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- 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 <gregkh@linuxfoundation.org>
        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 <gregkh@linuxfoundation.org>
        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;
+ }
index 2d1f65bef907b7eb112d2b69d8368a6589bcd51e..ad6899ef780011178100552e6b3f522a337fdc07 100644 (file)
@@ -33,12 +33,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- 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 <gregkh@linuxfoundation.org>
        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 <gregkh@linuxfoundation.org>
        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;
+ }
index 2fd52751c6a77d887e0f93c172b1e8aabbf8ac1c..b962b61fcebc76f03c2ea6d2f92a065c7decf2d4 100644 (file)
@@ -36,12 +36,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- 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 <gregkh@linuxfoundation.org>
        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 <gregkh@linuxfoundation.org>
        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;
+ }
index d501e2e097df03636fa67c5eed14d71f599ddc6d..6596c177d891ffce7e0b44c27a146d7a02e51f69 100644 (file)
@@ -33,12 +33,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- 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 <gregkh@linuxfoundation.org>
        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 <gregkh@linuxfoundation.org>
        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;
+ }
index 095da50cdd4cc1960bec1acf19f16cb35f716f68..1fca7f68cdc5f48e9aa9954a9dc937a1d8fc342d 100644 (file)
@@ -33,12 +33,12 @@ Link: https://patch.msgid.link/20240710001402.2758273-1-edumazet@google.com
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
- 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 <gregkh@linuxfoundation.org>
        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 <gregkh@linuxfoundation.org>
        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;
+ }