Skip to content

Commit 651913c

Browse files
nealcardwelldavem330
authored andcommitted
tcp: clean up use of jiffies in tcp_rcv_rtt_measure()
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8b6efb7 commit 651913c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/tcp_input.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static inline void tcp_rcv_rtt_measure(struct tcp_sock *tp)
495495
goto new_measure;
496496
if (before(tp->rcv_nxt, tp->rcv_rtt_est.seq))
497497
return;
498-
tcp_rcv_rtt_update(tp, jiffies - tp->rcv_rtt_est.time, 1);
498+
tcp_rcv_rtt_update(tp, tcp_time_stamp - tp->rcv_rtt_est.time, 1);
499499

500500
new_measure:
501501
tp->rcv_rtt_est.seq = tp->rcv_nxt + tp->rcv_wnd;

0 commit comments

Comments
 (0)