[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200705110552.l4B5qlHx007795@shell0.pdx.osdl.net>
Date: Thu, 10 May 2007 22:52:47 -0700
From: akpm@...ux-foundation.org
To: jeff@...zik.org
Cc: netdev@...r.kernel.org, akpm@...ux-foundation.org, mingo@...e.hu,
aabdulla@...dia.com
Subject: [patch 03/13] forcedeth: improve NAPI logic
From: Ingo Molnar <mingo@...e.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@...e.hu>
Cc: Ayaz Abdulla <aabdulla@...dia.com>
---
Auke said:
the patch needs to be improved.
The following needs to be done when NAPI is enabled:
- remove the tx handling within the ISRs
- mask off the tx interrupts within the ISRs that handle tx processing
- re-enable tx interrupts within the NAPI handler
- add tx handling within the NAPI handler (this patch covers it)
Signed-off-by: Andrew Morton <akpm@...ux-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
@@ -3111,9 +3111,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);
}
_
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists