device: always expose device statistics information

System Internals / NetworkManager - Thomas Haller [redhat.com] - 17 August 2016 09:08 UTC

Instead of updating the device-statistic counters only periodically as we refresh the link, update them on every link-changed event from platform.

That means, also for devices that have RefreshRateMs at zero, the values will be updated at random times when the link information changes. The difference is, that previously the counters would be zero unless RefreshRateMs was set. Now, they have some (probably stale) values which however are not guaranteed to be kept up-to-date.

Also, now we refresh more often then promised by RefreshRateMs. But the API technically doesn't specify that, so if we find there is a problem with this, we may revert it later.

fbbebc2 device: always expose device statistics information
introspection/nm-device-statistics.xml | 8 ++---
src/devices/nm-device.c | 55 ++++++++++++++++----------------
2 files changed, 31 insertions(+), 32 deletions(-)

Upstream: cgit.freedesktop.org


  • Share