diff options
author | Eric Dumazet <edumazet@google.com> | 2015-04-28 18:28:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-29 17:10:37 -0400 |
commit | bdd1f9edacb5f5835d1e6276571bbbe5b88ded48 (patch) | |
tree | bee07eb61b32918398a04cc171327b45cf14408d /include/uapi | |
parent | 0df48c26d8418c5c9fba63fac15b660d70ca2f1c (diff) |
tcp: add tcpi_bytes_received to tcp_info
This patch tracks total number of payload bytes received on a TCP socket.
This is the sum of all changes done to tp->rcv_nxt
RFC4898 named this : tcpEStatsAppHCThruOctetsReceived
This is a 64bit field, and can be fetched both from TCP_INFO
getsockopt() if one has a handle on a TCP socket, or from inet_diag
netlink facility (iproute2/ss patch will follow)
Note that tp->bytes_received was placed near tp->rcv_nxt for
best data locality and minimal performance impact.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Matt Mathis <mattmathis@google.com>
Cc: Eric Salo <salo@google.com>
Cc: Martin Lau <kafai@fb.com>
Cc: Chris Rapier <rapier@psc.edu>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/tcp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h index 6666e98a0af9..a48f93f3207b 100644 --- a/include/uapi/linux/tcp.h +++ b/include/uapi/linux/tcp.h | |||
@@ -190,6 +190,7 @@ struct tcp_info { | |||
190 | __u64 tcpi_pacing_rate; | 190 | __u64 tcpi_pacing_rate; |
191 | __u64 tcpi_max_pacing_rate; | 191 | __u64 tcpi_max_pacing_rate; |
192 | __u64 tcpi_bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked */ | 192 | __u64 tcpi_bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked */ |
193 | __u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */ | ||
193 | }; | 194 | }; |
194 | 195 | ||
195 | /* for TCP_MD5SIG socket option */ | 196 | /* for TCP_MD5SIG socket option */ |