mirror of https://github.com/proski/madwifi
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:
parent
c4093cb5c8
commit
9ba85e9edf
12
ath/if_ath.c
12
ath/if_ath.c
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue