* [patch 03/13] forcedeth: improve NAPI logic
@ 2007-05-11 5:52 akpm
2007-05-11 7:11 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-05-11 5:52 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>
---
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@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
@@ -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);
}
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 03/13] forcedeth: improve NAPI logic
2007-05-11 5:52 [patch 03/13] forcedeth: improve NAPI logic akpm
@ 2007-05-11 7:11 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-05-11 7:11 UTC (permalink / raw)
To: akpm; +Cc: netdev, mingo, aabdulla
akpm@linux-foundation.org wrote:
> 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>
> ---
> 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@linux-foundation.org>
> ---
>
> drivers/net/forcedeth.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
This was NAK'd at least twice?
It's a half-finished project. You need to do more, if moving TX from
irq handler to NAPI.
I'm definitely not applying it, and as its incomplete, it definitely
isn't suitable for upstream.
Jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-11 7:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-11 5:52 [patch 03/13] forcedeth: improve NAPI logic akpm
2007-05-11 7:11 ` Jeff Garzik
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).