diff options
author | Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz> | 2015-12-22 23:51:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-08 06:35:16 +0300 |
commit | 7c0b6bce6e848a59cd15d1ade9db346d34d90c5a (patch) | |
tree | da554734918860448c2a8f0092a334146ea8728f /drivers/staging/octeon/ethernet-tx.c | |
parent | 5a89a875c96a9d038715c42f5f712002ce5124d0 (diff) | |
download | linux-7c0b6bce6e848a59cd15d1ade9db346d34d90c5a.tar.xz |
staging: octeon: Fix logic for waking octeon ethernet tx queue.
Only wake tx queue when driver queue is back within bounds.
The logic here was just reenabling the queue when any buffers had been
freed. the queue was stopped whenever the length exceeded 1000
(MAX_OUT_QUEUE_DEPTH), but then was essentially immediately started again.
On a congested link, the queue length would just keep increasing up to
around 8000 (for average size packets), at which point the hardware would
start refusing the packets and they would begin to be dropped.
This prevented the qdisc layer from effectively managing and prioritising
packets, as essentially all packets were being allowed into the driver
queue and then were being dropped by the hardware.
This change only restarts the queue if the length is less than 1000
(MAX_OUT_QUEUE_DEPTH).
Reviewed-by: Kyeong Yoo <kyeong.yoo@alliedtelesis.co.nz>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Richard Laing <richard.laing@alliedtelesis.co.nz>
Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon/ethernet-tx.c')
-rw-r--r-- | drivers/staging/octeon/ethernet-tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c index 5611a0269aa8..82abaeca27a7 100644 --- a/drivers/staging/octeon/ethernet-tx.c +++ b/drivers/staging/octeon/ethernet-tx.c @@ -126,7 +126,7 @@ static void cvm_oct_free_tx_skbs(struct net_device *dev) } total_remaining += skb_queue_len(&priv->tx_free_list[qos]); } - if (total_freed >= 0 && netif_queue_stopped(dev)) + if (total_remaining < MAX_OUT_QUEUE_DEPTH && netif_queue_stopped(dev)) netif_wake_queue(dev); if (total_remaining) cvm_oct_kick_tx_poll_watchdog(); |