]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net-sysfs: expose number of carrier on/off changes
authordavid decotigny <decot@googlers.com>
Sat, 29 Mar 2014 16:48:35 +0000 (09:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Mar 2014 20:24:52 +0000 (16:24 -0400)
commit2d3b479df41a10e2f41f9259fcba775bd34de6e4
tree517291066c35188a41b005e81904e69865643e76
parent9c76a114bbef10b4d44bd258006721dd896695dd
net-sysfs: expose number of carrier on/off changes

This allows to monitor carrier on/off transitions and detect link
flapping issues:
 - new /sys/class/net/X/carrier_changes
 - new rtnetlink IFLA_CARRIER_CHANGES (getlink)

Tested:
  - grep . /sys/class/net/*/carrier_changes
    + ip link set dev X down/up
    + plug/unplug cable
  - updated iproute2: prints IFLA_CARRIER_CHANGES
  - iproute2 20121211-2 (debian): unchanged behavior

Signed-off-by: David Decotigny <decot@googlers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
include/uapi/linux/if_link.h
net/core/net-sysfs.c
net/core/rtnetlink.c
net/sched/sch_generic.c