[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1210237230.3547.35.camel@johannes.berg>
Date: Thu, 08 May 2008 11:00:30 +0200
From: Johannes Berg <johannes@...solutions.net>
To: David Miller <davem@...emloft.net>
Cc: herbert@...dor.apana.org.au, mb@...sch.de,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
ron.rindjunsky@...el.com, tomasw@...il.com, ivdoorn@...il.com,
peter.p.waskiewicz.jr@...el.com
Subject: Re: [PATCH] mac80211: rewrite fragmentation code
On Wed, 2008-05-07 at 20:26 -0700, David Miller wrote:
> > You're supposed to stop the queue before the ring overflows.
>
> Right, and this is why drivers choose a TX wakeup threshold such
> that they can accept an arbitrarily sized TSO frame.
>
> For example, from drivers/net/tg3.c's ->hard_start_xmit():
>
> if (unlikely(tg3_tx_avail(tp) <= (MAX_SKB_FRAGS + 1))) {
> netif_stop_queue(dev);
> if (tg3_tx_avail(tp) > TG3_TX_WAKEUP_THRESH(tp))
> netif_wake_queue(tp->dev);
> }
>
> The driver is responsible for stopping the queue _before_ it
> enters a state where there is not enough space in the queue
> to accept a packet.
Yes yes yes I know :) It's just quite awkward to handle when your
hard_start_xmit() actually increases the number of packets, you don't
really know how deep the queue is etc. I'll add an assertion like that
to mac80211 for the non-fragmented case and clean up the fragmented case
to retry by itself without upper layer involvement after the tx->cb
patch.
johannes
Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)
Powered by blists - more mailing lists