[ovs-dev] [add-remove v2 4/8] vswitchd: Make type of interface easier to determine.

Jesse Gross jesse at nicira.com
Sat Oct 9 00:20:45 UTC 2010


On Fri, Oct 1, 2010 at 4:48 PM, Ben Pfaff <blp at nicira.com> wrote:
> Suggested-by: Jesse Gross <jesse at nicira.com>

I think this is a good start but long term I would really like to put
these types explicitly in the database.

I think there may be some code in the netdev library that could be
updated to assume that everything has a type (and not do the implicit
conversion to "system".  That would require looking through the
various callers first though.

> +        /* Determine interface type.  The local port always has type
> +         * "internal".  Other ports take their type from the database and
> +         * default to "netdev" if none is specified. */
> +        iface->type = (!strcmp(if_cfg->name, port->bridge->name) ? "internal"
> +                       : if_cfg->type[0] ? if_cfg->type
> +                       : "system");

Default is "system".  I think I've seen this code before...




More information about the dev mailing list