Skip to contentSkip to conversation

bonding: ARP monitoring broken on x86_64

PATCH In review Andy Gospodarek 2 participants 2 messages Jan 26, 2007

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

PATCH 1/1 bonding: ARP monitoring broken on x86_64

While working with the latest bonding code I noticed a nasty problem that will prevent arp monitoring from always functioning correctly on x86_64 systems. Comparing ints to longs and expecting reliable results on x86_64 is a bad idea. With this patch, arp monitoring works correctly again.

This also needs to make its way into the 2.6.19 stable series.

---

 bonding.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/bonding/bonding.h +3 -3
index dc434fb..cae0e59 100644
@@ -151,8 +151,8 @@ struct slave {
 	struct slave *next;
 	struct slave *prev;
 	int    delay;
-	u32    jiffies;
-	u32    last_arp_rx;
+	unsigned long jiffies;
+	unsigned long last_arp_rx;
 	s8     link;    /* one of BOND_LINK_XXXX */
 	s8     state;   /* one of BOND_STATE_XXXX */
 	u32    original_flags;
@@ -242,7 +242,7 @@ extern inline int slave_do_arp_validate(struct bonding *bond, struct slave *slav
 	return bond->params.arp_validate & (1 << slave->state);
 }
 
-extern inline u32 slave_last_rx(struct bonding *bond, struct slave *slave)
+extern inline unsigned long slave_last_rx(struct bonding *bond, struct slave *slave)
 {
 	if (slave_do_arp_validate(bond, slave))
 		return slave->last_arp_rx;
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Andy Gospodarek

While working with the latest bonding code I noticed a nasty problem that will prevent arp monitoring from always functioning correctly on x86_64 systems. Comparing ints to longs and expecting reliable results on x86_64 is a bad idea. With this patch, arp monitoring works correctly again.

This also needs to make its way into the 2.6.19 stable series.

	-J

---
-Jay Vosburgh, IBM Linux Technology Center, [email protected]