On 28 March 2017 at 05:50, David Miller wrote:
> Doing the wakeup unconditionally is very wasteful, you just need to do it
> when enough space has been made available.
Thanks, please see v3.
Jonas
From: Jonas Jensen
Date: Mon, 27 Mar 2017 14:31:19 +0200
> @@ -25,6 +25,7 @@
> #include
> #include
> #include
> +#include
>
> #include "moxart_ether.h"
>
> @@ -297,6 +298,7 @@ static void moxart_tx_finished(struct net_device *ndev)
> tx_tail = TX_NEXT(tx_tail);
> }
moxart_mac_start_xmit() doesn't care where tx_tail is, tx_head can
catch and pass tx_tail, which is bad because moxart_tx_finished()
isn't guaranteed to catch up on freeing resources from tx_tail.
Add a check in moxart_mac_start_xmit() stopping the queue at
the end of the circular buffer. Wake it
3 matches
Mail list logo