2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-19 14:37:21 +00:00

ofproto: Remove controller discovery support.

I've never heard of anyone actually using controller discovery.
It adds a great deal of code to the source tree, and a little
bit of complication to ofproto, so this commit removes it.
This commit is contained in:
Ben Pfaff
2011-03-15 09:46:39 -07:00
parent 9b45d7f5db
commit 195c808624
31 changed files with 40 additions and 3599 deletions

View File

@@ -104,16 +104,6 @@ struct rconn {
time_t creation_time;
unsigned long int total_time_connected;
/* If we can't connect to the peer, it could be for any number of reasons.
* Usually, one would assume it is because the peer is not running or
* because the network is partitioned. But it could also be because the
* network topology has changed, in which case the upper layer will need to
* reassess it (in particular, obtain a new IP address via DHCP and find
* the new location of the controller). We set this flag when we suspect
* that this could be the case. */
bool questionable_connectivity;
time_t last_questioned;
/* Throughout this file, "probe" is shorthand for "inactivity probe".
* When nothing has been received from the peer for a while, we send out
* an echo request as an inactivity probe packet. We should receive back
@@ -149,7 +139,6 @@ static void reconnect(struct rconn *);
static void report_error(struct rconn *, int error);
static void disconnect(struct rconn *, int error);
static void flush_queue(struct rconn *);
static void question_connectivity(struct rconn *);
static void copy_to_monitor(struct rconn *, const struct ofpbuf *);
static bool is_connected_state(enum state);
static bool is_admitted_msg(const struct ofpbuf *);
@@ -204,9 +193,6 @@ rconn_create(int probe_interval, int max_backoff)
rc->creation_time = time_now();
rc->total_time_connected = 0;
rc->questionable_connectivity = false;
rc->last_questioned = time_now();
rconn_set_probe_interval(rc, probe_interval);
rc->n_monitors = 0;
@@ -464,7 +450,6 @@ static void
run_IDLE(struct rconn *rc)
{
if (timed_out(rc)) {
question_connectivity(rc);
VLOG_ERR("%s: no response to inactivity probe after %u "
"seconds, disconnecting",
rc->name, elapsed_in_this_state(rc));
@@ -746,22 +731,6 @@ rconn_get_local_port(const struct rconn *rconn)
return rconn->vconn ? vconn_get_local_port(rconn->vconn) : 0;
}
/* If 'rconn' can't connect to the peer, it could be for any number of reasons.
* Usually, one would assume it is because the peer is not running or because
* the network is partitioned. But it could also be because the network
* topology has changed, in which case the upper layer will need to reassess it
* (in particular, obtain a new IP address via DHCP and find the new location
* of the controller). When this appears that this might be the case, this
* function returns true. It also clears the questionability flag and prevents
* it from being set again for some time. */
bool
rconn_is_connectivity_questionable(struct rconn *rconn)
{
bool questionable = rconn->questionable_connectivity;
rconn->questionable_connectivity = false;
return questionable;
}
/* Returns the total number of packets successfully received by the underlying
* vconn. */
unsigned int
@@ -1012,9 +981,6 @@ disconnect(struct rconn *rc, int error)
}
rc->backoff_deadline = now + rc->backoff;
state_transition(rc, S_BACKOFF);
if (now - rc->last_connected > 60) {
question_connectivity(rc);
}
} else {
rc->last_disconnected = time_now();
rconn_disconnect(rc);
@@ -1080,16 +1046,6 @@ state_transition(struct rconn *rc, enum state state)
rc->state_entered = time_now();
}
static void
question_connectivity(struct rconn *rc)
{
time_t now = time_now();
if (now - rc->last_questioned > 60) {
rc->questionable_connectivity = true;
rc->last_questioned = now;
}
}
static void
copy_to_monitor(struct rconn *rc, const struct ofpbuf *b)
{