tcp: record pkts sent and retransmistted
authorYuchung Cheng <ycheng@google.com>
Sat, 28 Jan 2017 00:24:38 +0000 (16:24 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Jan 2017 00:17:23 +0000 (19:17 -0500)
commit7e98102f489775d8c000884fca8a0d995ea688a9
tree40a40dc7f485407ab82f3851f8a50ba8337525c6
parentf33f4ac3d3a6e29f1c5a9d8cd1058d298f4685f4
tcp: record pkts sent and retransmistted

Add two stats in SCM_TIMESTAMPING_OPT_STATS:

TCP_NLA_DATA_SEGS_OUT: total data packets sent including retransmission
TCP_NLA_TOTAL_RETRANS: total data packets retransmitted

The names are picked to be consistent with corresponding fields in
TCP_INFO. This allows applications that are using the timestamping
API to measure latency stats to also retrive retransmission rate
of application write.

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