drop packets if a WME queue gets too long.

similar code was removed in r3503, but it was wrong before as well, because
the packet needs to be dropped instead of requeued to actually achieve
prioritization between different packet types (WME classes). if we allow
one queue to consume all TX buffers then there is no buffer left to service
packets on higher priority queues.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3648 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
br1 2008-05-20 13:46:02 +00:00
parent c4093cb5c8
commit 9ba85e9edf
2 changed files with 14 additions and 0 deletions

View File

@ -3456,6 +3456,18 @@ ath_hardstart(struct sk_buff *__skb, struct net_device *dev)
txq = sc->sc_ac2q[skb->priority];
if (txq->axq_depth > ATH_QUEUE_DROP_COUNT) {
/*
* WME queue too long, drop packet
*
* this is necessary to achieve prioritization of packets between
* different queues. otherwise the lower priority queue (BK)
* would consume all tx buffers, while higher priority queues
* (e.g. VO) would be empty
*/
requeue = 0;
goto hardstart_fail;
}
#endif

View File

@ -217,6 +217,8 @@ static inline struct net_device *_alloc_netdev(int sizeof_priv, const char *mask
#define ATH_MAXVAPS_DEFAULT 4
/* number of TX buffers reserved for mgt frames */
#define ATH_TXBUF_MGT_RESERVED 20
/* maximum number of queued frames allowed per WME queue */
#define ATH_QUEUE_DROP_COUNT 150
/*
* dynamic turbo specific macros.