Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Mitch Williams and committed by
John W. Linville
4756b02f 6b780567

+23
+23
drivers/net/bonding/bond_main.c
··· 3259 3259 { 3260 3260 struct bonding *bond = seq->private; 3261 3261 struct slave *curr; 3262 + int i; 3263 + u32 target; 3262 3264 3263 3265 read_lock(&bond->curr_slave_lock); 3264 3266 curr = bond->curr_active_slave; ··· 3291 3289 bond->params.updelay * bond->params.miimon); 3292 3290 seq_printf(seq, "Down Delay (ms): %d\n", 3293 3291 bond->params.downdelay * bond->params.miimon); 3292 + 3293 + 3294 + /* ARP information */ 3295 + if(bond->params.arp_interval > 0) { 3296 + int printed=0; 3297 + seq_printf(seq, "ARP Polling Interval (ms): %d\n", 3298 + bond->params.arp_interval); 3299 + 3300 + seq_printf(seq, "ARP IP target/s (n.n.n.n form):"); 3301 + 3302 + for(i = 0; (i < BOND_MAX_ARP_TARGETS) ;i++) { 3303 + if (!bond->params.arp_targets[i]) 3304 + continue; 3305 + if (printed) 3306 + seq_printf(seq, ","); 3307 + target = ntohl(bond->params.arp_targets[i]); 3308 + seq_printf(seq, " %d.%d.%d.%d", HIPQUAD(target)); 3309 + printed = 1; 3310 + } 3311 + seq_printf(seq, "\n"); 3312 + } 3294 3313 3295 3314 if (bond->params.mode == BOND_MODE_8023AD) { 3296 3315 struct ad_info ad_info;