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.
- [PATCH net-next 12/12] xfrm: use new function dev_fetch_sw... Heiner Kallweit
- [PATCH net-next 05/12] net: usbnet: use new function dev_f... Heiner Kallweit
- [PATCH net-next 02/12] IB/hfi1: use new function dev_fetch... Heiner Kallweit
- [PATCH net-next 09/12] iptunnel: use new function dev_fetc... Heiner Kallweit
- [PATCH net-next 10/12] mac80211: use new function dev_fetc... Heiner Kallweit
- [PATCH net-next 06/12] qtnfmac: use new function dev_fetch... Heiner Kallweit
- [PATCH net-next 03/12] net: macsec: use new function dev_f... Heiner Kallweit
- Re: [PATCH net-next 00/12] net: add and use function dev_f... Jakub Kicinski
- Re: [PATCH net-next 00/12] net: add and use function ... Heiner Kallweit
- Re: [PATCH net-next 00/12] net: add and use funct... Jakub Kicinski