Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4908157rwb; Mon, 31 Jul 2023 14:31:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlErMThrpejx0DGZVeBMyNSuh+SoGkiO5zZ7xozX31hmtF718/xkoli4JD8qXxjGskKfVUB8 X-Received: by 2002:aa7:df02:0:b0:51e:2282:e1fc with SMTP id c2-20020aa7df02000000b0051e2282e1fcmr787682edy.6.1690839101651; Mon, 31 Jul 2023 14:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690839101; cv=none; d=google.com; s=arc-20160816; b=HLM2ACtzfjOnCY9NbjcmOaVRcdujufqJ5wzJ032riX08p0ic1qzBI3u0WTphx1yBHC 98yDmRzoSsRLWhx60qy7+MQWYwABExPu4F/vrif2u94OCK9Gk5O/rtX23d/iw0TewD2x SXNIj570mWogcbFBSKHK8QlzMvfQ5rZSjdKeq0EVZaaqQQkMmBMBeYgDxqKnR2/VOR9/ 3E/k6QmHUOULyiEfts7a6diyWX/K2UyQ5BlUzzM5GumzJiNr7wIqxfpWlAr3SgKsb+G4 rsq8TuvnmrBdNuafqRP5JJdCRtmCT19KwC51q5OVpWY/X63doPnhNxfMnEqHQguN/A16 gWhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=z+N8fz5Ir7ydSzUQZRlDElzwdQfHkofh81oEjm5J2eQ=; fh=P1FmoUCPVvHHcgN64ijzSKElXk8R4Yagrc8+DoXfJzE=; b=wj5wqVmx/ryJ8A6qJcXkmgs+3dFgl9/KA43l76jVqLMnoC1pko/I6opvy5VMDjn+z2 kwM19RmAUEHZl0S9LM+/mub6TnG0+IAFiXdXKZRnt5ODk/Y30x1FCzxqaeAbMynUhQ1T i46NddM1U/p3ejSCWrUnOvwEl3dRaprReWLM0lTmSmkQemdXmjrsolHOMoD3DkLlAg7R HhCZwpSxpzo0Q0SO9l9Am/R7WPajdlkAGxEL0vkzaqkuZx0CENi9vLdC0dwH7biZdJPJ kgKH3QpLU2w2OrPrGPYJw4pGc7kC9iSUNhRy/cUo4ScEKLRb0zN1kSxKl7wuk4c0P6Xv kS/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20221208.gappssmtp.com header.s=20221208 header.b=eflG+62y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020aa7c543000000b00521d2b05963si3141323edr.427.2023.07.31.14.31.17; Mon, 31 Jul 2023 14:31:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20221208.gappssmtp.com header.s=20221208 header.b=eflG+62y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=networkplumber.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230037AbjGaUrh (ORCPT + 99 others); Mon, 31 Jul 2023 16:47:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbjGaUrf (ORCPT ); Mon, 31 Jul 2023 16:47:35 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89B3CE46 for ; Mon, 31 Jul 2023 13:47:34 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-26854159c05so2874513a91.2 for ; Mon, 31 Jul 2023 13:47:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1690836454; x=1691441254; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=z+N8fz5Ir7ydSzUQZRlDElzwdQfHkofh81oEjm5J2eQ=; b=eflG+62yVwUvCdwpQDl6BccROGADuJt2YjF8NQj9CgfFzer7z/3uOiFZiHFxhlFwTs 5N+fqNBM0JwUtAE+5Wi2QCfPPB/UM4L7gLp5syjJJK/toNxbprpyLI3SDzQlL6YM+vQd sfTTk18ak40xu2zLy2GmXOU7Q8wzI7t+iEgfWQiDLnVzqq8Gx8RT8fVEZaB0OCyE6+jk g44tk6EDu8hoMnGVT3WP+ZnNhErLqfGf2/iTy7q9hgkuJxOczeMsj793uL5dI+aLnJxh 7gs2LY7GebrMyt0xDHFOcRDekvNWEOPJuqEyaw08sqDFAtZhFsDvHFaJl9WUTd1GdNiF 1KOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690836454; x=1691441254; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z+N8fz5Ir7ydSzUQZRlDElzwdQfHkofh81oEjm5J2eQ=; b=i1M/T2RIMf0bmvUG30lJlAFJcL5RLhRzW3L3UqUfIwxk25JLcKyx+frq7hAMXykjEf sMWR5H8I6XSW3vPzQVMM1/iTs5Qe9TNIKT8/KfZuuOPOVe7VRuOAnwKY7WcxOUac9T83 hBuU97KmbuJM+LIEzenVxjOtOeavSg79mt61P85qIo9If+skG2Kb5fIes6jO/IHCiJKy AFxgSHFC6HdOPFPCCa+g4dJsw6EK5kQS1VKXaHDB+K1icEspgdqpqf7B6dC/TYpPc9Tr +rS015mI7b0jJpSGfZErHPEpcJM8aHauAVUoGasmKRKKaZ9oPwon8zla7uwJztCcPn9z GdcQ== X-Gm-Message-State: ABy/qLaYpvr7YCaC1VrqaV8J7kkvwL7+fy2OW58Q1DsjvbYP/to8YznB lCHbpLaBM+SLz4nbm33+XV0P1A== X-Received: by 2002:a17:90a:4508:b0:262:df1d:8e16 with SMTP id u8-20020a17090a450800b00262df1d8e16mr9880052pjg.33.1690836454026; Mon, 31 Jul 2023 13:47:34 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id fz3-20020a17090b024300b00263cca08d95sm8181258pjb.55.2023.07.31.13.47.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 13:47:33 -0700 (PDT) Date: Mon, 31 Jul 2023 13:47:32 -0700 From: Stephen Hemminger To: "Limonciello, Mario" Cc: Jakub Kicinski , hayeswang@realtek.com, edumazet@google.com, LKML , netdev@vger.kernel.org, davem@davemloft.net, linux-usb@vger.kernel.org, pabeni@redhat.com, Paul Menzel Subject: Re: Error 'netif_napi_add_weight() called with weight 256' Message-ID: <20230731134732.597cb2c0@hermes.local> In-Reply-To: <673bc252-2b34-6ef9-1765-9c7cac1e8658@amd.com> References: <0bfd445a-81f7-f702-08b0-bd5a72095e49@amd.com> <20230731111330.5211e637@kernel.org> <673bc252-2b34-6ef9-1765-9c7cac1e8658@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 31 Jul 2023 13:23:47 -0500 "Limonciello, Mario" wrote: > On 7/31/2023 1:13 PM, Jakub Kicinski wrote: > > On Mon, 31 Jul 2023 11:02:40 -0500 Limonciello, Mario wrote: > >> Hi, > >> > >> I noticed today with 6.5-rc4 and also on 6.1.42 that I'm getting an > >> error from an r8152 based dongle (Framework ethernet expansion card). > >> > >> netif_napi_add_weight() called with weight 256 > >> > >> It seems that this message is likely introduced by > >> 8ded532cd1cbe ("r8152: switch to netif_napi_add_weight()") > >> > >> which if the card has support_2500full set will program the value to 256: > >> > >> netif_napi_add_weight(netdev, &tp->napi, r8152_poll, > >> tp->support_2500full ? 256 : 64); > >> > >> It's err level from > >> 82dc3c63c692b ("net: introduce NAPI_POLL_WEIGHT") > >> > >> Why is this considered an error but the driver uses the bigger value? > >> Should it be downgraded to a warning? > > > > Could you double check that the warning wasn't there before? The code > > added by commit 195aae321c82 ("r8152: support new chips") in 5.13 looks > > very much equivalent. > > Yeah; looking through the history I agree it was probably was there from > the beginning of being introduced. > > 6.1 is the earliest kernel that is usable with this laptop (for other > reasons). > > > The custom weight is probably due to a misunderstanding. We have 200G > > adapters using the standard weight of 64, IDK why 2.5G adapter would > > need anything special. > > Perhaps Hayes Wang can comment on this (as the author of 195aae321c82). > Large NAPI weights mean that one busy device (DOS attack) can starve the system. Really doubt that > 64 makes any visible difference in throughput.