[ovs-discuss] [PATCH] vswitchd: Fix logged warnings for new internal ports.

Justin Pettit jpettit at nicira.com
Thu Aug 6 00:06:06 UTC 2009


This seems reasonable.  The first sentence of the comment threw me off  
a little bit, since it wasn't immediately obvious why an interface  
being internal wouldn't exist yet.  What if the first three sentences  
were changed to something like the following?

	Internal interfaces are created later by the call to dpif_port_add()
	in bridge_reconfigure().  Until then, we can't obtain any
	information about them.

--Justin


On Aug 5, 2009, at 4:34 PM, Ben Pfaff wrote:

> Justin reported that adding an internal port to a bridge caused
> ovs-vswitchd to log a pair of warnings.  This commit suppresses those
> warnings, which were harmless.
> ---
> vswitchd/bridge.c |   13 +++++++++++--
> 1 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index a4a723a..cbe132c 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -3009,8 +3009,17 @@ iface_create(struct port *port, const char  
> *name)
>     iface->tag = tag_create_random();
>     iface->delay_expires = LLONG_MAX;
>
> -    netdev_nodev_get_etheraddr(name, iface->mac);
> -    netdev_nodev_get_carrier(name, &iface->enabled);
> +    if (!cfg_get_bool(0, "iface.%s.internal", iface->name)) {
> +        netdev_nodev_get_etheraddr(name, iface->mac);
> +        netdev_nodev_get_carrier(name, &iface->enabled);
> +    } else {
> +        /* The network device doesn't exist yet.  It will be  
> created by the
> +         * call to dpif_port_add() in bridge_reconfigure().  Until  
> then, we
> +         * can't obtain any information about it.  (There's no real  
> value in
> +         * doing so, anyway, because the 'mac' and 'enabled' values  
> are only
> +         * used for interfaces that are bond slaves, and it doesn't  
> normally
> +         * make sense to bond an internal interface.) */
> +    }
>
>     if (port->n_ifaces >= port->allocated_ifaces) {
>         port->ifaces = x2nrealloc(port->ifaces, &port- 
> >allocated_ifaces,
> -- 
> 1.6.3.3
>
>
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss_openvswitch.org





More information about the discuss mailing list