]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[IPV4]: Uninline netfilter okfns
authorPatrick McHardy <kaber@trash.net>
Mon, 15 Oct 2007 08:48:39 +0000 (01:48 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 15 Oct 2007 19:26:35 +0000 (12:26 -0700)
Now that we don't pass double skb pointers to nf_hook_slow anymore, gcc
can generate tail calls for some of the netfilter hook okfn invocations,
so there is no need to inline the functions anymore. This caused huge
code bloat since we ended up with one inlined version and one out-of-line
version since we pass the address to nf_hook_slow.

Before:
   text    data     bss     dec     hex filename
8997385 1016524  524652 10538561         a0ce41 vmlinux

After:
   text    data     bss     dec     hex filename
8994009 1016524  524652 10535185         a0c111 vmlinux
-------------------------------------------------------
  -3376

All cases have been verified to generate tail-calls with and without
netfilter. The okfns in ipmr and xfrm4_input still remain inline because
gcc can't generate tail-calls for them.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_forward.c
net/ipv4/ip_input.c
net/ipv4/ip_output.c

index afbf938836f52505d4321d6eba99e75d26162789..877da3ed52e2bef524d12cc88f2d23aa33b69502 100644 (file)
@@ -40,7 +40,7 @@
 #include <net/route.h>
 #include <net/xfrm.h>
 
-static inline int ip_forward_finish(struct sk_buff *skb)
+static int ip_forward_finish(struct sk_buff *skb)
 {
        struct ip_options * opt = &(IPCB(skb)->opt);
 
index 8f75e43ad3b3581c3c6967f56c40418ddc818378..168c871fcd796a4c4b411e440bb1fe3da004389d 100644 (file)
@@ -195,7 +195,7 @@ int ip_call_ra_chain(struct sk_buff *skb)
        return 0;
 }
 
-static inline int ip_local_deliver_finish(struct sk_buff *skb)
+static int ip_local_deliver_finish(struct sk_buff *skb)
 {
        __skb_pull(skb, ip_hdrlen(skb));
 
@@ -324,7 +324,7 @@ drop:
        return -1;
 }
 
-static inline int ip_rcv_finish(struct sk_buff *skb)
+static int ip_rcv_finish(struct sk_buff *skb)
 {
        const struct iphdr *iph = ip_hdr(skb);
        struct rtable *rt;
index 699f06781fd891df9882d1c77c0c335f8d7a7252..f508835ba7137a3ae5cf79e6f2e5bd83f92fe0e9 100644 (file)
@@ -202,7 +202,7 @@ static inline int ip_skb_dst_mtu(struct sk_buff *skb)
               skb->dst->dev->mtu : dst_mtu(skb->dst);
 }
 
-static inline int ip_finish_output(struct sk_buff *skb)
+static int ip_finish_output(struct sk_buff *skb)
 {
 #if defined(CONFIG_NETFILTER) && defined(CONFIG_XFRM)
        /* Policy lookup after SNAT yielded a new policy */