• Patrick McHardy's avatar
    [IPV4]: Uninline netfilter okfns · 861d0486
    Patrick McHardy authored
    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: default avatarPatrick McHardy <kaber@trash.net>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    861d0486
ip_output.c 34.9 KB