netdev
[Top] [All Lists]

Re: [PATCH] NETIF_F_LLTX for devices 2

To: ak@xxxxxxx (Andi Kleen)
Subject: Re: [PATCH] NETIF_F_LLTX for devices 2
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Sep 2004 17:07:56 +1000
Cc: hadi@xxxxxxxxxx, ak@xxxxxxx, davem@xxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20040908065152.GC27886@wotan.suse.de>
Organization: Core
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.26-1-686-smp (i686))
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

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