Virtual port depends on other ports in the switch. Make sure we
process flows correctly when there is a change of LSP that might
be parent of virtual port.
Fixes: b337750e45be ("northd: Incremental processing of VIF changes in 'northd'
node.")
Signed-off-by: Ales Musil <[email protected]>
---
northd/northd.c | 5 +++++
tests/ovn-northd.at | 30 ++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/northd/northd.c b/northd/northd.c
index 1d3e132d4..2a7e511a4 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -4880,6 +4880,11 @@ ls_handle_lsp_changes(struct ovsdb_idl_txn
*ovnsb_idl_txn,
delete_fdb_entries(ni->sbrec_fdb_by_dp_and_port,
od->tunnel_key, old_tunnel_key);
}
+ } else if (!strcmp(new_nbsp->type, "virtual") &&
+ smap_get(&new_nbsp->options, "virtual-parents")) {
+ /* Virtual port depends on other LSPs, make sure we process
+ it correctly when other LSPs change. */
+ goto fail;
}
op->visited = true;
}
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 419130aa8..84b19f2c5 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -16753,3 +16753,33 @@ check grep -q "Bad configuration: The peer of the
switch port 'ls-lrp1' (LRP pee
AT_CLEANUP
])
+
+OVN_FOR_EACH_NORTHD_NO_HV([
+AT_SETUP([Virtual LSP - I-P])
+ovn_start
+
+check ovn-nbctl ls-add ls
+
+check ovn-nbctl lsp-add ls lsp-vir \
+ -- lsp-set-addresses lsp-vir "00:00:00:00:01:88 10.0.0.88" \
+ -- lsp-set-type lsp-vir virtual \
+ -- set logical_switch_port lsp-vir options:virtual-ip=10.0.0.88 \
+ -- set logical_switch_port lsp-vir options:virtual-parents=lsp
+
+check ovn-nbctl lsp-add ls lsp \
+ -- lsp-set-addresses lsp "00:00:00:00:01:11 10.0.0.11"
+
+check ovn-nbctl --wait=sb sync
+
+#check as northd ovn-appctl -t ovn-northd inc-engine/recompute
+#check ovn-nbctl --wait=sb sync
+
+ovn-sbctl dump-flows ls > flows
+AT_CAPTURE_FILE([flows])
+
+AT_CHECK([grep -e "ls_in_arp_rsp" flows | grep bind_vport | ovn_strip_lflows],
[0], [dnl
+ table=??(ls_in_arp_rsp ), priority=100 , match=(inport == "lsp" &&
((arp.op == 1 && arp.spa == 10.0.0.88 && arp.tpa == 10.0.0.88) || (arp.op == 2
&& arp.spa == 10.0.0.88))), action=(bind_vport("lsp-vir", inport); next;)
+])
+
+AT_CLEANUP
+])
--
2.49.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev