tcp: export packets delivery info
authorYuchung Cheng <ycheng@google.com>
Wed, 18 Apr 2018 06:18:49 +0000 (23:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Apr 2018 17:05:16 +0000 (13:05 -0400)
commitfeb5f2ec646483fb66f9ad7218b1aad2a93a2a5c
treecc1b3d9495eeab4743e7086ff22a926854d79823
parente21db6f69a95b846ff04e31fe0a86004cbd000d7
tcp: export packets delivery info

Export data delivered and delivered with CE marks to
1) SNMP TCPDelivered and TCPDeliveredCE
2) getsockopt(TCP_INFO)
3) Timestamping API SOF_TIMESTAMPING_OPT_STATS

Note that for SCM_TSTAMP_ACK, the delivery info in
SOF_TIMESTAMPING_OPT_STATS is reported before the info
was fully updated on the ACK.

These stats help application monitor TCP delivery and ECN status
on per host, per connection, even per message level.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/snmp.h
include/uapi/linux/tcp.h
net/ipv4/proc.c
net/ipv4/tcp.c
net/ipv4/tcp_input.c