[ovs-dev] [tunnels2 3/5] ovs-dpctl: Add new "set-if" command.

Ben Pfaff blp at nicira.com
Wed Oct 19 15:28:49 UTC 2011


On Tue, Oct 18, 2011 at 05:39:58PM -0700, Jesse Gross wrote:
> On Mon, Oct 17, 2011 at 3:14 PM, Ben Pfaff <blp at nicira.com> wrote:
> > diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c
> > index 4d0d3c2..01bc1eb 100644
> > --- a/utilities/ovs-dpctl.c
> > +++ b/utilities/ovs-dpctl.c
> > @@ -130,13 +130,17 @@ usage(void)
> > ?? ?? ?? ?? ?? ??"usage: %s [OPTIONS] COMMAND [ARG...]\n"
> > ?? ?? ?? ?? ?? ??" ??add-dp DP [IFACE...] ?? ?? add new datapath DP (with IFACEs)\n"
> > ?? ?? ?? ?? ?? ??" ??del-dp DP ?? ?? ?? ?? ?? ?? ?? ??delete local datapath DP\n"
> > - ?? ?? ?? ?? ?? " ??add-if DP IFACE... ?? ?? ?? add each IFACE as a port on DP\n"
> > + ?? ?? ?? ?? ?? " ??add-if DP IFACE... ?? ?? ?? reconfigure each IFACE within DP\n"
> > + ?? ?? ?? ?? ?? " ??set-if DP IFACE... ?? ?? ?? add each IFACE as a port on DP\n"
> 
> The descriptions are switched for add-if and set-if.

Oops.  I wonder how that happened.

Fixed.

> > +static void
> > +do_set_if(int argc, char *argv[])
> [...]
> > + ?? ?? ?? ??name = strtok_r(argv[i], ",", &save_ptr);
> > + ?? ?? ?? ??if (!name) {
> > + ?? ?? ?? ?? ?? ??ovs_error(0, "%s is not a valid network device name", argv[i]);
> > + ?? ?? ?? ?? ?? ??continue;
> > + ?? ?? ?? ??}
> 
> Shouldn't this also set failure?

Yes, I think so.

This originated in do_add_if(), where it also failed to set 'failure',
so I fixed it there too.

> Otherwise looks fine.

Thank you for the review.



More information about the dev mailing list