]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: do tcp_mstamp_refresh before retransmits on TSQ handler
authorKoichiro Den <den@klaipeden.com>
Sun, 22 Oct 2017 04:13:16 +0000 (13:13 +0900)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Oct 2017 04:45:24 +0000 (05:45 +0100)
commit125aea273f02dbdee24c2307f49dad84c39c6e71
tree944c30bb3c71ccf6dee939462dc1fb66b86683d3
parent9f15df4648c815f90caea1b0f7b340eb9f3baaf9
tcp: do tcp_mstamp_refresh before retransmits on TSQ handler

When retransmission on TSQ handler was introduced in the commit
8e8d8caace54 ("tcp: implement TSQ for retransmits"), the retransmitted
skbs' timestamps were updated on the actual transmission. In the later
commit 440d55ce67e1 ("tcp: use tp->tcp_mstamp in output path"), it stops
being done so. In the commit, the comment says "We try to refresh
tp->tcp_mstamp only when necessary", and at present tcp_tsq_handler and
tcp_v4_mtu_reduced applies to this. About the latter, it's okay since
it's rare enough.

About the former, even though possible retransmissions on the tasklet
comes just after the destructor run in NET_RX softirq handling, the time
between them could be nonnegligibly large to the extent that
tcp_rack_advance or rto rearming be affected if other (remaining) RX,
BLOCK and (preceding) TASKLET sofirq handlings are unexpectedly heavy.

So in the same way as tcp_write_timer_handler does, doing tcp_mstamp_refresh
ensures the accuracy of algorithms relying on it.

Fixes: 440d55ce67e1 ("tcp: use tp->tcp_mstamp in output path")
Signed-off-by: Koichiro Den <den@klaipeden.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c