summaryrefslogtreecommitdiff
path: root/net/ipv6/proc.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-09-13 07:58:42 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-19 22:43:46 +0200
commitbd3df633f17d64523828d0ef5d74e4f1a768683c (patch)
tree697c8f28ac8ec029b6384c705cd4d994bedd7e86 /net/ipv6/proc.c
parent9aee41eff751e4c789ff785c561d7bf7ad72c286 (diff)
inet: frags: remove some helpers
Remove sum_frag_mem_limit(), ip_frag_mem() & ip6_frag_mem() Also since we use rhashtable we can bring back the number of fragments in "grep FRAG /proc/net/sockstat /proc/net/sockstat6" that was removed in commit 434d305405ab ("inet: frag: don't account number of fragment queues") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 6befe4a78b1553edb6eed3a78b4bcd9748526672) Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6/proc.c')
-rw-r--r--net/ipv6/proc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index e88bcb8ff0fd7..5704ec3d31780 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -38,7 +38,6 @@
static int sockstat6_seq_show(struct seq_file *seq, void *v)
{
struct net *net = seq->private;
- unsigned int frag_mem = ip6_frag_mem(net);
seq_printf(seq, "TCP6: inuse %d\n",
sock_prot_inuse_get(net, &tcpv6_prot));
@@ -48,7 +47,9 @@ static int sockstat6_seq_show(struct seq_file *seq, void *v)
sock_prot_inuse_get(net, &udplitev6_prot));
seq_printf(seq, "RAW6: inuse %d\n",
sock_prot_inuse_get(net, &rawv6_prot));
- seq_printf(seq, "FRAG6: inuse %u memory %u\n", !!frag_mem, frag_mem);
+ seq_printf(seq, "FRAG6: inuse %u memory %u\n",
+ atomic_read(&net->ipv6.frags.rhashtable.nelems),
+ frag_mem_limit(&net->ipv6.frags));
return 0;
}