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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28962C3E8C5 for ; Sat, 28 Nov 2020 00:24:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E347E2223F for ; Sat, 28 Nov 2020 00:24:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729274AbgK1ATF (ORCPT ); Fri, 27 Nov 2020 19:19:05 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:53688 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731627AbgK0XcU (ORCPT ); Fri, 27 Nov 2020 18:32:20 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kinCS-009BxG-UE; Sat, 28 Nov 2020 00:30:48 +0100 Date: Sat, 28 Nov 2020 00:30:48 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: George McCollister , Vladimir Oltean , Vivien Didelot , Florian Fainelli , "David S . Miller" , netdev@vger.kernel.org, "open list:OPEN FIRMWARE AND..." Subject: Re: [PATCH net-next v2 2/3] net: dsa: add Arrow SpeedChips XRS700x driver Message-ID: <20201127233048.GB2073444@lunn.ch> References: <20201126132418.zigx6c2iuc4kmlvy@skbuf> <20201126175607.bqmpwbdqbsahtjn2@skbuf> <20201126220500.av3clcxbbvogvde5@skbuf> <20201127103503.5cda7f24@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> <20201127195057.ac56bimc6z3kpygs@skbuf> <20201127133753.4cf108cb@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201127133753.4cf108cb@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org > If there is a better alternative I'm all ears but having /proc and > ifconfig return zeros for error counts while ip link doesn't will lead > to too much confusion IMO. While delayed update of stats is a fact of > life for _years_ now (hence it was backed into the ethtool -C API). How about dev_seq_start() issues a netdev notifier chain event, asking devices which care to update their cached rtnl_link_stats64 counters. They can decide if their cache is too old, and do a blocking read for new values. Once the notifier has completed, dev_seq_start() can then rcu_read_lock() and do the actual collection of stats from the drivers non-blocking. Andrew