From: Ben Pfaff Date: Fri, 6 Aug 2010 23:49:14 +0000 (-0700) Subject: ovs-openflowd: Fix support for multiple controllers. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67f6bdd73b612eae4f193164ccf3c144214e9f16;p=openvswitch ovs-openflowd: Fix support for multiple controllers. The multiple controller support here has apparently never been tested. I still haven't tested it, but I fixed a few obvious problems in the source code and in the manpage. --- diff --git a/utilities/ovs-openflowd.8.in b/utilities/ovs-openflowd.8.in index 47af8725..689ff5c7 100644 --- a/utilities/ovs-openflowd.8.in +++ b/utilities/ovs-openflowd.8.in @@ -19,12 +19,21 @@ to relay. It takes one of the following forms: .so lib/dpif.man . .PP -The optional \fIcontroller\fR arguments specify how to connect to -the OpenFlow controller. It takes one of the following forms: +The optional \fIcontroller\fR arguments specify how to connect to the +OpenFlow controller or controllers. Each takes one of the following +forms: . .so lib/vconn-active.man . .PP +When multiple controllers are configured, \fBovs\-openflowd\fR +connects to all of them simultaneously. OpenFlow 1.0 does not specify +how multiple controllers coordinate in interacting with a single +switch, so more than one controller should be specified only if the +controllers are themselves designed to coordinate with each other. +(The Nicira-defined \fBNXT_ROLE\fR OpenFlow vendor extension may be +useful for this.) +.PP If no \fIcontroller\fR is specified, \fBovs\-openflowd\fR attempts to discover the location of a controller automatically (see below). . diff --git a/utilities/ovs-openflowd.c b/utilities/ovs-openflowd.c index 6dda8fb9..3ace4fdc 100644 --- a/utilities/ovs-openflowd.c +++ b/utilities/ovs-openflowd.c @@ -451,8 +451,8 @@ parse_options(int argc, char *argv[], struct ofsettings *s) argc -= optind; argv += optind; - if (argc < 1 || argc > 2) { - ovs_fatal(0, "need one or two non-option arguments; " + if (argc < 1) { + ovs_fatal(0, "need at least one non-option arguments; " "use --help for usage"); }