On Wed, 2004-09-08 at 03:24, Andi Kleen wrote:
> On Wed, Sep 08, 2004 at 05:07:56PM +1000, Herbert Xu wrote:
> > 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.
Is this an effect of your code? This is not so in existing code.
> > 1 is legal in contexts where queueing occurs. See for example
> > qdisc_restart().
> I agree my sentence was misleading.
> Basically the distinction here is:
> 1 is for flow control
> -1 is for lock contention
> I think it's better to separate them because it minimizes the risk
> of breaking old drivers.
Dont see how its going to break old drivers since they wont be making
this kind of call anyways.
In both cases it is semantically a flow control i.e "transmit path is