From: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>
To: David Miller <davem@davemloft.net>, "ahs3@redhat.com" <ahs3@redhat.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"isubramanian@apm.com" <isubramanian@apm.com>,
"kchudgar@apm.com" <kchudgar@apm.com>,
"qnguyen@apm.com" <qnguyen@apm.com>
Subject: Re: [PATCH] net: apm: xgene: force XGene enet driver to re-balance IRQ usage
Date: Tue, 18 Sep 2018 23:09:57 +0000 [thread overview]
Message-ID: <a5adee73-dde7-d00f-e7ef-1f81dc7c813a@amd.com> (raw)
In-Reply-To: <20180917.193531.1424852853827678152.davem@davemloft.net>
On 09/17/2018 09:35 PM, David Miller wrote:
> From: Al Stone <ahs3@redhat.com>
> Date: Mon, 17 Sep 2018 17:35:33 -0600
>
>> @@ -866,8 +866,11 @@ static int xgene_enet_napi(struct napi_struct *napi, const int budget)
>> processed = xgene_enet_process_ring(ring, budget);
>>
>> if (processed != budget) {
>> + struct irq_desc *desc = irq_to_desc(ring->irq);
>> +
>> napi_complete_done(napi, processed);
The problem could be that the driver isn't checking the
napi_complete_done() return code. It was changed to return a bool and
the check should be more like:
if ((processed != budget) && napi_complete_done(napi, processed)) {
If it returns false, then the driver will get called for polling again
after having issued enable_irq() and it well then issue the enable_irq()
a second (or more) time without having the matching diable_irq().
Thanks,
Tom
>> - enable_irq(ring->irq);
>> + if (desc && desc->depth > 0)
>> + enable_irq(ring->irq);
>
> I really can't accept a patch that grovels into IRQ layer internals
> to work around a driver's IRQ enable/disable usage problem.
>
> Sorry.
>
next prev parent reply other threads:[~2018-09-18 23:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-17 23:35 [PATCH] net: apm: xgene: force XGene enet driver to re-balance IRQ usage Al Stone
2018-09-18 2:35 ` David Miller
2018-09-18 20:21 ` Al Stone
2018-09-18 23:09 ` Lendacky, Thomas [this message]
2018-09-18 23:15 ` Al Stone
2018-09-18 23:21 ` Florian Fainelli
2018-09-18 23:27 ` Eric Dumazet
2018-09-18 23:56 ` Eric Dumazet
2018-09-19 0:03 ` Florian Fainelli
2018-09-19 2:32 ` Eric Dumazet
2018-09-18 23:25 ` Eric Dumazet
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=a5adee73-dde7-d00f-e7ef-1f81dc7c813a@amd.com \
--to=thomas.lendacky@amd.com \
--cc=ahs3@redhat.com \
--cc=davem@davemloft.net \
--cc=isubramanian@apm.com \
--cc=kchudgar@apm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=qnguyen@apm.com \
/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).