From: Ethan Jackson Date: Sat, 5 Feb 2011 02:16:39 +0000 (-0800) Subject: vswitchd: Tweak LACP values. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8834f25e9983910258cd0cd1e400a14d9a664479;p=openvswitch vswitchd: Tweak LACP values. 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. --- diff --git a/lib/packets.c b/lib/packets.c index c1e1cdbb..8791a3ce 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 123ab2b8..01110408 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;