netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ayaz Abdulla <aabdulla@nvidia.com>
To: akpm@linux-foundation.org
Cc: jeff@garzik.org, netdev@vger.kernel.org, mingo@elte.hu
Subject: Re: [patch 09/11] forcedeth: improve NAPI logic
Date: Thu, 26 Apr 2007 10:30:04 -0400	[thread overview]
Message-ID: <4630B76C.7070603@nvidia.com> (raw)
In-Reply-To: <200704260723.l3Q7NNCj023844@shell0.pdx.osdl.net>

I don't see why the NAPI handler needs to process tx packets. The ISR 
will handle all tx processing.


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>
> 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);
>  	}
> _

  reply	other threads:[~2007-04-26 18:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-26  7:23 [patch 09/11] forcedeth: improve NAPI logic akpm
2007-04-26 14:30 ` Ayaz Abdulla [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4630B76C.7070603@nvidia.com \
    --to=aabdulla@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=jeff@garzik.org \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).