It's a legal setup where tunnel ports with the same config are created on different bridges served by Open vSwitch. Specifically, multiple OVN controllers may emulate multiple chassis running on the same physical host, in which case they may need to create separate tunnel ports to connect to the same remote chassis on their respective bridges.
Signed-off-by: Ihar Hrachyshka <[email protected]> --- ofproto/tunnel.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/ofproto/tunnel.c b/ofproto/tunnel.c index 3455ed233..fc45d40f9 100644 --- a/ofproto/tunnel.c +++ b/ofproto/tunnel.c @@ -148,11 +148,11 @@ ofproto_tunnel_init(void) static bool tnl_port_add__(const struct ofport_dpif *ofport, const struct netdev *netdev, - odp_port_t odp_port, bool warn, bool native_tnl, const char name[]) + odp_port_t odp_port, bool warn OVS_UNUSED, bool native_tnl, + const char name[]) OVS_REQ_WRLOCK(rwlock) { const struct netdev_tunnel_config *cfg; - struct tnl_port *existing_port; struct tnl_port *tnl_port; struct hmap **map; @@ -174,21 +174,6 @@ tnl_port_add__(const struct ofport_dpif *ofport, const struct netdev *netdev, tnl_port->match.pt_mode = netdev_get_pt_mode(netdev); map = tnl_match_map(&tnl_port->match); - existing_port = tnl_find_exact(&tnl_port->match, *map); - if (existing_port) { - if (warn) { - struct ds ds = DS_EMPTY_INITIALIZER; - tnl_match_fmt(&tnl_port->match, &ds); - VLOG_WARN("%s: attempting to add tunnel port with same config as " - "port '%s' (%s)", tnl_port_get_name(tnl_port), - tnl_port_get_name(existing_port), ds_cstr(&ds)); - ds_destroy(&ds); - } - netdev_close(tnl_port->netdev); - free(tnl_port); - return false; - } - hmap_insert(ofport_map, &tnl_port->ofport_node, hash_pointer(ofport, 0)); if (!*map) { -- 2.28.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
