netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Andrei Vagin <avagin@virtuozzo.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	netdev@vger.kernel.org, edumazet@google.com, cphealy@gmail.com,
	David Decotigny <decot@googlers.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
	Alexei Starovoitov <ast@fb.com>,
	Roopa Prabhu <roopa@cumulusnetworks.com>,
	Mahesh Bandewar <maheshb@google.com>,
	Vlad Yasevich <vyasevich@gmail.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	Jonas Bonn <jonas@southpole.se>,
	stephen hemminger <stephen@networkplumber.org>,
	Hans Liljestrand <ishkamiel@gmail.com>,
	"Reshetova, Elena" <elena.reshetova@intel.com>,
	Kiril
Subject: Re: [PATCH net-next] net: core: Expose number of link up/down transitions
Date: Thu, 18 Jan 2018 01:06:52 +0100	[thread overview]
Message-ID: <20180118000652.GD32299@lunn.ch> (raw)
In-Reply-To: <20180117234941.GA19561@outlook.office365.com>

> What is the idea to have two separate counters? Can a delta between them
> be a bigger than 1?

Yes, it can.

These counters are incremented in netif_carrier_on() /
netif_carrier_off(). They are not always called in pairs and they can
be called multiple times for the same event. The phylib will call them
when it notices the PHY saying the link is down/up, and the MAC driver
sometimes also calls them.

	  Andrew

  reply	other threads:[~2018-01-18  0:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 23:06 [PATCH net-next] net: core: Expose number of link up/down transitions Florian Fainelli
2018-01-17 23:17 ` Jakub Kicinski
2018-01-17 23:49 ` Andrei Vagin
2018-01-18  0:06   ` Andrew Lunn [this message]
2018-01-18  0:23     ` Andrei Vagin
2018-01-17 23:52 ` Jiri Pirko
2018-01-18  0:17   ` David Ahern
2018-01-18  0:28 ` David Ahern

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=20180118000652.GD32299@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ast@fb.com \
    --cc=avagin@virtuozzo.com \
    --cc=cphealy@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=decot@googlers.com \
    --cc=edumazet@google.com \
    --cc=elena.reshetova@intel.com \
    --cc=f.fainelli@gmail.com \
    --cc=ishkamiel@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=jonas@southpole.se \
    --cc=maheshb@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=stephen@networkplumber.org \
    --cc=vyasevich@gmail.com \
    --cc=xiyou.wangcong@gmail.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).