netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 09/11] forcedeth: improve NAPI logic
@ 2007-04-26  7:23 akpm
  2007-04-26 14:30 ` Ayaz Abdulla
  2007-04-28  0:10 ` Jeff Garzik
  0 siblings, 2 replies; 8+ messages in thread
From: akpm @ 2007-04-26  7:23 UTC (permalink / raw)
  To: jeff; +Cc: netdev, akpm, mingo, aabdulla

From: Ingo Molnar <mingo@elte.hu>

Another forcedeth.c thing: i noticed that its NAPI handler does not do
tx-ring processing.  The patch below implements this - tested on DESC_VER_2
hardware, with CONFIG_FORCEDETH_NAPI=y.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/net/forcedeth.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff -puN drivers/net/forcedeth.c~forcedeth-improve-napi-logic drivers/net/forcedeth.c
--- a/drivers/net/forcedeth.c~forcedeth-improve-napi-logic
+++ a/drivers/net/forcedeth.c
@@ -3108,9 +3108,17 @@ static int nv_napi_poll(struct net_devic
 	int retcode;
 
 	if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) {
+		spin_lock_irqsave(&np->lock, flags);
+		nv_tx_done(dev);
+		spin_unlock_irqrestore(&np->lock, flags);
+
 		pkts = nv_rx_process(dev, limit);
 		retcode = nv_alloc_rx(dev);
 	} else {
+		spin_lock_irqsave(&np->lock, flags);
+		nv_tx_done_optimized(dev, np->tx_ring_size);
+		spin_unlock_irqrestore(&np->lock, flags);
+
 		pkts = nv_rx_process_optimized(dev, limit);
 		retcode = nv_alloc_rx_optimized(dev);
 	}
_

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

end of thread, other threads:[~2007-04-28  0:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26  7:23 [patch 09/11] forcedeth: improve NAPI logic akpm
2007-04-26 14:30 ` Ayaz Abdulla
2007-04-26 18:24   ` Jeff Garzik
2007-04-26 14:53     ` Ayaz Abdulla
2007-04-27 12:27       ` Jeff Garzik
2007-04-27 18:57       ` Lennart Sorensen
2007-04-28  0:10 ` Jeff Garzik
2007-04-28  0:25   ` Andrew Morton

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).