lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 31 Jul 2023 13:47:32 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: "Limonciello, Mario" <mario.limonciello@....com>
Cc: Jakub Kicinski <kuba@...nel.org>, hayeswang@...ltek.com,
 edumazet@...gle.com, LKML <linux-kernel@...r.kernel.org>,
 netdev@...r.kernel.org, davem@...emloft.net, linux-usb@...r.kernel.org,
 pabeni@...hat.com, Paul Menzel <pmenzel@...gen.mpg.de>
Subject: Re: Error 'netif_napi_add_weight() called with weight 256'

On Mon, 31 Jul 2023 13:23:47 -0500
"Limonciello, Mario" <mario.limonciello@....com> 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ