diff options
author | Wei Wang <weiwan@google.com> | 2018-07-31 20:46:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-01 12:56:10 -0400 |
commit | ba113c3aa79a7f941ac162d05a3620bdc985c58d (patch) | |
tree | 6ac064d13a2920d19c52998bb91e138916fccae3 /net/ipv4/tcp_output.c | |
parent | 984988aa72188453f8c8a42dcf94bba1c57e73aa (diff) |
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 <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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, | |||
1136 | if (skb->len != tcp_header_size) { | 1136 | if (skb->len != tcp_header_size) { |
1137 | tcp_event_data_sent(tp, sk); | 1137 | tcp_event_data_sent(tp, sk); |
1138 | tp->data_segs_out += tcp_skb_pcount(skb); | 1138 | tp->data_segs_out += tcp_skb_pcount(skb); |
1139 | tp->bytes_sent += skb->len - tcp_header_size; | ||
1139 | tcp_internal_pacing(sk, skb); | 1140 | tcp_internal_pacing(sk, skb); |
1140 | } | 1141 | } |
1141 | 1142 | ||