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