Re: [ovs-dev] [PATCH 0/5] netdev_open conflicting types
Looks good to me, applied to master, thanks! 2016-07-27 8:06 GMT-07:00 Thadeu Lima de Souza Cascardo: > Fix some uses of type on netdev_open. > > We established that there are two types: the database type and the netdev > type. > And that ofproto and dpif layers use the netdev type and return it when > queried. > > Some calls to netdev_open should use NULL instead of system. If there is no > netdev opened, system will be used as the default, but if a different type > is > opened, the caller does not expect it to be of type system. > > In other cases, the use of internal is incorrect and the appropriate > port_open_type should be used instead. > > Finally, we make netdev_open return an error when a netdev of a different > type > than the one requested already exists. > > This will fix some bugs and alert users when conflicting interfaces exist > on the > system and the database. For example, when a user configures an interface > with a > type other than system, and there is a system interface with the same name. > > Thadeu Lima de Souza Cascardo (5): > in-band: use open_type when opening internal device > in-band: don't use system type when opening netdev > netdev-vport: don't use system type when opening netdev > dpif-netdev: use the open_type when creating the local port > netdev: do not allow devices to be opened with conflicting types > > lib/dpif-netdev.c | 11 ++- > lib/netdev-vport.c | 2 +- > lib/netdev.c | 8 +++- > ofproto/in-band.c | 5 +++-- > tests/dpctl.at | 13 +++-- > 5 files changed, 24 insertions(+), 15 deletions(-) > > -- > 2.7.4 > > ___ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev > ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [PATCH 0/5] netdev_open conflicting types
I'm planning to leave this series to Daniele, since he already seems to be handling the main discussion. Thanks, Ben. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
[ovs-dev] [PATCH 0/5] netdev_open conflicting types
Fix some uses of type on netdev_open. We established that there are two types: the database type and the netdev type. And that ofproto and dpif layers use the netdev type and return it when queried. Some calls to netdev_open should use NULL instead of system. If there is no netdev opened, system will be used as the default, but if a different type is opened, the caller does not expect it to be of type system. In other cases, the use of internal is incorrect and the appropriate port_open_type should be used instead. Finally, we make netdev_open return an error when a netdev of a different type than the one requested already exists. This will fix some bugs and alert users when conflicting interfaces exist on the system and the database. For example, when a user configures an interface with a type other than system, and there is a system interface with the same name. Thadeu Lima de Souza Cascardo (5): in-band: use open_type when opening internal device in-band: don't use system type when opening netdev netdev-vport: don't use system type when opening netdev dpif-netdev: use the open_type when creating the local port netdev: do not allow devices to be opened with conflicting types lib/dpif-netdev.c | 11 ++- lib/netdev-vport.c | 2 +- lib/netdev.c | 8 +++- ofproto/in-band.c | 5 +++-- tests/dpctl.at | 13 +++-- 5 files changed, 24 insertions(+), 15 deletions(-) -- 2.7.4 ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev