[Top] [All Lists]

Re: [PATCH/RFC] Reduce call chain length in netfilter

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: [PATCH/RFC] Reduce call chain length in netfilter
From: "David S. Miller" <davem@xxxxxxxxxxxxx>
Date: Thu, 27 Jan 2005 11:47:26 -0800
Cc: bdschuym@xxxxxxxxxx, netdev@xxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxxxxxx, snort2004@xxxxxxx, rusty@xxxxxxxxxxxxxxx, ak@xxxxxxx, bridge@xxxxxxxx, gandalf@xxxxxxxxxxxxxx, dwmw2@xxxxxxxxxxxxx, shemminger@xxxxxxxx
In-reply-to: <41F929FA.3050800@xxxxxxxxx>
References: <1131604877.20041218092730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <p73zn0ccaee.fsf@xxxxxxxxxxxxx> <1105117559.11753.34.camel@xxxxxxxxxxxxxxxxxxxxxxx> <20050107100017.454ddadc@xxxxxxxxxxxxxxxxx> <1105133241.3375.16.camel@xxxxxxxxxxxxxxxxxxxxx> <20050118135735.4b77d38d.davem@xxxxxxxxxxxxx> <1106433059.4486.11.camel@xxxxxxxxxxxxxxxxxxxxx> <1106436153.20995.42.camel@xxxxxxxxxxxxxx> <1106484019.3376.5.camel@xxxxxxxxxxxxxxxxxxxxx> <1106496509.1085.1.camel@xxxxxxxxxxxxxx> <20050125220558.6e824f8a.davem@xxxxxxxxxxxxx> <1106730510.4041.4.camel@xxxxxxxxxxxxxxxxxxxxx> <41F82C6D.7020006@xxxxxxxxx> <20050126231801.7bf90338.davem@xxxxxxxxxxxxx> <41F929FA.3050800@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Thu, 27 Jan 2005 18:50:50 +0100
Patrick McHardy <kaber@xxxxxxxxx> wrote:

>  From what I can see it doesn't generate tail-calls currently:

Indeed... It even doesn't do this on Sparc64 either, even for
the okfn(skb) call which I was sure it would.

It won't tail-call for function pointers for some strance reason
as exhibited by this simple test:

struct sk_buff {
        int foo;

int invoke(struct sk_buff *skb, int (*okfn)(struct sk_buff *))
        return okfn(skb);

extern int test_func(struct sk_buff *);

int invoke2(struct sk_buff *skb)
        return test_func(skb);

In the generated asm on sparc64, invoke2() gets a tail-call
whereas invoke() does not.  Hmmm...

<Prev in Thread] Current Thread [Next in Thread>