[Top] [All Lists]

Re: LLTX and netif_stop_queue

To: hadi@xxxxxxxxxx
Subject: Re: LLTX and netif_stop_queue
From: Eric Lemoine <eric.lemoine@xxxxxxxxx>
Date: Mon, 3 Jan 2005 00:30:31 +0100
Cc: Patrick McHardy <kaber@xxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, roland@xxxxxxxxxxx, netdev@xxxxxxxxxxx, openib-general@xxxxxxxxxx
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta;; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=dfullWpQ+6i8if36k9vS+ZzayY0N6nDz4RWx3AuyeDG7Ss4db1zvvQdzDIxWypItQQVNzO221czDENVa2inahnEZLBsJz7yAIzPN/1+0wuHc03hwBNT6j2Pjbcn/97aQo2nhRmhfxfa5WCANe9tYafsaQ4v44yvm7MPBxHOmfnQ=
In-reply-to: <1104240717.1100.66.camel@jzny.localdomain>
References: <> <> <1103484675.1050.158.camel@jzny.localdomain> <> <> <> <> <> <1104240717.1100.66.camel@jzny.localdomain>
Reply-to: Eric Lemoine <eric.lemoine@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On 28 Dec 2004 08:31:57 -0500, jamal <hadi@xxxxxxxxxx> wrote:
> On Fri, 2004-12-24 at 11:10, Eric Lemoine wrote:
> > Yes but requiring drivers to release a lock that they should not even
> > be aware of doesn't sound good. Another way would be to keep
> > dev->queue_lock grabbed when entering start_xmit() and let the driver
> > drop it (and re-acquire it before it returns) only if it wishes so.
> > Although I don't like this too much either, that's the best way I can
> > think of up to now...
> I am not a big fan of that patch either, but i cant think of a cleaner
> way to do it.
> The violation already happens with the LLTX flag. So maybe a big warning
> that says "Do this only if you driver is LLTX enabled". The other way to
> do it is put a check to see if LLTX is enabled before releasing that
> lock - but why the extra cycles? Driver writer should know.

Two (untested) patches implementing what I described above.

The first pach (sch_generic.patch) keeps queue_lock held in
qdisc_restart() when calling hard_start_xmit() of a LLTX driver. The
second (sungem.patch) makes sungem release queue_lock after grabbing
its private tx lock.

Note that the modifications made to qdisc_restart() are not compatible
with the current LLTX drivers. All LLTX drivers must be modified along
sungem.patch's lines. Take sungem.patch as an example of how things
must be done.

Patches apply to current davem bk snapshot.


Attachment: sch_generic.patch
Description: Binary data

Attachment: sungem.patch
Description: Binary data

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