Messages in this thread | | | Date | Thu, 18 Jan 2018 01:06:52 +0100 | From | Andrew Lunn <> | Subject | Re: [PATCH net-next] net: core: Expose number of link up/down transitions |
| |
> 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
| |