Search Linux Wireless

Re: [PATCH] mac80211: rewrite fragmentation code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux