]> git.proxmox.com Git - ovs.git/commit - ofproto/ofproto-dpif.c
tunnel: Fix deletion of datapath tunnel ports in case of reconfiguration
authorBalazs Nemeth <balazs.nemeth@ericsson.com>
Wed, 1 Nov 2017 15:20:47 +0000 (15:20 +0000)
committerBen Pfaff <blp@ovn.org>
Wed, 29 Nov 2017 00:46:19 +0000 (16:46 -0800)
commitc8025aee4fa6a862d142dd8da780d45aaf0a868c
treec175d9a4ffbd5a51ecf148a134423d89efdc9d49
parent99910ebbf9c40ac0d747f5f22e64d24d8a0ae334
tunnel: Fix deletion of datapath tunnel ports in case of reconfiguration

There is an issue in OVS with tunnel deletion during the
reconfiguration of OF tunnels. If the dst_port value is changed, the
old tunnel map entry will not be deleted, because the tp_port
argument of tnl_port_map_delete() has the new dst_port setting, hence
the tunnel cannot be found in the list of tnl_port structures.

The patch corrects this mechanism by adding a new argument,
'old_odp_port' to tnl_port_reconfigure(). This value is used to
identify the datapath tunnel port which is being reconfigured. In
connection with this fix, to unify the tunnel port map handling,
odp_port value is used to search the proper port to insert and delete
tunnel map entries as well. This variable can be used instead of
tp_port, as it is unique for all datapath tunnel ports, and there is
no need to reach dst_port from netdev_tunnel_config structure.

This patch also adds a printout to check the reference counter of
a tnl_port structure in tnl-port.c. Extending OVS unit test cases to
have ref_cnt values in the expected dump. Adding new test cases to
check if packet receiving is still working in the case of OF tunnel
port deletion. Adding new test cases to check the reference counter
in case of OF tunnel deletion or reconfiguration.

Signed-off-by: Balazs Nemeth <balazs.nemeth@ericsson.com>
Signed-off-by: Jan Scheurich <jan.scheurich@ericsson.com>
Co-authored-by: Jan Scheurich <jan.scheurich@ericsson.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/tnl-ports.c
lib/tnl-ports.h
ofproto/ofproto-dpif.c
ofproto/tunnel.c
ofproto/tunnel.h
tests/tunnel-push-pop-ipv6.at
tests/tunnel-push-pop.at