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.
Showing the changes to include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -190,6 +190,7 @@ struct tcp_info { · 189 unmodified lines | |||
| 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 */ |