From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF877CD5BA7 for ; Tue, 19 Sep 2023 12:27:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231929AbjISM1e convert rfc822-to-8bit (ORCPT ); Tue, 19 Sep 2023 08:27:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231583AbjISM1c (ORCPT ); Tue, 19 Sep 2023 08:27:32 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0DEBF9; Tue, 19 Sep 2023 05:27:22 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 38JCQbptE3560705, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.92/5.92) with ESMTPS id 38JCQbptE3560705 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Sep 2023 20:26:38 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Tue, 19 Sep 2023 20:26:38 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG02.realtek.com.tw (172.21.6.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Tue, 19 Sep 2023 20:26:32 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::7445:d92b:d0b3:f79c]) by RTEXMBS04.realtek.com.tw ([fe80::7445:d92b:d0b3:f79c%5]) with mapi id 15.01.2375.007; Tue, 19 Sep 2023 20:26:31 +0800 From: Hayes Wang To: Andrew Lunn CC: "kuba@kernel.org" , "davem@davemloft.net" , "netdev@vger.kernel.org" , nic_swsd , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , "edumazet@google.com" , "bjorn@mork.no" , "pabeni@redhat.com" Subject: RE: [PATCH net-next v2 1/2] r8152: remove queuing rx packets in driver Thread-Topic: [PATCH net-next v2 1/2] r8152: remove queuing rx packets in driver Thread-Index: AQHZ6qdYyQovugIsME21Grz+cVcRerAhiHwAgACHqzA= Date: Tue, 19 Sep 2023 12:26:31 +0000 Message-ID: <1a57cf3f867d4dfd991ef1d4024c931b@realtek.com> References: <20230919031351.7334-429-nic_swsd@realtek.com> <20230919031351.7334-430-nic_swsd@realtek.com> <369f3139-4e63-4327-8745-2d72d7dfea8f@lunn.ch> In-Reply-To: <369f3139-4e63-4327-8745-2d72d7dfea8f@lunn.ch> Accept-Language: zh-TW, en-US Content-Language: zh-TW x-originating-ip: [172.22.228.6] x-kse-serverinfo: RTEXDAG02.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew Lunn > Sent: Tuesday, September 19, 2023 8:08 PM [...] > > - return work_done; > > + if (work_done > budget) > > + return budget; > > + else > > + return work_done; > > } > > I don't know NAPI too well. Are there implications of not telling it > the truth? You could check the reply from Jakub Kicinski, as following link. https://www.spinics.net/lists/netdev/msg933846.html https://www.spinics.net/lists/netdev/msg933923.html If the work_done is more than budget, I should return budget. Best Regards, Hayes