From b20a8f7c11fbff647cc65cc3db22a22e5d5cad0b Mon Sep 17 00:00:00 2001
From: Ethan Jackson
Date: Mon, 16 Apr 2012 15:01:09 -0700
Subject: [PATCH] lacp: Remove heartbeat mode.
The LACP heartbeat mode was used to monitor interfaces for
connectivity. It turns out that LACP is inferior to CFM for this
purpose. For the sake of simplicity this patch removes the
feature.
Signed-off-by: Ethan Jackson
---
lib/lacp.c | 17 ++---------------
lib/lacp.h | 1 -
vswitchd/bridge.c | 5 -----
vswitchd/vswitch.xml | 8 --------
4 files changed, 2 insertions(+), 29 deletions(-)
diff --git a/lib/lacp.c b/lib/lacp.c
index 89e70b75..9d6fb9b1 100644
--- a/lib/lacp.c
+++ b/lib/lacp.c
@@ -101,7 +101,6 @@ struct lacp {
bool fast; /* True if using fast probe interval. */
bool negotiated; /* True if LACP negotiations were successful. */
bool update; /* True if lacp_update() needs to be called. */
- bool heartbeat; /* LACP heartbeat mode. */
};
struct slave {
@@ -232,11 +231,9 @@ lacp_configure(struct lacp *lacp, const struct lacp_settings *s)
}
if (!eth_addr_equals(lacp->sys_id, s->id)
- || lacp->sys_priority != s->priority
- || lacp->heartbeat != s->heartbeat) {
+ || lacp->sys_priority != s->priority) {
memcpy(lacp->sys_id, s->id, ETH_ADDR_LEN);
lacp->sys_priority = s->priority;
- lacp->heartbeat = s->heartbeat;
lacp->update = true;
}
@@ -474,13 +471,6 @@ lacp_update_attached(struct lacp *lacp)
struct lacp_info lead_pri;
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 10);
- if (lacp->heartbeat) {
- HMAP_FOR_EACH (slave, node, &lacp->slaves) {
- slave->attached = slave->status != LACP_DEFAULTED;
- }
- return;
- }
-
lacp->update = false;
lead = NULL;
@@ -593,7 +583,7 @@ slave_get_actor(struct slave *slave, struct lacp_info *actor)
state |= LACP_STATE_EXP;
}
- if (lacp->heartbeat || hmap_count(&lacp->slaves) > 1) {
+ if (hmap_count(&lacp->slaves) > 1) {
state |= LACP_STATE_AGG;
}
@@ -747,9 +737,6 @@ lacp_print_details(struct ds *ds, struct lacp *lacp)
ds_put_format(ds, "---- %s ----\n", lacp->name);
ds_put_format(ds, "\tstatus: %s", lacp->active ? "active" : "passive");
- if (lacp->heartbeat) {
- ds_put_cstr(ds, " heartbeat");
- }
if (lacp->negotiated) {
ds_put_cstr(ds, " negotiated");
}
diff --git a/lib/lacp.h b/lib/lacp.h
index d4082984..5e198260 100644
--- a/lib/lacp.h
+++ b/lib/lacp.h
@@ -35,7 +35,6 @@ struct lacp_settings {
uint16_t priority; /* System priority. */
bool active; /* Active or passive mode? */
bool fast; /* Fast or slow probe interval. */
- bool heartbeat; /* Heartbeat mode. */
};
void lacp_init(void);
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index c7349a4d..f4a10e6a 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -2859,11 +2859,6 @@ port_configure_lacp(struct port *port, struct lacp_settings *s)
? priority
: UINT16_MAX - !list_is_short(&port->ifaces));
- s->heartbeat = !strcmp(ovsrec_port_get_other_config_value(port->cfg,
- "lacp-heartbeat",
- "false"),
- "true");
-
lacp_time = ovsrec_port_get_other_config_value(port->cfg, "lacp-time",
"slow");
s->fast = !strcasecmp(lacp_time, "fast");
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 61f472ad..13dd3148 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -905,14 +905,6 @@
rate of once every 30 seconds.
-
-
- Treat LACP like a simple heartbeat protocol for link state
- monitoring. Most features of the LACP protocol are disabled
- when this mode is in use. The default if not specified is
- false
.
-
--
2.30.2