Skip to content

Commit ee1836a

Browse files
edumazetdavem330
authored andcommitted
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: 385e207 ("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>
1 parent 63b9ab6 commit ee1836a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/ipv4/tcp_output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2239,6 +2239,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
22392239

22402240
sent_pkts = 0;
22412241

2242+
tcp_mstamp_refresh(tp);
22422243
if (!push_one) {
22432244
/* Do MTU probing. */
22442245
result = tcp_mtu_probe(sk);
@@ -2250,7 +2251,6 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
22502251
}
22512252

22522253
max_segs = tcp_tso_segs(sk, mss_now);
2253-
tcp_mstamp_refresh(tp);
22542254
while ((skb = tcp_send_head(sk))) {
22552255
unsigned int limit;
22562256

0 commit comments

Comments
 (0)