Andi Kleen <ak@xxxxxxx> wrote:
>
>> 1: means packet was not put on the ring. i.e if you return
>> 1, the toplayer will retry later with the same skb.
>> [of course If you stash it on the ring, the danger is tx complete will
>> try to free it later while the toplayer code is still referencing it. A
>> good oops].
>
> Actually when you return 1 then the kernel prints an ugly
> message and it is considered a bug. Here -1 is legal.
1 is legal in contexts where queueing occurs. See for example
qdisc_restart().
It's only illegal here because this is the direct xmit path without
queueing.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
|