• Bart De Schuymer's avatar
    [NETFILTER]: Reduce call chain length in netfilter (take 2) · dc14a93c
    Bart De Schuymer authored
    This is a second try to fix the long chain call lengths in netfilter.
    The difference with the previous patch is that I got rid of the extra
    argument. I somehow didn't see it could be done without using the 'int
    *ret2' argument.
    
    A comment on the number of arguments to nf_hook_slow: I don't think the
    number of arguments should be decreased. For the bridge-nf code, f.e.,
    the indev argument does not equal (*pskb)->dev (this is an answer to a
    question of Rusty in the old thread).
    
    A comment on the argument change of nf_hook_slow (sk_buff * to sk_buff
    **) and the bad influence on tail call optimization possibilities. From
    the discussion in the old thread it became clear that no tail call is
    generated for the current code. So, I don't see why this is a reason not
    to accept the patch. Furthermore, if gcc ever would become able of doing
    the current code with a tail call, it should be very easy to change the
    code back to the original. In the meantime, I think this patch is the
    best known solution.
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    dc14a93c
netfilter.h 5.9 KB