vswitchd: Tweak LACP values.
authorEthan Jackson <ethan@nicira.com>
Sat, 5 Feb 2011 02:16:39 +0000 (18:16 -0800)
committerEthan Jackson <ethan@nicira.com>
Mon, 7 Feb 2011 19:27:51 +0000 (11:27 -0800)
Hardware sets the default LACP partner information to 0 so this
commit follows.  The collector delay is a more interesting
case.  Hardware sets it to 32768 and Linux sets it to 0.  The
collector delay relates to a part of the LACP protocol which we
don't implement so we follow Linux in this case.

lib/packets.c
vswitchd/bridge.c

index c1e1cdb..8791a3c 100644 (file)
@@ -237,7 +237,7 @@ compose_lacp_packet(struct ofpbuf *b, struct lacp_info *actor,
 
     pdu->collector_type = 3;
     pdu->collector_len = 16;
-    pdu->collector_delay = htons(UINT16_MAX);
+    pdu->collector_delay = htons(0);
 }
 
 /* Parses 'b' which represents a packet containing a LACP PDU.  This function
index 123ab2b..0111040 100644 (file)
@@ -4673,8 +4673,7 @@ port_update_vlan_compat(struct port *port)
 static void
 iface_set_lacp_defaulted(struct iface *iface)
 {
-    memset(&iface->lacp_partner, 0xff, sizeof iface->lacp_partner);
-    iface->lacp_partner.state = 0;
+    memset(&iface->lacp_partner, 0, sizeof iface->lacp_partner);
 
     iface->lacp_status = LACP_STATUS_DEFAULTED;
     iface->lacp_tx = 0;