All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev <netdev@vger.kernel.org>, SH-Linux <linux-sh@vger.kernel.org>
Subject: Re: [PATCH v2 5/5] net: sh_eth: use NAPI
Date: Mon, 14 May 2012 06:13:57 +0000	[thread overview]
Message-ID: <4FB0A2A5.3060001@renesas.com> (raw)
In-Reply-To: <1336750529.2874.69.camel@bwh-desktop.uk.solarflarecom.com>

2012/05/12 0:35, Ben Hutchings wrote:
> On Fri, 2012-05-11 at 17:38 +0900, Shimoda, Yoshihiro wrote:
>> This patch modifies the driver to use NAPI.
> [...]
>> +static int sh_eth_poll(struct napi_struct *napi, int budget)
>> +{
< snip >
>> +	/* check whether the controller doesn't have any events */
>> +	if (!txfree_num && !(intr_status & cd->eesr_err_check) &&
>> +	    work_done < budget) {
>> +		napi_complete(napi);
> 
> If and only if you return a value less than the budget then you *must*
> call napi_complete().  You can't add these extra conditions.

Thank you for the point. I will fix it.

< snip >
> 
> You will also need to call napi_disable() and napi_enable() in the
> set_ringparam implementation.

I will add the code in sh_eth_set_ringparam().

> Ben.
> 

Best regards,
Yoshihiro Shimoda

WARNING: multiple messages have this Message-ID (diff)
From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev <netdev@vger.kernel.org>, SH-Linux <linux-sh@vger.kernel.org>
Subject: Re: [PATCH v2 5/5] net: sh_eth: use NAPI
Date: Mon, 14 May 2012 15:13:57 +0900	[thread overview]
Message-ID: <4FB0A2A5.3060001@renesas.com> (raw)
In-Reply-To: <1336750529.2874.69.camel@bwh-desktop.uk.solarflarecom.com>

2012/05/12 0:35, Ben Hutchings wrote:
> On Fri, 2012-05-11 at 17:38 +0900, Shimoda, Yoshihiro wrote:
>> This patch modifies the driver to use NAPI.
> [...]
>> +static int sh_eth_poll(struct napi_struct *napi, int budget)
>> +{
< snip >
>> +	/* check whether the controller doesn't have any events */
>> +	if (!txfree_num && !(intr_status & cd->eesr_err_check) &&
>> +	    work_done < budget) {
>> +		napi_complete(napi);
> 
> If and only if you return a value less than the budget then you *must*
> call napi_complete().  You can't add these extra conditions.

Thank you for the point. I will fix it.

< snip >
> 
> You will also need to call napi_disable() and napi_enable() in the
> set_ringparam implementation.

I will add the code in sh_eth_set_ringparam().

> Ben.
> 

Best regards,
Yoshihiro Shimoda

  reply	other threads:[~2012-05-14  6:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-11  8:38 [PATCH v2 5/5] net: sh_eth: use NAPI Shimoda, Yoshihiro
2012-05-11  8:38 ` Shimoda, Yoshihiro
2012-05-11 15:35 ` Ben Hutchings
2012-05-11 15:35   ` Ben Hutchings
2012-05-14  6:13   ` Shimoda, Yoshihiro [this message]
2012-05-14  6:13     ` Shimoda, Yoshihiro

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=4FB0A2A5.3060001@renesas.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=bhutchings@solarflare.com \
    --cc=linux-sh@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.