aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
authorAmerigo Wang <amwang@redhat.com>2012-09-18 12:50:10 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-19 17:23:28 -0400
commitd4915c087f7c2457c580efc16fe0bfa1a576274d (patch)
tree3502caff41521db74f97a9e13e09f43cc03eb0c1 /include/net/ipv6.h
parentb836c99fd6c9dfe52a69fa0ba36ec918f80ce02a (diff)
ipv6: make ip6_frag_nqueues() and ip6_frag_mem() static inline
Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Michal Kubeček <mkubecek@suse.cz> Cc: David Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 81d4455f6e1..979bf6c1314 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -271,8 +271,17 @@ struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space,
271 271
272extern bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb); 272extern bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb);
273 273
274int ip6_frag_nqueues(struct net *net); 274#if IS_ENABLED(CONFIG_IPV6)
275int ip6_frag_mem(struct net *net); 275static inline int ip6_frag_nqueues(struct net *net)
276{
277 return net->ipv6.frags.nqueues;
278}
279
280static inline int ip6_frag_mem(struct net *net)
281{
282 return atomic_read(&net->ipv6.frags.mem);
283}
284#endif
276 285
277#define IPV6_FRAG_HIGH_THRESH (256 * 1024) /* 262144 */ 286#define IPV6_FRAG_HIGH_THRESH (256 * 1024) /* 262144 */
278#define IPV6_FRAG_LOW_THRESH (192 * 1024) /* 196608 */ 287#define IPV6_FRAG_LOW_THRESH (192 * 1024) /* 196608 */