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)
{
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'
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;
+ }
+
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)
{
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'
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;
+ }
+
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)
{
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'
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;
+ }
+
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)
{
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'
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;
+ }
+
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)
{
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'
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;
+ }
+
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)
{
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'
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;
+ }
+