[ovs-dev] [PATCH 2/5] vswitchd: Tweak LACP values.

Ethan Jackson ethan at nicira.com
Sat Feb 5 02:35:47 UTC 2011


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     |    2 +-
 vswitchd/bridge.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/packets.c b/lib/packets.c
index c1e1cdb..8791a3c 100644
--- a/lib/packets.c
+++ b/lib/packets.c
@@ -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
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 123ab2b..0111040 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -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;
-- 
1.7.4





More information about the dev mailing list