From: Jeroen van Bemmel <jbemmel@zonnet.nl>
To: linux-kernel@vger.kernel.org
Subject: Extend procfs status for bonded links to show "backup" and "inactive" flags
Date: Sat, 21 Jul 2012 09:17:57 -0600 [thread overview]
Message-ID: <500AC825.9070905@zonnet.nl> (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:
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
reply other threads:[~2012-07-21 16:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=500AC825.9070905@zonnet.nl \
--to=jbemmel@zonnet.nl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.