This patch tracks total number of bytes acked for a TCP socket. This is the sum of all changes done to tp->snd_una, and allows for precise tracking of delivered data. RFC4898 named this : tcpEStatsAppHCThruOctetsAcked 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_acked was placed near tp->snd_una for best data locality and minimal performance impact.
Showing the changes to include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -189,6 +189,7 @@ struct tcp_info { · 188 unmodified lines | ||
| 189 | 189 | |
| 190 | 190 | __u64 tcpi_pacing_rate; |
| 191 | 191 | __u64 tcpi_max_pacing_rate; |
| 192 | + __u64 tcpi_bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked */ | |
| 192 | 193 | }; |
| 193 | 194 | |
| 194 | 195 | /* for TCP_MD5SIG socket option */ |