netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] forcedeath: Fix bql support for forcedeath
@ 2011-12-02  9:48 igorm
  2011-12-02 10:46 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: igorm @ 2011-12-02  9:48 UTC (permalink / raw)
  To: netdev; +Cc: davem, Igor Maravic

From: Igor Maravic <igorm@etf.rs>

Moved netdev_completed_queue() out of while loop in function nv_tx_done_optimized().
Because this function was in while loop,
BUG_ON(count > dql->num_queued - dql->num_completed)
was hit in dql_completed().

Signed-off-by: Igor Maravic <igorm@etf.rs>
---
 drivers/net/ethernet/nvidia/forcedeth.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 5245dac..4c4e7f4 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -2561,13 +2561,14 @@ static int nv_tx_done_optimized(struct net_device *dev, int limit)
 				nv_tx_flip_ownership(dev);
 		}
 
-		netdev_completed_queue(np->dev, tx_work, bytes_cleaned);
-
 		if (unlikely(np->get_tx.ex++ == np->last_tx.ex))
 			np->get_tx.ex = np->first_tx.ex;
 		if (unlikely(np->get_tx_ctx++ == np->last_tx_ctx))
 			np->get_tx_ctx = np->first_tx_ctx;
 	}
+
+	netdev_completed_queue(np->dev, tx_work, bytes_cleaned);
+
 	if (unlikely((np->tx_stop == 1) && (np->get_tx.ex != orig_get_tx))) {
 		np->tx_stop = 0;
 		netif_wake_queue(dev);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] forcedeath: Fix bql support for forcedeath
  2011-12-02  9:48 [PATCH net-next] forcedeath: Fix bql support for forcedeath igorm
@ 2011-12-02 10:46 ` Eric Dumazet
  2011-12-02 17:39   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2011-12-02 10:46 UTC (permalink / raw)
  To: igorm; +Cc: netdev, davem

Le vendredi 02 décembre 2011 à 10:48 +0100, igorm@etf.rs a écrit :
> From: Igor Maravic <igorm@etf.rs>
> 
> Moved netdev_completed_queue() out of while loop in function nv_tx_done_optimized().
> Because this function was in while loop,
> BUG_ON(count > dql->num_queued - dql->num_completed)
> was hit in dql_completed().
> 
> Signed-off-by: Igor Maravic <igorm@etf.rs>
> ---

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

Thanks !

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] forcedeath: Fix bql support for forcedeath
  2011-12-02 10:46 ` Eric Dumazet
@ 2011-12-02 17:39   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-12-02 17:39 UTC (permalink / raw)
  To: eric.dumazet; +Cc: igorm, netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 02 Dec 2011 11:46:43 +0100

> Le vendredi 02 décembre 2011 à 10:48 +0100, igorm@etf.rs a écrit :
>> From: Igor Maravic <igorm@etf.rs>
>> 
>> Moved netdev_completed_queue() out of while loop in function nv_tx_done_optimized().
>> Because this function was in while loop,
>> BUG_ON(count > dql->num_queued - dql->num_completed)
>> was hit in dql_completed().
>> 
>> Signed-off-by: Igor Maravic <igorm@etf.rs>
>> ---
> 
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-02 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02  9:48 [PATCH net-next] forcedeath: Fix bql support for forcedeath igorm
2011-12-02 10:46 ` Eric Dumazet
2011-12-02 17:39   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).