diff options
| author | Wei Wang <[email protected]> | 2018-08-01 00:46:21 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2018-08-01 16:56:10 +0000 |
| commit | ba113c3aa79a7f941ac162d05a3620bdc985c58d (patch) | |
| tree | 6ac064d13a2920d19c52998bb91e138916fccae3 /net/ipv4/tcp_output.c | |
| parent | tcp: add a helper to calculate size of opt_stats (diff) | |
| download | kernel-ba113c3aa79a7f941ac162d05a3620bdc985c58d.tar.gz kernel-ba113c3aa79a7f941ac162d05a3620bdc985c58d.zip | |
tcp: add data bytes sent stats
Introduce a new TCP stat to record the number of bytes sent
(RFC4898 tcpEStatsPerfHCDataOctetsOut) and expose it in both tcp_info
(TCP_INFO) and opt_stats (SOF_TIMESTAMPING_OPT_STATS).
Signed-off-by: Wei Wang <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Acked-by: Neal Cardwell <[email protected]>
Acked-by: Soheil Hassas Yeganeh <[email protected]>
Acked-by: Yuchung Cheng <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
| -rw-r--r-- | net/ipv4/tcp_output.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 490df62f26d4..861531fe0e97 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1136,6 +1136,7 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, if (skb->len != tcp_header_size) { tcp_event_data_sent(tp, sk); tp->data_segs_out += tcp_skb_pcount(skb); + tp->bytes_sent += skb->len - tcp_header_size; tcp_internal_pacing(sk, skb); } |
