* [PATCH] tcp: clean up use of jiffies in tcp_rcv_rtt_measure()
@ 2012-04-27 15:29 Neal Cardwell
2012-04-27 15:56 ` Eric Dumazet
2012-04-27 16:35 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Neal Cardwell @ 2012-04-27 15:29 UTC (permalink / raw)
To: David Miller
Cc: netdev, Eric Dumazet, Nandita Dukkipati, Yuchung Cheng,
ilpo.jarvinen, Tom Herbert, Neal Cardwell
Clean up a reference to jiffies in tcp_rcv_rtt_measure() that should
instead reference tcp_time_stamp. Since the result of the subtraction
is passed into a function taking u32, this should not change any
behavior (and indeed the generated assembly does not change on
x86_64). However, it seems worth cleaning this up for consistency and
clarity (and perhaps to avoid bugs if this is copied and pasted
somewhere else).
Signed-off-by: Neal Cardwell <ncardwell@google.com>
---
net/ipv4/tcp_input.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 3ff36406..2a702e3 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -495,7 +495,7 @@ static inline void tcp_rcv_rtt_measure(struct tcp_sock *tp)
goto new_measure;
if (before(tp->rcv_nxt, tp->rcv_rtt_est.seq))
return;
- tcp_rcv_rtt_update(tp, jiffies - tp->rcv_rtt_est.time, 1);
+ tcp_rcv_rtt_update(tp, tcp_time_stamp - tp->rcv_rtt_est.time, 1);
new_measure:
tp->rcv_rtt_est.seq = tp->rcv_nxt + tp->rcv_wnd;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tcp: clean up use of jiffies in tcp_rcv_rtt_measure()
2012-04-27 15:29 [PATCH] tcp: clean up use of jiffies in tcp_rcv_rtt_measure() Neal Cardwell
@ 2012-04-27 15:56 ` Eric Dumazet
2012-04-27 16:35 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2012-04-27 15:56 UTC (permalink / raw)
To: Neal Cardwell
Cc: David Miller, netdev, Eric Dumazet, Nandita Dukkipati,
Yuchung Cheng, ilpo.jarvinen, Tom Herbert
On Fri, 2012-04-27 at 11:29 -0400, Neal Cardwell wrote:
> Clean up a reference to jiffies in tcp_rcv_rtt_measure() that should
> instead reference tcp_time_stamp. Since the result of the subtraction
> is passed into a function taking u32, this should not change any
> behavior (and indeed the generated assembly does not change on
> x86_64). However, it seems worth cleaning this up for consistency and
> clarity (and perhaps to avoid bugs if this is copied and pasted
> somewhere else).
>
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
> ---
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tcp: clean up use of jiffies in tcp_rcv_rtt_measure()
2012-04-27 15:29 [PATCH] tcp: clean up use of jiffies in tcp_rcv_rtt_measure() Neal Cardwell
2012-04-27 15:56 ` Eric Dumazet
@ 2012-04-27 16:35 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2012-04-27 16:35 UTC (permalink / raw)
To: ncardwell; +Cc: netdev, edumazet, nanditad, ycheng, ilpo.jarvinen, therbert
From: Neal Cardwell <ncardwell@google.com>
Date: Fri, 27 Apr 2012 11:29:37 -0400
> Clean up a reference to jiffies in tcp_rcv_rtt_measure() that should
> instead reference tcp_time_stamp. Since the result of the subtraction
> is passed into a function taking u32, this should not change any
> behavior (and indeed the generated assembly does not change on
> x86_64). However, it seems worth cleaning this up for consistency and
> clarity (and perhaps to avoid bugs if this is copied and pasted
> somewhere else).
>
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-27 16:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-27 15:29 [PATCH] tcp: clean up use of jiffies in tcp_rcv_rtt_measure() Neal Cardwell
2012-04-27 15:56 ` Eric Dumazet
2012-04-27 16:35 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.