netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Jerry.Ray@microchip.com, andrew@lunn.ch, f.fainelli@gmail.com,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v4] dsa: lan9303: Add 3 ethtool stats
Date: Tue, 6 Dec 2022 21:55:16 +0200	[thread overview]
Message-ID: <20221206195516.vv57lab7p4iifar5@skbuf> (raw)
In-Reply-To: <20221202113622.21289116@kernel.org>

On Fri, Dec 02, 2022 at 11:36:22AM -0800, Jakub Kicinski wrote:
> On Fri, 2 Dec 2022 15:22:55 +0000 Jerry.Ray@microchip.com wrote:
> > >Huh? I'm guessing you're referring to some patches you have queued
> > >already and don't want to rebase across? Or some project planning?
> > >Otherwise I don't see a connection :S
> > 
> > In looking around at other implementations, I see where the link_up
> > and link_down are used to start or clean up the periodic workqueue
> > used to retrieve and accumulate the mib stats into the driver.  Can't tell
> > if that's a requirement or only needed when the device interface is
> > considered too slow.  The device interface is not atomic.
> 
> Atomic as in it reads over a bus which requires sleeping?
> Yes, the stats ndo can't sleep because of the old procfs interface
> which ifconfig uses and which is invoked under the RCU lock.

Jerry, did you respond to this (what do you mean by "device interface is
not atomic")?

Still not clear why transitioning to phylink is a requirement for
standardized statistics. You get your link up/link down events with
adjust_link too (phydev->link).

Some other drivers only perform periodic stats readout for ports that
are up, because those are the only ports where the stats can ever
change. That's about all that there is to know. There's no requirement
one way or another, it's an optimization.

  reply	other threads:[~2022-12-06 19:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30 20:08 [PATCH net-next v4] dsa: lan9303: Add 3 ethtool stats Jerry Ray
2022-11-30 20:56 ` Vladimir Oltean
2022-12-01 16:42   ` Jerry.Ray
2022-12-01 16:45     ` Jakub Kicinski
2022-12-02 15:22       ` Jerry.Ray
2022-12-02 19:36         ` Jakub Kicinski
2022-12-06 19:55           ` Vladimir Oltean [this message]
2022-12-06 22:38             ` Jerry.Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221206195516.vv57lab7p4iifar5@skbuf \
    --to=olteanv@gmail.com \
    --cc=Jerry.Ray@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).