From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCH net] r8169: fix NAPI handling under high load Date: Tue, 16 Oct 2018 17:21:45 -0700 Message-ID: <225290e4-02be-483b-855f-5215424286b0@gmail.com> References: <8f84fe39-3d8d-396d-3b97-027e0a83f8cb@gmail.com> <20181016160355.1cc0a2e9@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Heiner Kallweit , David Miller , Realtek linux nic maintainers , "netdev@vger.kernel.org" To: Stephen Hemminger , =?UTF-8?Q?Holger_Hoffst=c3=a4tte?= Return-path: Received: from mail-pl1-f193.google.com ([209.85.214.193]:33143 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727290AbeJQIOq (ORCPT ); Wed, 17 Oct 2018 04:14:46 -0400 Received: by mail-pl1-f193.google.com with SMTP id s4-v6so11797770plp.0 for ; Tue, 16 Oct 2018 17:21:47 -0700 (PDT) In-Reply-To: <20181016160355.1cc0a2e9@xeon-e3> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/16/2018 04:03 PM, Stephen Hemminger wrote: > Many drivers have buggy usage of napi_complete_done. > > Might even be worth forcing all network drivers to check the return > value. But fixing 150 broken drivers will be a nuisance. > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index dc1d9ed33b31..c38bc66ffe74 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -466,7 +466,8 @@ static inline bool napi_reschedule(struct napi_struct *napi) > return false; > } > > -bool napi_complete_done(struct napi_struct *n, int work_done); > +bool __must_check napi_complete_done(struct napi_struct *n, int work_done); > + > /** > * napi_complete - NAPI processing complete > * @n: NAPI context > I disagree completely. This never has been a requirement.