On Thu, Mar 26, 2015 at 06:00:32PM -0700, Alex Wang wrote:
> When there is any update from ovsdb, ovs will call netdev_set_config()
> for every vport.  Even though the change is not related to vport, the
> current implementation will always increment the per-netdev sequence
> number.  Subsequently this could cause even more unwanted effects,
> e.g. the recreation of 'struct tnl_port' in ofproto level.
> 
> This commit fixes the issue by only updating the netdev when there
> is actual configuration change.
> 
> Signed-off-by: Alex Wang <[email protected]>

This was some really good detective work.  Thank you!

Acked-by: Ben Pfaff <[email protected]>

I noticed one thing: 'peer' can't be NULL here (we're passing it to
xstrdup(), which would segfault) so there's no point in testing for it:

> +    if (!dev->peer || !peer || strcmp(dev->peer, peer)) {
> +        free(dev->peer);
> +        dev->peer = xstrdup(peer);
> +        netdev_change_seq_changed(dev_);
> +    }
>      ovs_mutex_unlock(&dev->mutex);
>  
>      return 0;
> -- 
> 1.7.9.5
> 
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to