Skip to content

tcp: TCP TS option use 1 ms clock

Eric Dumazet netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15tcp: use tp->tcp_mstamp in output pathnet/ipv4/tcp_ipv4.c net/ipv4/tcp_output.c net/ipv4/tcp_recovery.c +1 more+14 -121 reply
2/15tcp: introduce tcp_jiffies32include/net/tcp.h+8 -51 reply
3/15dccp: do not use tcp_time_stampnet/dccp/ccids/ccid2.c net/dccp/ccids/ccid2.h+5 -51 reply
4/15tcp: use tcp_jiffies32 to feed tp->lsndtimeinclude/net/tcp.h net/ipv4/tcp.c net/ipv4/tcp_cubic.c +3 more+9 -91 reply
5/15tcp: use tcp_jiffies32 to feed tp->snd_cwnd_stampnet/ipv4/tcp_input.c net/ipv4/tcp_metrics.c net/ipv4/tcp_output.c+12 -121 reply
6/15tcp_bbr: use tcp_jiffies32 instead of tcp_time_stampnet/ipv4/tcp_bbr.c+6 -61 reply
7/15tcp: bic,cubic: use tcp_jiffies32 instead of tcp_time_stampnet/ipv4/tcp_bic.c net/ipv4/tcp_cubic.c+9 -91 reply
8/15tcp: use tcp_jiffies32 for rcv_tstamp and lrcvtimeinclude/net/tcp.h net/ipv4/tcp_input.c net/ipv4/tcp_minisocks.c +2 more+8 -81 reply
9/15tcp: use tcp_jiffies32 to feed probe_timestampnet/ipv4/tcp_output.c net/ipv4/tcp_timer.c+4 -41 reply
10/15tcp: uses jiffies_32 to feed tp->chrono_startnet/ipv4/tcp.c net/ipv4/tcp_output.c+2 -21 reply
11/15tcp: use tcp_jiffies32 in __tcp_oow_rate_limited()net/ipv4/tcp_input.c+2 -21 reply
12/15tcp_westwood: use tcp_jiffies32 instead of tcp_time_stampnet/ipv4/tcp_westwood.c+3 -31 reply
13/15tcp_lp: cache tcp_time_stampnet/ipv4/tcp_lp.c+4 -31 reply
14/15tcp: replace misc tcp_time_stamp to tcp_jiffies32net/ipv4/tcp.c net/ipv4/tcp_htcp.c net/ipv4/tcp_input.c +2 more+6 -61 reply
15/15tcp: switch TCP TS option (RFC 7323) to 1ms clockinclude/linux/skbuff.h include/linux/tcp.h include/net/tcp.h +14 more+178 -1995 replies

Reviews trailers per patch

All 15 patches have a Reviewed-by or Acked-by.

PatchSoheil Hassas Yeganeh
1/15A-b
2/15A-b
3/15A-b
4/15A-b
5/15A-b
6/15A-b
7/15A-b
8/15A-b
9/15A-b
10/15A-b
11/15A-b
12/15A-b
13/15A-b
14/15A-b
15/15A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 00/15] tcp: TCP TS option use 1 ms clock

TCP Timestamps option is defined in RFC 7323

Traditionally on linux, it has been tied to the internal 'jiffy' variable, because it had been a cheap and good enough generator.

Unfortunately some distros use HZ=250 or even HZ=100 leading to not very useful TCP timestamps.

For TCP flows in the DC, Google has used usec resolution for more than two years with great success [1].
RCVBUF autotuning is more precise.

This series converts tp->tcp_mstamp to a plain u64 value storing a 1 usec TCP clock.

This choice will allow us to upstream the 1 usec TS option as discussed in IETF 97.

Kathleen Nichols [2] and others advocate for 1ms TS clocks for network analysis. (1ms being the lowest value supported by RFC 7323.)

[1] https://www.ietf.org/proceedings/97/slides/slides-97-tcpm-tcp-options-for-low-latency-00.pdf
[2] http://netseminar.stanford.edu/seminars/02_02_17.pdf

Eric Dumazet (15):
tcp: use tp->tcp_mstamp in output path
tcp: introduce tcp_jiffies32
dccp: do not use tcp_time_stamp
tcp: use tcp_jiffies32 to feed tp->lsndtime
tcp: use tcp_jiffies32 to feed tp->snd_cwnd_stamp
tcp_bbr: use tcp_jiffies32 instead of tcp_time_stamp
tcp: bic,cubic: use tcp_jiffies32 instead of tcp_time_stamp
tcp: use tcp_jiffies32 for rcv_tstamp and lrcvtime
tcp: use tcp_jiffies32 to feed probe_timestamp
tcp: uses jiffies_32 to feed tp->chrono_start
tcp: use tcp_jiffies32 in __tcp_oow_rate_limited()
tcp_westwood: use tcp_jiffies32 instead of tcp_time_stamp
tcp_lp: cache tcp_time_stamp
tcp: replace misc tcp_time_stamp to tcp_jiffies32
tcp: switch TCP TS option (RFC 7323) to 1ms clock

 include/linux/skbuff.h           |  62 +------------------
 include/linux/tcp.h              |  22 +++----
 include/net/tcp.h                |  74 ++++++++++++++++++-----
 net/dccp/ccids/ccid2.c           |   8 +--
 net/dccp/ccids/ccid2.h           |   2 +-
 net/ipv4/syncookies.c            |   8 +--
 net/ipv4/tcp.c                   |  10 ++--
 net/ipv4/tcp_bbr.c               |  34 +++++------
 net/ipv4/tcp_bic.c               |   6 +-
 net/ipv4/tcp_cubic.c             |  14 ++---
 net/ipv4/tcp_htcp.c              |   2 +-
 net/ipv4/tcp_input.c             | 126 +++++++++++++++++++--------------------
 net/ipv4/tcp_ipv4.c              |  16 ++---
 net/ipv4/tcp_lp.c                |  17 +++---
 net/ipv4/tcp_metrics.c           |   2 +-
 net/ipv4/tcp_minisocks.c         |   8 +--
 net/ipv4/tcp_output.c            |  51 ++++++++--------
 net/ipv4/tcp_rate.c              |  16 ++---
 net/ipv4/tcp_recovery.c          |  24 ++++----
 net/ipv4/tcp_timer.c             |  17 +++---
 net/ipv4/tcp_westwood.c          |   6 +-
 net/ipv6/syncookies.c            |   2 +-
 net/ipv6/tcp_ipv6.c              |   4 +-
 net/netfilter/nf_synproxy_core.c |   2 +-
 24 files changed, 259 insertions(+), 274 deletions(-)
Signature · 1 line
2.13.0.303.g4ebf302169-goog