[ovs-dev] [brcompatd 6/8] ovs-brcompatd: Remove --prune-timeout option.
Ben Pfaff
blp at nicira.com
Mon Jun 6 19:41:47 UTC 2011
---
vswitchd/ovs-brcompatd.8.in | 7 -------
vswitchd/ovs-brcompatd.c | 35 ++---------------------------------
2 files changed, 2 insertions(+), 40 deletions(-)
diff --git a/vswitchd/ovs-brcompatd.8.in b/vswitchd/ovs-brcompatd.8.in
index 2ce164c..692ac67 100644
--- a/vswitchd/ovs-brcompatd.8.in
+++ b/vswitchd/ovs-brcompatd.8.in
@@ -39,13 +39,6 @@ can be listed by passing \fBhelp\fR to \fBovs\-appctl\fR with
\fIcommand\fR must not redirect \fBovs\-appctl\fR's standard output or
standard error streams, because \fBovs\-brcompatd\fR expects to read
both of these streams separately.
-.TP
-\fB\-\-prune\-timeout=\fIsecs\fR
-.
-Sets the maximum time between pruning port entries to \fIsecs\fR seconds.
-Pruning ports is the process of removing port entries from \fIdatabase\fR
-that no longer exist. If \fIsecs\fR is zero, then entries are never
-pruned. The default prune timeout is 5 seconds.
.
.so lib/daemon.man
.so lib/vlog.man
diff --git a/vswitchd/ovs-brcompatd.c b/vswitchd/ovs-brcompatd.c
index cea7fda..52cd93f 100644
--- a/vswitchd/ovs-brcompatd.c
+++ b/vswitchd/ovs-brcompatd.c
@@ -78,10 +78,6 @@ static void usage(void) NO_RETURN;
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 60);
-/* Maximum number of milliseconds to wait before pruning port entries that
- * no longer exist. If set to zero, ports are never pruned. */
-static int prune_timeout = 5000;
-
/* Shell command to execute (via popen()) to send a control command to the
* running ovs-vswitchd process. The string must contain one instance of %s,
* which is replaced by the control command. */
@@ -1274,10 +1270,7 @@ main(int argc, char *argv[])
}
- if (prune_timeout) {
- rtnetlink_link_notifier_register(&link_notifier,
- netdev_changed_cb, NULL);
- }
+ rtnetlink_link_notifier_register(&link_notifier, netdev_changed_cb, NULL);
daemonize_complete();
@@ -1300,21 +1293,6 @@ main(int argc, char *argv[])
}
netdev_run();
- /* If 'prune_timeout' is non-zero, we actively prune from the
- * configuration of port entries that are no longer valid. We
- * use two methods:
- *
- * 1) The kernel explicitly notifies us of removed ports
- * through the RTNL messages.
- *
- * 2) We periodically check all ports associated with bridges
- * to see if they no longer exist.
- */
- if (ovs && prune_timeout) {
- rtnetlink_link_notifier_run();
- poll_timer_wait(prune_timeout);
- }
-
nl_sock_wait(brc_sock, POLLIN);
ovsdb_idl_wait(idl);
unixctl_server_wait(unixctl);
@@ -1323,9 +1301,7 @@ main(int argc, char *argv[])
poll_block();
}
- if (prune_timeout) {
- rtnetlink_link_notifier_unregister(&link_notifier);
- }
+ rtnetlink_link_notifier_unregister(&link_notifier);
ovsdb_idl_destroy(idl);
return 0;
@@ -1356,7 +1332,6 @@ static const char *
parse_options(int argc, char *argv[])
{
enum {
- OPT_PRUNE_TIMEOUT,
OPT_APPCTL_COMMAND,
VLOG_OPTION_ENUMS,
LEAK_CHECKER_OPTION_ENUMS,
@@ -1365,7 +1340,6 @@ parse_options(int argc, char *argv[])
static struct option long_options[] = {
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'V'},
- {"prune-timeout", required_argument, NULL, OPT_PRUNE_TIMEOUT},
{"appctl-command", required_argument, NULL, OPT_APPCTL_COMMAND},
DAEMON_LONG_OPTIONS,
VLOG_LONG_OPTIONS,
@@ -1392,10 +1366,6 @@ parse_options(int argc, char *argv[])
OVS_PRINT_VERSION(0, 0);
exit(EXIT_SUCCESS);
- case OPT_PRUNE_TIMEOUT:
- prune_timeout = atoi(optarg) * 1000;
- break;
-
case OPT_APPCTL_COMMAND:
appctl_command = optarg;
break;
@@ -1435,7 +1405,6 @@ usage(void)
program_name, program_name);
printf("\nConfiguration options:\n"
" --appctl-command=COMMAND shell command to run ovs-appctl\n"
- " --prune-timeout=SECS wait at most SECS before pruning ports\n"
);
daemon_usage();
vlog_usage();
--
1.7.4.4
More information about the dev
mailing list