diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 8c5cd9efebbc..4bf0e8ca7b5b 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2592,7 +2592,7 @@ EXPORT_SYMBOL(compat_tcp_setsockopt); | |||
2592 | #endif | 2592 | #endif |
2593 | 2593 | ||
2594 | /* Return information about state of tcp endpoint in API format. */ | 2594 | /* Return information about state of tcp endpoint in API format. */ |
2595 | void tcp_get_info(const struct sock *sk, struct tcp_info *info) | 2595 | void tcp_get_info(struct sock *sk, struct tcp_info *info) |
2596 | { | 2596 | { |
2597 | const struct tcp_sock *tp = tcp_sk(sk); | 2597 | const struct tcp_sock *tp = tcp_sk(sk); |
2598 | const struct inet_connection_sock *icsk = inet_csk(sk); | 2598 | const struct inet_connection_sock *icsk = inet_csk(sk); |
@@ -2663,6 +2663,10 @@ void tcp_get_info(const struct sock *sk, struct tcp_info *info) | |||
2663 | 2663 | ||
2664 | rate = READ_ONCE(sk->sk_max_pacing_rate); | 2664 | rate = READ_ONCE(sk->sk_max_pacing_rate); |
2665 | info->tcpi_max_pacing_rate = rate != ~0U ? rate : ~0ULL; | 2665 | info->tcpi_max_pacing_rate = rate != ~0U ? rate : ~0ULL; |
2666 | |||
2667 | spin_lock_bh(&sk->sk_lock.slock); | ||
2668 | info->tcpi_bytes_acked = tp->bytes_acked; | ||
2669 | spin_unlock_bh(&sk->sk_lock.slock); | ||
2666 | } | 2670 | } |
2667 | EXPORT_SYMBOL_GPL(tcp_get_info); | 2671 | EXPORT_SYMBOL_GPL(tcp_get_info); |
2668 | 2672 | ||