[ovs-dev] [PATCH 12/14] ofproto: Bundle all controller-related settings into a struct.

Ben Pfaff blp at nicira.com
Tue Apr 20 17:07:46 UTC 2010


On Fri, Apr 16, 2010 at 08:21:03PM -0700, Justin Pettit wrote:
> On Apr 8, 2010, at 5:07 PM, Ben Pfaff wrote:
> 
> > @@ -305,6 +268,14 @@ parse_options(int argc, char *argv[], struct ofsettings *s)
> >     char *short_options = long_options_to_short_options(long_options);
> > 
> >     /* Set defaults that we can figure out before parsing options. */
> > +    s->controller.max_backoff = 8;
> > +    s->controller.probe_interval = 0;
> 
> I think the default value is supposed to be 5.  A quick look at the
> source code, didn't indicate to me where a value of zero would get it
> to the default.

You're right.  I changed the default here to "5".

(As far as I can tell this is a bug fix for the code that was here
before, too.)

> >         case OPT_MAX_BACKOFF:
> > -            s->max_backoff = atoi(optarg);
> > -            if (s->max_backoff < 1) {
> > +            s->controller.max_backoff = atoi(optarg);
> > +            if (s->controller.max_backoff < 1) {
> >                 ovs_fatal(0, "--max-backoff argument must be at least 1");
> > -            } else if (s->max_backoff > 3600) {
> > -                s->max_backoff = 3600;
> > +            } else if (s->controller.max_backoff > 3600) {
> > +                s->controller.max_backoff = 3600;
> 
> Do you think the max backoff value should be documented in the
> ovs-openflowd man page?

I don't think anyone will care, honestly.

> > +        oc.band = (!c->connection_mode
> > +                   || !strcmp(c->connection_mode, "out-of-band")
> > +                   ? OFPROTO_IN_BAND
> > +                   : OFPROTO_OUT_OF_BAND);
> 
> Shouldn't that string check be with "in-band"?

Yes, thanks.




More information about the dev mailing list