Op do, 27-01-2005 te 11:47 -0800, schreef David S. Miller:
> 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...
Pasha (<snort2004@xxxxxxx>) is currently using a bridge-nf patch vs
2.4.29 with the changes I sent to you. After two days he sent me
(yesterday) a message that all is well. Without the patch he was getting
the stack overflow oopses.
cheers,
Bart
|