Message ID | 1501672649-32851-1-git-send-email-roid@mellanox.com |
---|---|
State | Accepted |
Headers | show |
On Wed, Aug 02, 2017 at 02:17:29PM +0300, Roi Dayan wrote: > From: Paul Blakey <paulb@mellanox.com> > > There is a race between listening on route changes from route-table > netlink which then calls ovs_router_insert() where it adds the involved > netdev to the tnl-ports map (tnl_port_map_insert_ipdev()), > and netdev_open from from normal opening of the port. > > tnl-ports open the netdev as type system (type == NULL) when it doesn't > exists before it is opened normally, e.g from dumping the ports > in dpctl. > > This solves 'ovs-dpctl show' EExists error on vxlan ports as both > (dpctl/tnl-ports) will open the ports as vxlan type. > > Signed-off-by: Paul Blakey <paulb@mellanox.com> > Reviewed-by: Roi Dayan <roid@mellanox.com> Applied to master, thanks!
diff --git a/lib/tnl-ports.c b/lib/tnl-ports.c index 70f6c3b..777ed4d 100644 --- a/lib/tnl-ports.c +++ b/lib/tnl-ports.c @@ -408,7 +408,7 @@ insert_ipdev(const char dev_name[]) struct netdev *dev; int error, n_in6; - error = netdev_open(dev_name, NULL, &dev); + error = netdev_open(dev_name, netdev_get_type_from_name(dev_name), &dev); if (error) { return; }