On 5/16/25 3:24 PM, Lucas Vargas Dias (Dev - MGC - SDN) via dev wrote: > Hi >
Hi Lucas, > This patch is very important due to [0]. > Some cases generate loops in routers and high CPU load. > Could someone review, please? > Sorry for the delay in reviews. > [0] https://www.mail-archive.com/[email protected]/msg10304.html > > Lucas Dias > > Em sex., 4 de abr. de 2025 às 10:37, Lucas Vargas Dias < > [email protected]> escreveu: > >> Check if lsp exists in TS, if router-port of lsp exist >> and lrp has the same network address of adversing. >> If some of conditions is false, remove the route of routes >> advertising. >> Also, check if lrp that's learning a new route has address in the >> same subnet of neighbor. >> These verifications avoid loop that generates a high CPU load viewed in >> ovsdb-server. >> >> Reported-at: >> https://www.mail-archive.com/[email protected]/msg10304.html >> Signed-off-by: Lucas Vargas Dias <[email protected]> >> --- >> ic/ovn-ic.c | 114 ++++++++++++++++++++++++- >> tests/ovn-ic.at | 215 ++++++++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 326 insertions(+), 3 deletions(-) >> >> diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c >> index c8796680b..2285fabf2 100644 >> --- a/ic/ovn-ic.c >> +++ b/ic/ovn-ic.c >> @@ -1315,11 +1315,52 @@ route_has_local_gw(const struct >> nbrec_logical_router *lr, >> return false; >> } >> >> +static bool >> +lrp_has_neighbor_in_ts(const struct nbrec_logical_router_port *lrp, >> + struct in6_addr *nexthop) >> +{ >> + if (!lrp || !nexthop) { >> + return false; >> + } >> + >> + struct lport_addresses lrp_networks; >> + if (!extract_lrp_networks(lrp, &lrp_networks)) { >> + destroy_lport_addresses(&lrp_networks); >> + return false; >> + } >> + >> + if (IN6_IS_ADDR_V4MAPPED(nexthop)) { >> + ovs_be32 neigh_prefix_v4 = in6_addr_get_mapped_ipv4(nexthop); >> + for (size_t i = 0; i < lrp_networks.n_ipv4_addrs; i++) { Nit: too many spaces before '<'. >> + struct ipv4_netaddr address = lrp_networks.ipv4_addrs[i]; >> + if (address.network == (neigh_prefix_v4 & address.mask)) { >> + destroy_lport_addresses(&lrp_networks); >> + return true; >> + } >> + } >> + } else { >> + for (size_t i = 0; i < lrp_networks.n_ipv6_addrs; i++) { Nit: too many spaces before '<'. [...] I took care of these two nits and applied the patch to main, 25.03, 24.09 and 24.03. For branches 24.09 and 24.03 I also had to include the definition of get_lrp_by_lrp_name() in the backport. Regards, Dumitru _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
