All of lore.kernel.org
 help / color / mirror / Atom feed
* Extend procfs status for bonded links to show "backup" and "inactive" flags
@ 2012-07-21 15:17 Jeroen van Bemmel
  0 siblings, 0 replies; only message in thread
From: Jeroen van Bemmel @ 2012-07-21 15:17 UTC (permalink / raw)
  To: linux-kernel

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:

diff --git a/drivers/net/bonding/bond_procfs.c 
b/drivers/net/bonding/bond_procfs.c
index 3cea38d..48ac2a4 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-21 16:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-21 15:17 Extend procfs status for bonded links to show "backup" and "inactive" flags Jeroen van Bemmel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.