diff options
| author | Eric Dumazet <[email protected]> | 2014-03-10 00:36:02 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2014-03-10 20:15:54 +0000 |
| commit | 431a91242d8d7876d33ab91b1f3ccdcd56b14f66 (patch) | |
| tree | 3469a5bca9cc5ee4c3397eb9b19fe2ca2e8f6c18 /net/ipv4/tcp_output.c | |
| parent | hyperv: Change the receive buffer size for legacy hosts (diff) | |
| download | kernel-431a91242d8d7876d33ab91b1f3ccdcd56b14f66.tar.gz kernel-431a91242d8d7876d33ab91b1f3ccdcd56b14f66.zip | |
tcp: timestamp SYN+DATA messages
All skb in socket write queue should be properly timestamped.
In case of FastOpen, we special case the SYN+DATA 'message' as we
queue in socket wrote queue the two fallback skbs:
1) SYN message by itself.
2) DATA segment by itself.
We should make sure these skbs have proper timestamps.
Add a WARN_ON_ONCE() to eventually catch future violations.
Fixes: 740b0f1841f6 ("tcp: switch rtt estimations to usec resolution")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Neal Cardwell <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Acked-by: Neal Cardwell <[email protected]>
Acked-by: Yuchung Cheng <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
| -rw-r--r-- | net/ipv4/tcp_output.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index bc0fb0fc7552..5a163de5e142 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2972,6 +2972,12 @@ static int tcp_send_syn_data(struct sock *sk, struct sk_buff *syn) tcp_connect_queue_skb(sk, data); fo->copied = data->len; + /* syn_data is about to be sent, we need to take current time stamps + * for the packets that are in write queue : SYN packet and DATA + */ + skb_mstamp_get(&syn->skb_mstamp); + data->skb_mstamp = syn->skb_mstamp; + if (tcp_transmit_skb(sk, syn_data, 0, sk->sk_allocation) == 0) { tp->syn_data = (fo->copied > 0); NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPORIGDATASENT); |
