Skip to contentSkip to conversation

Extend procfs status for bonded links to show "backup" and "inactive" flags

PATCH Jeroen van Bemmel 1 participant 1 message Jul 21, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

bond_info_show_slave in /drivers/net/bonding/bond_procfs.c currently does not show all the information that is relevant to determine whether a given slave is used for network traffic or not. In certain active-backup setups, this means one can not easily tell what's happening.

An example patch to fix this:

drivers/net/bonding/bond_procfs.c +0 -0
index 3cea38d..48ac2a4 100644
@@ -169,6 +169,8 @@ static void bond_info_show_slave(struct seq_file *seq,
 
        seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name);
        seq_printf(seq, "MII Status: %s\n", 

bond_slave_link_status(slave->link));
+ seq_printf(seq, "Bond Status: backup=%d inactive=%d\n",

+               slave->backup, slave->inactive );
        if (slave->speed == SPEED_UNKNOWN)
                seq_printf(seq, "Speed: %s\n", "Unknown");
        else

Thanks,
Jeroen van Bemmel