aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 873cb9968ff5..5ed1be88e922 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2595,6 +2595,7 @@ int tcp_disconnect(struct sock *sk, int flags)
2595 tcp_saved_syn_free(tp); 2595 tcp_saved_syn_free(tp);
2596 tp->compressed_ack = 0; 2596 tp->compressed_ack = 0;
2597 tp->bytes_sent = 0; 2597 tp->bytes_sent = 0;
2598 tp->bytes_retrans = 0;
2598 2599
2599 /* Clean up fastopen related fields */ 2600 /* Clean up fastopen related fields */
2600 tcp_free_fastopen_req(tp); 2601 tcp_free_fastopen_req(tp);
@@ -3203,6 +3204,7 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
3203 info->tcpi_delivered = tp->delivered; 3204 info->tcpi_delivered = tp->delivered;
3204 info->tcpi_delivered_ce = tp->delivered_ce; 3205 info->tcpi_delivered_ce = tp->delivered_ce;
3205 info->tcpi_bytes_sent = tp->bytes_sent; 3206 info->tcpi_bytes_sent = tp->bytes_sent;
3207 info->tcpi_bytes_retrans = tp->bytes_retrans;
3206 unlock_sock_fast(sk, slow); 3208 unlock_sock_fast(sk, slow);
3207} 3209}
3208EXPORT_SYMBOL_GPL(tcp_get_info); 3210EXPORT_SYMBOL_GPL(tcp_get_info);
@@ -3228,6 +3230,7 @@ static size_t tcp_opt_stats_get_size(void)
3228 nla_total_size(sizeof(u32)) + /* TCP_NLA_DELIVERED */ 3230 nla_total_size(sizeof(u32)) + /* TCP_NLA_DELIVERED */
3229 nla_total_size(sizeof(u32)) + /* TCP_NLA_DELIVERED_CE */ 3231 nla_total_size(sizeof(u32)) + /* TCP_NLA_DELIVERED_CE */
3230 nla_total_size_64bit(sizeof(u64)) + /* TCP_NLA_BYTES_SENT */ 3232 nla_total_size_64bit(sizeof(u64)) + /* TCP_NLA_BYTES_SENT */
3233 nla_total_size_64bit(sizeof(u64)) + /* TCP_NLA_BYTES_RETRANS */
3231 0; 3234 0;
3232} 3235}
3233 3236
@@ -3277,6 +3280,8 @@ struct sk_buff *tcp_get_timestamping_opt_stats(const struct sock *sk)
3277 3280
3278 nla_put_u64_64bit(stats, TCP_NLA_BYTES_SENT, tp->bytes_sent, 3281 nla_put_u64_64bit(stats, TCP_NLA_BYTES_SENT, tp->bytes_sent,
3279 TCP_NLA_PAD); 3282 TCP_NLA_PAD);
3283 nla_put_u64_64bit(stats, TCP_NLA_BYTES_RETRANS, tp->bytes_retrans,
3284 TCP_NLA_PAD);
3280 3285
3281 return stats; 3286 return stats;
3282} 3287}