diff options
author | Eric Dumazet <edumazet@google.com> | 2018-10-10 22:29:57 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-18 10:13:24 +0300 |
commit | ea7496f018adcfbac5396ead5756dcabb9866749 (patch) | |
tree | 254329accd7bbcd0de42a711d5efeb52dca0ae61 /include/net | |
parent | 23ce9c5ce704b985dad79bce944a348f0c205869 (diff) | |
download | linux-ea7496f018adcfbac5396ead5756dcabb9866749.tar.xz |
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 'include/net')
-rw-r--r-- | include/net/inet_frag.h | 5 | ||||
-rw-r--r-- | include/net/ip.h | 1 | ||||
-rw-r--r-- | include/net/ipv6.h | 7 |
3 files changed, 0 insertions, 13 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index b146f1e456a5..a49cdf25cef0 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -140,11 +140,6 @@ static inline void add_frag_mem_limit(struct netns_frags *nf, int i) atomic_add(i, &nf->mem); } -static inline int sum_frag_mem_limit(struct netns_frags *nf) -{ - return atomic_read(&nf->mem); -} - /* RFC 3168 support : * We want to check ECN values of all fragments, do detect invalid combinations. * In ipq->ecn, we store the OR value of each ip4_frag_ecn() fragment value. diff --git a/include/net/ip.h b/include/net/ip.h index bc9b4deeb60e..8646da034851 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -548,7 +548,6 @@ static inline struct sk_buff *ip_check_defrag(struct net *net, struct sk_buff *s return skb; } #endif -int ip_frag_mem(struct net *net); /* * Functions provided by ip_forward.c diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 6b9b551f653b..7cb100d25bb5 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -330,13 +330,6 @@ static inline bool ipv6_accept_ra(struct inet6_dev *idev) idev->cnf.accept_ra; } -#if IS_ENABLED(CONFIG_IPV6) -static inline int ip6_frag_mem(struct net *net) -{ - return sum_frag_mem_limit(&net->ipv6.frags); -} -#endif - #define IPV6_FRAG_HIGH_THRESH (4 * 1024*1024) /* 4194304 */ #define IPV6_FRAG_LOW_THRESH (3 * 1024*1024) /* 3145728 */ #define IPV6_FRAG_TIMEOUT (60 * HZ) /* 60 seconds */ |