diff options
author | Eric Dumazet <edumazet@google.com> | 2018-03-31 21:58:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-01 05:25:39 +0200 |
commit | 6befe4a78b1553edb6eed3a78b4bcd9748526672 (patch) | |
tree | f53d1046d1145435a58c2d7d576e08d04250f849 /net/ipv4/proc.c | |
parent | inet: frags: use rhashtables for reassembly units (diff) | |
download | linux-6befe4a78b1553edb6eed3a78b4bcd9748526672.tar.xz linux-6befe4a78b1553edb6eed3a78b4bcd9748526672.zip |
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>
Diffstat (limited to 'net/ipv4/proc.c')
-rw-r--r-- | net/ipv4/proc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index adfb75340275..aacfce0d7d82 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c @@ -54,7 +54,6 @@ static int sockstat_seq_show(struct seq_file *seq, void *v) { struct net *net = seq->private; - unsigned int frag_mem; int orphans, sockets; orphans = percpu_counter_sum_positive(&tcp_orphan_count); @@ -72,8 +71,9 @@ static int sockstat_seq_show(struct seq_file *seq, void *v) sock_prot_inuse_get(net, &udplite_prot)); seq_printf(seq, "RAW: inuse %d\n", sock_prot_inuse_get(net, &raw_prot)); - frag_mem = ip_frag_mem(net); - seq_printf(seq, "FRAG: inuse %u memory %u\n", !!frag_mem, frag_mem); + seq_printf(seq, "FRAG: inuse %u memory %u\n", + atomic_read(&net->ipv4.frags.rhashtable.nelems), + frag_mem_limit(&net->ipv4.frags)); return 0; } |