Thanks Ben, it's useful to know that this could be regular behaviour. I dropped this patch and I plan to drop the patch which warns in this case instead.
As Alex mentioned, I dug deeper and found a better solution. On 9 May 2014 06:41, Alex Wang <al...@nicira.com> wrote: > Hey Ben, > > FYI, Joe changed the implementation to: > http://openvswitch.org/pipermail/dev/2014-May/039790.html > > Thanks for pointing this out, this actually reminds me of the similar > issue in another project. > > Thanks, > Alex Wang, > > > On Thu, May 8, 2014 at 11:31 AM, Ben Pfaff <b...@nicira.com> wrote: > >> On Mon, May 05, 2014 at 11:17:23AM +1200, Joe Stringer wrote: >> > Previously, it was possible to open a netdevice as one type, then >> > proceed to open it as a different type without first closing it. This >> > would result in the original device and netdev class being used rather >> > than the new one. >> > >> > An example configuration that would previously give unexpected >> behaviour: >> > >> > ovs-vsctl add-port br0 p0 -- set int p0 type=gre >> options:remote_ip=1.2.3.4 >> > ovs-vsctl add-port br0 p1 -- set int p1 type=internal >> > ovs-vsctl set int p1 type=gre options:remote_ip=1.2.3.4 >> > ovs-vsctl set int p1 type=internal >> > >> > The final command would report in the ovs-vswitchd logs that it is >> > attempting to configure the port with the same gre settings as p0, >> > despite the command specifying the type as internal. >> > >> > This patch catches this case in netdev_open(), removes the old device >> > from the netdev shash and ensures that one with the new type is created. >> > >> > Bug #1198386. >> > >> > Signed-off-by: Joe Stringer <joestrin...@nicira.com> >> >> I'm almost certain that this is going to trade one kind of unexpected >> behavior for a different one. For example, any call to >> netdev_get_in4_by_name() is now going to destroy a non-system device. >> _______________________________________________ >> dev mailing list >> dev@openvswitch.org >> http://openvswitch.org/mailman/listinfo/dev >> > >
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev