[ovs-dev] [PATCH] Revert "netdev: do not allow devices to be opened with conflicting types"
Daniele Di Proietto
diproiettod at ovn.org
Tue Aug 16 17:51:53 UTC 2016
Thanks, applied to master and branch-2.6
2016-08-16 6:32 GMT-07:00 Thadeu Lima de Souza Cascardo <cascardo at redhat.com
>:
> On Tue, Aug 16, 2016 at 10:27:32AM -0300, Thadeu Lima de Souza Cascardo
> wrote:
> > This reverts commit d2fa6c676a13e86acc7f17261b2d87484f625d45.
> >
> > When doing a restart, the routing table will open ports as system, which
> > prevents internal ports to be opened with the right type. That causes
> failures
> > in creating the ports.
> >
> > We should revisit this patch after finding a proper fix on the routing
> table
> > layer.
> >
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at redhat.com>
>
> This should be applied to 2.6 branch as well, thanks!
>
> Cascardo.
>
> > ---
> > lib/netdev.c | 8 +-------
> > 1 file changed, 1 insertion(+), 7 deletions(-)
> >
> > diff --git a/lib/netdev.c b/lib/netdev.c
> > index 5cf8bbb..10f2d0f 100644
> > --- a/lib/netdev.c
> > +++ b/lib/netdev.c
> > @@ -339,8 +339,7 @@ netdev_open(const char *name, const char *type,
> struct netdev **netdevp)
> > if (!netdev) {
> > struct netdev_registered_class *rc;
> >
> > - type = type && type[0] ? type : "system";
> > - rc = netdev_lookup_class(type);
> > + rc = netdev_lookup_class(type && type[0] ? type : "system");
> > if (rc && ovs_refcount_try_ref_rcu(&rc->refcnt)) {
> > netdev = rc->class->alloc();
> > if (netdev) {
> > @@ -377,11 +376,6 @@ netdev_open(const char *name, const char *type,
> struct netdev **netdevp)
> > name, type);
> > error = EAFNOSUPPORT;
> > }
> > - } else if (type && strcmp(type, netdev_get_type(netdev))) {
> > - VLOG_WARN("trying to create netdev %s of different type %s,"
> > - " already is %s\n",
> > - name, type, netdev_get_type(netdev));
> > - error = EEXIST;
> > } else {
> > error = 0;
> > }
> > --
> > 2.7.4
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
More information about the dev
mailing list