Skip to content

Commit 4756b02

Browse files
mawilli1linvjw
authored andcommitted
[PATCH] bonding: add ARP entries to /proc
Make the /proc files show which ARP targets are in use by each bond. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Acked-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 6b78056 commit 4756b02

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3259,6 +3259,8 @@ static void bond_info_show_master(struct seq_file *seq)
32593259
{
32603260
struct bonding *bond = seq->private;
32613261
struct slave *curr;
3262+
int i;
3263+
u32 target;
32623264

32633265
read_lock(&bond->curr_slave_lock);
32643266
curr = bond->curr_active_slave;
@@ -3290,6 +3292,27 @@ static void bond_info_show_master(struct seq_file *seq)
32903292
seq_printf(seq, "Down Delay (ms): %d\n",
32913293
bond->params.downdelay * bond->params.miimon);
32923294

3295+
3296+
/* ARP information */
3297+
if(bond->params.arp_interval > 0) {
3298+
int printed=0;
3299+
seq_printf(seq, "ARP Polling Interval (ms): %d\n",
3300+
bond->params.arp_interval);
3301+
3302+
seq_printf(seq, "ARP IP target/s (n.n.n.n form):");
3303+
3304+
for(i = 0; (i < BOND_MAX_ARP_TARGETS) ;i++) {
3305+
if (!bond->params.arp_targets[i])
3306+
continue;
3307+
if (printed)
3308+
seq_printf(seq, ",");
3309+
target = ntohl(bond->params.arp_targets[i]);
3310+
seq_printf(seq, " %d.%d.%d.%d", HIPQUAD(target));
3311+
printed = 1;
3312+
}
3313+
seq_printf(seq, "\n");
3314+
}
3315+
32933316
if (bond->params.mode == BOND_MODE_8023AD) {
32943317
struct ad_info ad_info;
32953318

0 commit comments

Comments
 (0)