From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tQ91KlC16+iOxVZEy8exzFaomSm6trhPKyMZYS/SYiU=; b=PP9UpdZvCKxodnhOYk4LuNzIiPq8nQmjYXzFJGBVU8T13xxMaMqw6hOGHhSIaGlu+d OKJFfKtjG/RHYeEBg8xLVQfzwZmArdPUU+M3hqJir1FuFbe3V2qVQgmbqzHcDfadfMow KUG01+d89GZ2W5VcxD6+k6Lq/1vvDvN/AZGNqX4TbFFmX07qDc5SslLMXEDHqgxi44o6 m6ZAKXvUGiFzdux3takZtPZYu34B3qtoNricau8sf9dwS3HjhxFdpDw0LRcZEW23XZhi YE/SeGnjEHYM9SCIBuyueZ2XT1cTAmDwTrqF2Fz5BAvsAhyxQtaByifhP2a8nynKsRid QpOA== References: <20201011151030.05ad88dd@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Heiner Kallweit Message-ID: <1f1dceab-bab0-ff9e-dae6-ed35be504a9c@gmail.com> Date: Mon, 12 Oct 2020 00:29:52 +0200 MIME-Version: 1.0 In-Reply-To: <20201011151030.05ad88dd@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] [PATCH net-next 00/12] net: add and use function dev_fetch_sw_netstats for fetching pcpu_sw_netstats List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jakub Kicinski Cc: Andrew Lunn , Linux USB Mailing List , Steffen Klassert , Florian Fainelli , Herbert Xu , Sergey Matyukevich , linux-rdma@vger.kernel.org, bridge@lists.linux-foundation.org, Pravin B Shelar , Nikolay Aleksandrov , Roopa Prabhu , Alexey Kuznetsov , Vivien Didelot , Igor Mitsyanko , Kalle Valo , Hideaki YOSHIFUJI , "netdev@vger.kernel.org" , Oliver Neukum , linux-wireless , Johannes Berg , Vladimir Oltean , David Miller , =?UTF-8?Q?Bj=c3=b8rn_Mork?= On 12.10.2020 00:10, Jakub Kicinski wrote: > On Sun, 11 Oct 2020 21:34:58 +0200 Heiner Kallweit wrote: >> In several places the same code is used to populate rtnl_link_stats64 >> fields with data from pcpu_sw_netstats. Therefore factor out this code >> to a new function dev_fetch_sw_netstats(). > > FWIW probably fine to convert nfp_repr_get_host_stats64() as well, just > take out the drop counter and make it a separate atomic. If you're up > for that. > Looking at nfp_repr_get_host_stats64() I'm not sure why the authors decided to add a 64bit tx drop counter, struct net_device_stats has an unsigned long tx_dropped counter already. And that the number of dropped tx packets exceeds 32bit (on 32bit systems) seems not very likely.