diff options
author | Eric Dumazet <edumazet@google.com> | 2017-10-27 00:21:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-28 06:08:04 -0400 |
commit | ee1836aec4f5a977c1699a311db4d9027ef21ac8 (patch) | |
tree | 9e8261b2d52181178fba19ae314221e4235cc062 /net/ipv4/tcp_output.c | |
parent | 63b9ab65bd76e5de6479bb14b4014b64aa1a317a (diff) |
tcp: refresh tp timestamp before tcp_mtu_probe()
In the unlikely event tcp_mtu_probe() is sending a packet, we
want tp->tcp_mstamp being as accurate as possible.
This means we need to call tcp_mstamp_refresh() a bit earlier in
tcp_write_xmit().
Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 1151870018e3..ae60dd3faed0 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2239,6 +2239,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
2239 | 2239 | ||
2240 | sent_pkts = 0; | 2240 | sent_pkts = 0; |
2241 | 2241 | ||
2242 | tcp_mstamp_refresh(tp); | ||
2242 | if (!push_one) { | 2243 | if (!push_one) { |
2243 | /* Do MTU probing. */ | 2244 | /* Do MTU probing. */ |
2244 | result = tcp_mtu_probe(sk); | 2245 | result = tcp_mtu_probe(sk); |
@@ -2250,7 +2251,6 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
2250 | } | 2251 | } |
2251 | 2252 | ||
2252 | max_segs = tcp_tso_segs(sk, mss_now); | 2253 | max_segs = tcp_tso_segs(sk, mss_now); |
2253 | tcp_mstamp_refresh(tp); | ||
2254 | while ((skb = tcp_send_head(sk))) { | 2254 | while ((skb = tcp_send_head(sk))) { |
2255 | unsigned int limit; | 2255 | unsigned int limit; |
2256 | 2256 | ||