]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ipv6: make ip6_frag_nqueues() and ip6_frag_mem() static inline
authorAmerigo Wang <amwang@redhat.com>
Tue, 18 Sep 2012 16:50:10 +0000 (16:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Sep 2012 21:23:28 +0000 (17:23 -0400)
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>
include/net/ipv6.h
net/ipv6/reassembly.c

index 81d4455f6e146db37c6d3d55be66978d063ded51..979bf6c131412be9a4662d4738056feb91a26272 100644 (file)
@@ -271,8 +271,17 @@ struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space,
 
 extern bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb);
 
-int ip6_frag_nqueues(struct net *net);
-int ip6_frag_mem(struct net *net);
+#if IS_ENABLED(CONFIG_IPV6)
+static inline int ip6_frag_nqueues(struct net *net)
+{
+       return net->ipv6.frags.nqueues;
+}
+
+static inline int ip6_frag_mem(struct net *net)
+{
+       return atomic_read(&net->ipv6.frags.mem);
+}
+#endif
 
 #define IPV6_FRAG_HIGH_THRESH  (256 * 1024)    /* 262144 */
 #define IPV6_FRAG_LOW_THRESH   (192 * 1024)    /* 196608 */
index 0ee553354ed5ac199559052600413a11f4dc57aa..cf74f4e793564e251f64bc7b35effd987479fd8b 100644 (file)
@@ -67,16 +67,6 @@ struct ip6frag_skb_cb
 
 static struct inet_frags ip6_frags;
 
-int ip6_frag_nqueues(struct net *net)
-{
-       return net->ipv6.frags.nqueues;
-}
-
-int ip6_frag_mem(struct net *net)
-{
-       return atomic_read(&net->ipv6.frags.mem);
-}
-
 static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev,
                          struct net_device *dev);