]> git.karo-electronics.de Git - linux-beck.git/commit
bonding: add sysfs /slave dir for bond slave devices.
authorsfeldma@cumulusnetworks.com <sfeldma@cumulusnetworks.com>
Fri, 17 Jan 2014 06:57:49 +0000 (22:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Jan 2014 02:51:58 +0000 (18:51 -0800)
commit07699f9a7c8d1002e07011d5aa382cd63241eea8
tree3fb131944eee1d84e4bb41fa9a6b9c2cf098e5a4
parentfd27e0d44a893b45832df3cb8e021bd1d773a73f
bonding: add sysfs /slave dir for bond slave devices.

Add sub-directory under /sys/class/net/<interface>/slave with
read-only attributes for slave.  Directory only appears when
<interface> is a slave.

$ tree /sys/class/net/eth2/slave/
/sys/class/net/eth2/slave/
├── ad_aggregator_id
├── link_failure_count
├── mii_status
├── perm_hwaddr
├── queue_id
└── state

$ cat /sys/class/net/eth2/slave/*
2
0
up
40:02:10:ef:06:01
0
active

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/Makefile
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_procfs.c
drivers/net/bonding/bond_sysfs_slave.c [new file with mode: 0644]
drivers/net/bonding/bonding.h