From: David Miller <davem@davemloft.net>
To: bhutchings@solarflare.com
Cc: antonz@parallels.com, netdev@vger.kernel.org, jcliburn@gmail.com,
csnook@redhat.com, khorenko@parallels.com
Subject: Re: [PATCH 2/9] atl1: make driver napi compatible
Date: Fri, 13 Apr 2012 15:22:14 -0400 (EDT) [thread overview]
Message-ID: <20120413.152214.1993707733249175187.davem@davemloft.net> (raw)
In-Reply-To: <1334337315.2606.7.camel@bwh-desktop.uk.solarflarecom.com>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 13 Apr 2012 18:15:15 +0100
> On Fri, 2012-04-13 at 20:09 +0400, Tony Zelenoff wrote:
>> This is first step, here there is no fine interrupt
>> disabling which cause TX/ERR interrupts stalling when
>> RX scheduled ints processed.
>>
>> Signed-off-by: Tony Zelenoff <antonz@parallels.com>
>> ---
>> drivers/net/ethernet/atheros/atlx/atl1.c | 46 ++++++++++++++++++++++++++----
>> drivers/net/ethernet/atheros/atlx/atl1.h | 1 +
>> 2 files changed, 41 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
>> index 6438239..d39c1b9 100644
>> --- a/drivers/net/ethernet/atheros/atlx/atl1.c
>> +++ b/drivers/net/ethernet/atheros/atlx/atl1.c
>> @@ -1917,7 +1917,7 @@ next:
>> return num_alloc;
>> }
>>
>> -static void atl1_intr_rx(struct atl1_adapter *adapter)
>> +static int atl1_intr_rx(struct atl1_adapter *adapter, int budget)
>> {
>> int i, count;
>> u16 length;
>> @@ -1933,7 +1933,7 @@ static void atl1_intr_rx(struct atl1_adapter *adapter)
>>
>> rrd_next_to_clean = atomic_read(&rrd_ring->next_to_clean);
>>
>> - while (1) {
>> + while (count <= budget) {
> [...]
>
> Off by one; the test should be count < budget. Otherwise you can exit
> with count == budget + 1 and net_rx_action() will WARN you about that.
Right, this needs to be fixed up.
next prev parent reply other threads:[~2012-04-13 19:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 16:09 [PATCH 0/9] atl1: add napi to Atheros L1 NIC Tony Zelenoff
2012-04-13 16:09 ` [PATCH 1/9] atl1: handle rx in separate condition Tony Zelenoff
2012-04-13 16:09 ` [PATCH 2/9] atl1: make driver napi compatible Tony Zelenoff
2012-04-13 17:15 ` Ben Hutchings
2012-04-13 19:22 ` David Miller [this message]
2012-04-13 16:09 ` [PATCH 3/9] atl1: add napi process of tx interrupts Tony Zelenoff
2012-04-13 16:09 ` [PATCH 4/9] atl1: use defined functions to disable irq Tony Zelenoff
2012-04-13 16:09 ` [PATCH 5/9] atl1: make function to set imr of card Tony Zelenoff
2012-04-13 16:09 ` [PATCH 6/9] atl1: add value to check ability of reenabling IRQs Tony Zelenoff
2012-04-13 16:09 ` [PATCH 7/9] atl1: enable errors and link ints when rx/tx scheduled Tony Zelenoff
2012-04-13 16:09 ` [PATCH 8/9] atl1: do not process interrupts in cycle in handler Tony Zelenoff
2012-04-13 16:09 ` [PATCH 9/9] atl1: do not drop rx/tx interrupts before they are scheduled Tony Zelenoff
2012-04-15 17:03 ` [PATCH 0/9] atl1: add napi to Atheros L1 NIC David Miller
2012-04-15 17:28 ` David Miller
2012-04-16 7:22 ` Tony Zelenoff
2012-04-16 18:20 ` David Miller
2012-04-16 20:51 ` Chris Snook
2012-04-17 8:42 ` Tony Zelenoff
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=20120413.152214.1993707733249175187.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=antonz@parallels.com \
--cc=bhutchings@solarflare.com \
--cc=csnook@redhat.com \
--cc=jcliburn@gmail.com \
--cc=khorenko@parallels.com \
--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).