From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH] net: apm: xgene: force XGene enet driver to re-balance IRQ usage Date: Tue, 18 Sep 2018 19:32:54 -0700 Message-ID: <95391269-73b7-933f-27ee-2c4a17c8c6b1@gmail.com> References: <20180917233533.28626-1-ahs3@redhat.com> <20180917.193531.1424852853827678152.davem@davemloft.net> <4929e93d-508a-4670-9450-66e4fc85be7e@redhat.com> <29258606-8255-847c-b22f-8793999ce6fe@gmail.com> <0e0f3aa6-9b6e-edd5-226f-2e23de9b5a0f@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "isubramanian@apm.com" , "kchudgar@apm.com" , "qnguyen@apm.com" To: Florian Fainelli , ahs3@redhat.com, "Lendacky, Thomas" , David Miller Return-path: Received: from mail-pf1-f194.google.com ([209.85.210.194]:41289 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727027AbeISII3 (ORCPT ); Wed, 19 Sep 2018 04:08:29 -0400 In-Reply-To: <0e0f3aa6-9b6e-edd5-226f-2e23de9b5a0f@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 09/18/2018 05:03 PM, Florian Fainelli wrote: > On 09/18/2018 04:56 PM, Eric Dumazet wrote: >> >> >> On 09/18/2018 04:27 PM, Eric Dumazet wrote: >>> >> >>> I remember one of the napi_complete_done() change had to be reverted, >>> for some obscure reason. >> >> >> >> That was not exactly a revert, : > > This is what I have so far for the drivers that both use > napi_complete_done() without checking the return value and implement a > ndo_poll_controller() callback: > > https://github.com/ffainelli/linux/commits/napi-check In fact, there is still to explain what the bug is. napi_complete_done() return value can be ignored, unless drivers have to disable IRQ in their interrupt handler, using the following construct : if (napi_schedule_prep(napi)) { .... disable interrupt .... __napi_schedule_irqoff(napi); } It _can_ be used by other drivers to not rearm interrupts needlessly. The bug discussed in this thread (re-balance IRQ usage) is of the same kind than the one fixed in commit d7aba644ffdebf756e51e26a2229055211838e89 ("amd-xgbe: Enable IRQs only if napi_complete_done() is true")