\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
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. */
}
- 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();
}
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);
poll_block();
}
- if (prune_timeout) {
- rtnetlink_link_notifier_unregister(&link_notifier);
- }
+ rtnetlink_link_notifier_unregister(&link_notifier);
ovsdb_idl_destroy(idl);
return 0;
parse_options(int argc, char *argv[])
{
enum {
- OPT_PRUNE_TIMEOUT,
OPT_APPCTL_COMMAND,
VLOG_OPTION_ENUMS,
LEAK_CHECKER_OPTION_ENUMS,
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,
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;
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();