[ovs-dev] [PATCH 2/2] openflowd: Update for changes to dpif and netdev.

Ben Pfaff blp at nicira.com
Sat Jan 23 04:24:00 UTC 2010


On Fri, Jan 22, 2010 at 02:52:42PM -0500, Jesse Gross wrote:
> Openflowd had been a bit neglected as changes were made to the dpif
> and netdev interfaces over time.  This brings it up to date with all
> the latest changes.

Looks good.  One thought:

>      /* Local and remote vconns. */
> -    s->dp_name = argv[0];
> +    datapath_arg = xstrdup(argv[0]);
> +    dp_separator = strchr(datapath_arg, ':');
> +    if (dp_separator) {
> +        *dp_separator = '\0';
> +        s->dp_type = datapath_arg;
> +        s->dp_name = dp_separator + 1;
> +    } else {
> +        s->dp_name = datapath_arg;
> +        s->dp_type = NULL;
> +    }

I think I saw pretty similar code in your last patch.  Would it make
sense to write a helper function dp_parse_name() or some such?




More information about the dev mailing list