From 8834f25e9983910258cd0cd1e400a14d9a664479 Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Fri, 4 Feb 2011 18:16:39 -0800 Subject: [PATCH] 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. --- 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 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; -- 2.30.2