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>
This commit is contained in:

committed by
David S. Miller

orang tua
fd27e0d44a
melakukan
07699f9a7c
@@ -159,18 +159,6 @@ static void bond_info_show_master(struct seq_file *seq)
|
||||
}
|
||||
}
|
||||
|
||||
static const char *bond_slave_link_status(s8 link)
|
||||
{
|
||||
static const char * const status[] = {
|
||||
[BOND_LINK_UP] = "up",
|
||||
[BOND_LINK_FAIL] = "going down",
|
||||
[BOND_LINK_DOWN] = "down",
|
||||
[BOND_LINK_BACK] = "going back",
|
||||
};
|
||||
|
||||
return status[link];
|
||||
}
|
||||
|
||||
static void bond_info_show_slave(struct seq_file *seq,
|
||||
const struct slave *slave)
|
||||
{
|
||||
|
Reference in New Issue
Block a user