Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2200245/?format=api
{ "id": 2200245, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2200245/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20260224123621.21065-1-lucas.vdias@luizalabs.com/", "project": { "id": 68, "url": "http://patchwork.ozlabs.org/api/1.2/projects/68/?format=api", "name": "Open Virtual Network development", "link_name": "ovn", "list_id": "ovs-dev.openvswitch.org", "list_email": "ovs-dev@openvswitch.org", "web_url": "http://openvswitch.org/", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260224123621.21065-1-lucas.vdias@luizalabs.com>", "list_archive_url": null, "date": "2026-02-24T12:36:21", "name": "[ovs-dev,v2] ic: Avoid learn the same prefix and nexthop in same TS.", "commit_ref": null, "pull_url": null, "state": "deferred", "archived": false, "hash": "f5940eff80e615436e17cb844898eff97edfff8e", "submitter": { "id": 90169, "url": "http://patchwork.ozlabs.org/api/1.2/people/90169/?format=api", "name": "Lucas Vargas Dias", "email": "lucas.vdias@luizalabs.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20260224123621.21065-1-lucas.vdias@luizalabs.com/mbox/", "series": [ { "id": 493156, "url": "http://patchwork.ozlabs.org/api/1.2/series/493156/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=493156", "date": "2026-02-24T12:36:21", "name": "[ovs-dev,v2] ic: Avoid learn the same prefix and nexthop in same TS.", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/493156/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2200245/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2200245/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<ovs-dev-bounces@openvswitch.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "dev@openvswitch.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "ovs-dev@lists.linuxfoundation.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=luizalabs.com header.i=@luizalabs.com\n header.a=rsa-sha256 header.s=google header.b=mhVTOdRk;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.137; helo=smtp4.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)", "smtp4.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key,\n unprotected) header.d=luizalabs.com header.i=@luizalabs.com\n header.a=rsa-sha256 header.s=google header.b=mhVTOdRk", "smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=luizalabs.com", "smtp3.osuosl.org; dkim=pass (1024-bit key,\n unprotected) header.d=luizalabs.com header.i=@luizalabs.com\n header.a=rsa-sha256 header.s=google header.b=mhVTOdRk" ], "Received": [ "from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fKxzk16ltz1xvx\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 24 Feb 2026 23:36:34 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id ED0A5403FC;\n\tTue, 24 Feb 2026 12:36:31 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id XmboxVLBGuIE; Tue, 24 Feb 2026 12:36:31 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp4.osuosl.org (Postfix) with ESMTPS id E00904030F;\n\tTue, 24 Feb 2026 12:36:30 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id B9D72C0070;\n\tTue, 24 Feb 2026 12:36:30 +0000 (UTC)", "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 62D7CC003D\n for <dev@openvswitch.org>; Tue, 24 Feb 2026 12:36:29 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 4912B60BF1\n for <dev@openvswitch.org>; Tue, 24 Feb 2026 12:36:29 +0000 (UTC)", "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id jm_bIETvH_xu for <dev@openvswitch.org>;\n Tue, 24 Feb 2026 12:36:28 +0000 (UTC)", "from mail-vk1-xa36.google.com (mail-vk1-xa36.google.com\n [IPv6:2607:f8b0:4864:20::a36])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 3977660BAA\n for <dev@openvswitch.org>; Tue, 24 Feb 2026 12:36:28 +0000 (UTC)", "by mail-vk1-xa36.google.com with SMTP id\n 71dfb90a1353d-567543b8989so2603526e0c.2\n for <dev@openvswitch.org>; Tue, 24 Feb 2026 04:36:27 -0800 (PST)", "from WNEC-73GS814.. ([186.237.125.222])\n by smtp.gmail.com with ESMTPSA id\n a1e0cc1a2514c-94da8996314sm9370053241.2.2026.02.24.04.36.25\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 24 Feb 2026 04:36:26 -0800 (PST)" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections - client-ip=140.211.9.56;\n helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp4.osuosl.org E00904030F", "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3977660BAA" ], "Received-SPF": "Pass (mailfrom) identity=mailfrom;\n client-ip=2607:f8b0:4864:20::a36; helo=mail-vk1-xa36.google.com;\n envelope-from=lucas.vdias@luizalabs.com; receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp3.osuosl.org 3977660BAA", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=luizalabs.com; s=google; t=1771936587; x=1772541387; darn=openvswitch.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=4ti1944Z7lmCKxsDIYh7LaSzgSlw5RtAwqW92zbfmfY=;\n b=mhVTOdRkdg0Qt4cLni7VqDMbk5aPJ5pO6aSTM6sN/pNpfZSHWxo3iDnMGAU8KZturE\n co5kxzpFPRxCuNQD1pgP0tMMVp/Fv4MkxVv2+bFFmWhHQ0D/0zwSEiMoxvW600D74nvx\n EDLA6F+mfWHOGFJojOR4cM5fYH3ZbWB9gtP1s=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771936587; x=1772541387;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=4ti1944Z7lmCKxsDIYh7LaSzgSlw5RtAwqW92zbfmfY=;\n b=IGnoGKQc9ICKI0ZuUoW9/5+lqifHRyie6iR88aZ+y2TQAZrRtgrwjXB2W0hnhLcc/U\n xQA3m7KL2skm919RVRR6M08VGksnyWzEWLcIovg0UHbtfw7QujdLfWVEAPLDokk8WbAs\n 9eks5ROkP3Jtu/GdTRNb17I846DT7JIGfmJMUa9nWzgBWPK+PLQqPks2w8/Wqo8tHJrv\n HxWsEMXmmBAaTymMnOEHl1og9ANB77Lar6bZAtmce6vjYlGMmBNUOEoi0RBDhWxWD8Ol\n kKnJikTAnGw/Q4Nl/pFc1ygXC71kTK4E7odpAyLsGJZObcwiELf2xpzYT208hD0To9N2\n FSHw==", "X-Gm-Message-State": "AOJu0YzINon3i5le12RFw7KSc9pArmJvYF45EAh3u+MOlkCTOK80DPgX\n fq+ozZgSYePh+wcg+Barvw9NYU22PXMZOOeca/jRjvEi4tLc1v2CYvKMyKUlU0YeWhavaAb3G0H\n MNG729Jq5pRoNFBeBYb7rAY7sr+9J8KRsD37/J4fhfPapz3ICchHoxrHmYVI6", "X-Gm-Gg": "ATEYQzxX2f0KcsWjn7ECQva63B5KA75eGJ/IlTx8eGT3uQ7Ai3otgU4a1vxdjSFL3fU\n RiqPBSAppY8SXanPIVqteBLhrvNPnVzpriJE0n/UzTl0obFh999KSgkSS4pyyQCzEKMkYgfFJL1\n nJda02yFibwo+umUv/7poBLpIOZZhDlFnTCp8+hhGdPZvYa65mbI+AqBNNCloyTGu1oPc2t0SrB\n aYLO1FxGA5GnHyoXQDx+mN4GsJ4FoTnjHv6GLnUjzVxAg4u8gViZB4PaUf2ZKjBOaERfZnEwLNG\n ugxxYsF7IYTHD+SEN6jPii9+msHABqOS4dE3Scg6Wv1/u7f+GFjr3nae6GWmEBSK4abhyW/KMWG\n s03DhPpdV9xFFtA6S1DRG1J/Gs+k4yrGqjlD+wQR1dOwWwA088FCqwY9fBO4FqkXcC78lRlem70\n 2zp0SmpBzUVcZmaf/yCGOiQRcEFy+QSMiYcJkd", "X-Received": "by 2002:a05:6102:c4b:b0:5f1:4fc3:855d with SMTP id\n ada2fe7eead31-5feb311d364mr4136170137.38.1771936586505;\n Tue, 24 Feb 2026 04:36:26 -0800 (PST)", "To": "dev@openvswitch.org", "Date": "Tue, 24 Feb 2026 09:36:21 -0300", "Message-ID": "<20260224123621.21065-1-lucas.vdias@luizalabs.com>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Subject": "[ovs-dev] [PATCH ovn v2] ic: Avoid learn the same prefix and\n nexthop in same TS.", "X-BeenThere": "ovs-dev@openvswitch.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "<ovs-dev.openvswitch.org>", "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>", "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>", "List-Post": "<mailto:ovs-dev@openvswitch.org>", "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>", "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>", "From": "Lucas Vargas Dias via dev <ovs-dev@openvswitch.org>", "Reply-To": "Lucas Vargas Dias <lucas.vdias@luizalabs.com>", "Content-Type": "text/plain; charset=\"iso-8859-1\"", "Content-Transfer-Encoding": "quoted-printable", "Errors-To": "ovs-dev-bounces@openvswitch.org", "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>" }, "content": "Avoid learned route loop if two differents AZs\nconfigure the same address and adv the same prefix\nin the same Transit Switch.\nDo not remove the route from routes learned structure,\nmark the route as not stale.\n\nSigned-off-by: Lucas Vargas Dias <lucas.vdias@luizalabs.com>\n---\n ic/ovn-ic.c | 17 ++++++++------\n tests/ovn-ic.at | 60 +++++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 70 insertions(+), 7 deletions(-)", "diff": "diff --git a/ic/ovn-ic.c b/ic/ovn-ic.c\nindex 95d73cb4b..3f3c0d99d 100644\n--- a/ic/ovn-ic.c\n+++ b/ic/ovn-ic.c\n@@ -1300,6 +1300,7 @@ struct ic_route_info {\n const struct nbrec_logical_router_static_route *nb_route;\n const struct nbrec_logical_router_port *nb_lrp;\n const struct nbrec_load_balancer *nb_lb;\n+ bool stale; /* True if the route is stale and should be removed. */\n };\n \n static uint32_t\n@@ -1393,6 +1394,7 @@ add_to_routes_learned(struct hmap *routes_learned,\n ic_route->origin = origin;\n ic_route->route_table = nb_route->route_table;\n ic_route->nb_lr = nb_lr;\n+ ic_route->stale = true;\n hmap_insert(routes_learned, &ic_route->node,\n ic_route_hash(&prefix, plen, &nexthop, origin,\n nb_route->route_table));\n@@ -2168,8 +2170,7 @@ sync_learned_routes(struct ic_context *ctx,\n route_learned->nb_route, \"ic-learned-route\", uuid_s);\n free(uuid_s);\n }\n- hmap_remove(&ic_lr->routes_learned, &route_learned->node);\n- free(route_learned);\n+ route_learned->stale = false;\n } else {\n /* Create the missing route in NB. */\n const struct nbrec_logical_router_static_route *nb_route =\n@@ -2197,11 +2198,13 @@ sync_learned_routes(struct ic_context *ctx,\n /* Delete extra learned routes. */\n struct ic_route_info *route_learned;\n HMAP_FOR_EACH_SAFE (route_learned, node, &ic_lr->routes_learned) {\n- VLOG_DBG(\"Delete route %s -> %s that is not in IC-SB from NB.\",\n- route_learned->nb_route->ip_prefix,\n- route_learned->nb_route->nexthop);\n- nbrec_logical_router_update_static_routes_delvalue(\n- ic_lr->lr, route_learned->nb_route);\n+ if (route_learned->stale) {\n+ VLOG_DBG(\"Delete route %s -> %s that is not in IC-SB from NB.\",\n+ route_learned->nb_route->ip_prefix,\n+ route_learned->nb_route->nexthop);\n+ nbrec_logical_router_update_static_routes_delvalue(\n+ ic_lr->lr, route_learned->nb_route);\n+ }\n hmap_remove(&ic_lr->routes_learned, &route_learned->node);\n free(route_learned);\n }\ndiff --git a/tests/ovn-ic.at b/tests/ovn-ic.at\nindex 1a826aa1c..ead16aa91 100644\n--- a/tests/ovn-ic.at\n+++ b/tests/ovn-ic.at\n@@ -3394,6 +3394,66 @@ OVN_CLEANUP_IC([az1], [az2])\n AT_CLEANUP\n ])\n \n+OVN_FOR_EACH_NORTHD([\n+AT_SETUP([ovn-ic -- check loop with LSP of duplicated address])\n+\n+ovn_init_ic_db\n+\n+for i in 1 2 3; do\n+ ovn_start az$i\n+ ovn_as az$i\n+\n+ # Enable route learning at AZ level\n+ check ovn-nbctl set nb_global . options:ic-route-learn=true\n+ # Enable route advertising at AZ level\n+ check ovn-nbctl set nb_global . options:ic-route-adv=true\n+done\n+\n+# Create new transit switches and LRs. Test topology is next:\n+# logical router (lr12)\n+# |\n+# logical router (lr11) - / transit switch (ts11) \\ - logical router (lr13)\n+#\n+\n+# Create lr11, lr13, ts11 and connect them\n+for i in 1 3; do\n+ ovn_as az$i\n+\n+ lr=lr1$i\n+ check ovn-nbctl lr-add $lr\n+\n+ check ovn-ic-nbctl --wait=sb --may-exist ts-add ts11\n+\n+ lrp=lrp-$lr-ts11\n+ lsp=lsp-ts11-$lr\n+ # Create LRP and connect to TS\n+ check ovn-nbctl lrp-add $lr $lrp aa:aa:aa:aa:a1:0$i 169.254.101.1/24\n+ check ovn-nbctl lsp-add-router-port ts11 $lsp $lrp\n+done\n+\n+# Create lr12 and connect it to ts11\n+ovn_as az2\n+check ovn-nbctl lr-add lr12\n+\n+# Create LRP and connect to TS\n+check ovn-nbctl lrp-add lr12 lrp-lr12-ts11 aa:aa:aa:aa:a1:03 169.254.101.2/24\n+check ovn-nbctl lsp-add-router-port ts11 lsp-lr12-ts11 lrp-lr12-ts11\n+\n+\n+# Create directly-connected route in lr11\n+check ovn_as az1 ovn-nbctl lrp-add lr11 lrp-lr11 aa:aa:aa:aa:bb:01 \"192.168.0.1/24\"\n+check ovn_as az3 ovn-nbctl lrp-add lr13 lrp-lr13 aa:aa:aa:aa:bb:03 \"192.168.0.1/24\"\n+sleep 2\n+OVS_WAIT_FOR_OUTPUT([ovn_as az2 ovn-nbctl lr-route-list lr12 | grep 192.168 |\n+ grep learned | awk '{print $1, $2}' | sort ], [0], [dnl\n+192.168.0.0/24 169.254.101.1\n+])\n+\n+OVN_CLEANUP_IC([az1], [az2], [az3])\n+\n+AT_CLEANUP\n+])\n+\n OVN_FOR_EACH_NORTHD([\n AT_SETUP([ovn-ic -- prefix filter -- filtering routes])\n ovn_init_ic_db\n", "prefixes": [ "ovs-dev", "v2" ] }