Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2222674/?format=api
{ "id": 2222674, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2222674/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20260413120827.59614-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": "<20260413120827.59614-1-lucas.vdias@luizalabs.com>", "list_archive_url": null, "date": "2026-04-13T12:08:27", "name": "[ovs-dev,v3] northd, ic: Add hub-spoke options to adv DR routes learned in ovn-ic.", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f752cf4bf8725620d06c89bf47e8e8d081bb6664", "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/20260413120827.59614-1-lucas.vdias@luizalabs.com/mbox/", "series": [ { "id": 499689, "url": "http://patchwork.ozlabs.org/api/1.2/series/499689/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=499689", "date": "2026-04-13T12:08:27", "name": "[ovs-dev,v3] northd, ic: Add hub-spoke options to adv DR routes learned in ovn-ic.", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/499689/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222674/comments/", "check": "fail", "checks": "http://patchwork.ozlabs.org/api/patches/2222674/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=fHxQigpl;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)", "smtp2.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=luizalabs.com header.i=@luizalabs.com header.a=rsa-sha256\n header.s=google header.b=fHxQigpl", "smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=luizalabs.com" ], "Received": [ "from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\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 4fvR5Y5pV2z1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 22:08:48 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby smtp2.osuosl.org (Postfix) with ESMTP id 3979F40260;\n\tMon, 13 Apr 2026 12:08:40 +0000 (UTC)", "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id qaQNqYoTJMY3; Mon, 13 Apr 2026 12:08:38 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp2.osuosl.org (Postfix) with ESMTPS id ABC3740057;\n\tMon, 13 Apr 2026 12:08:38 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 8244AC054A;\n\tMon, 13 Apr 2026 12:08:38 +0000 (UTC)", "from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 36D0BC0549\n for <dev@openvswitch.org>; Mon, 13 Apr 2026 12:08:37 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id 1984740183\n for <dev@openvswitch.org>; Mon, 13 Apr 2026 12:08:37 +0000 (UTC)", "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id OKoallK92hZW for <dev@openvswitch.org>;\n Mon, 13 Apr 2026 12:08:36 +0000 (UTC)", "from mail-dl1-x122b.google.com (mail-dl1-x122b.google.com\n [IPv6:2607:f8b0:4864:20::122b])\n by smtp2.osuosl.org (Postfix) with ESMTPS id CAC5D40057\n for <dev@openvswitch.org>; Mon, 13 Apr 2026 12:08:35 +0000 (UTC)", "by mail-dl1-x122b.google.com with SMTP id\n a92af1059eb24-12c287eb77fso4399818c88.1\n for <dev@openvswitch.org>; Mon, 13 Apr 2026 05:08:35 -0700 (PDT)", "from WNEC-73GS814.. ([186.237.124.211])\n by smtp.gmail.com with ESMTPSA id\n a92af1059eb24-12c4b323428sm5573960c88.4.2026.04.13.05.08.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 13 Apr 2026 05:08:33 -0700 (PDT)" ], "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 smtp2.osuosl.org ABC3740057", "OpenDKIM Filter v2.11.0 smtp2.osuosl.org CAC5D40057" ], "Received-SPF": "Pass (mailfrom) identity=mailfrom;\n client-ip=2607:f8b0:4864:20::122b; helo=mail-dl1-x122b.google.com;\n envelope-from=lucas.vdias@luizalabs.com; receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp2.osuosl.org CAC5D40057", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=luizalabs.com; s=google; t=1776082114; x=1776686914; 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=GJ4voHtER5GW9BRWwPUcb2CricVpyiiJW46+/0/Cj6M=;\n b=fHxQigplVTvuigS99kpWOUgNyTE+Sw1egWNBLNH+5DP3GpKc4hyvkPYwVUZgnWpMc7\n Obo8PzNcoQhWJSm0bIeFaL2v1+Z8VBgjz0G8wwSQa1kaWrG408SakDuUqt9xnfF1W09w\n 4hiYUQJd8jLT9jdEzEnXlABPU2Q2SGt+JHbdA=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776082114; x=1776686914;\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=GJ4voHtER5GW9BRWwPUcb2CricVpyiiJW46+/0/Cj6M=;\n b=bKScOYpFzkPoku7F27whgtQ5aNzYZi//w+WIyj0XMyX59inf49r7CMQJanvkjXq3N5\n IIMLZY3p5EkGLJYuSEf/GfSWwwKT4ZuiacJu4yBujpT7F0whVwDvcns/gTqgfnJ471us\n RC35MAlejbTe833sDUAD6IHnMm9jxm7nOJtWw00GaiW7VjH7QA2zo2pfspH1+zHpkFEp\n Oheoz3SmF2B8eCKXAM+YtVocDAW4v4p0oXjdKsbCY9vQTAjsn2fAeod9+RSd2jbs/WP0\n sFsiTgaRhRPuP7Js7OCzSff9ox9nW09AUH2rDYVgsQpkaYfBdKalqGR7DeeiJBy1Tyv8\n smOg==", "X-Gm-Message-State": "AOJu0YxZJj1VXlN1IWuxq8lieRN7jirs/ZEL6rOmNYxXHquMUEH1sF+3\n ObahVoXihAwukN7dxRs5F/I54FKePUkFkgnYqc51Qt19LD74VcXlDTiO6I/D0wiu/CjEVF7o/lX\n 44szjR1JZC0v8qzNYCDRve4qWyZkC4iKalrXpHUrUmLU52UpTtsCmHkrJxvyY", "X-Gm-Gg": "AeBDiesokNhaelikBCSnhTQmkkufsHVF/DfbmkyxEHC3nnpkeKy77fJJBeTsRGR/pjV\n /iI50b1SOhStPaTNyXMG9X+dchFA0VBnfrvvuR9te37dYA+DkYNU+O8tK2hFk3d8aFPUVf3CFWR\n K/3IjYMp0c4KBEnaua0mp69XCKD4A+6MxNlgoprvVOcrWZsrSUaRfr/rmURtlev5A7JwJL618fn\n ra6sPV/s/JYeT+SlP5XUotACiM7lbJZvIQhDdC6BvvekCggIx9GK7LlHf+N65Vn76yr/cHhnERh\n Ir6jPssWsqbXxLVX8m6fvU1lYVdBYdu39eJenDFrl05yp8Ki132fC9L/YEGpG7me6NJb7ii1AFO\n TRIB/lAu2chNxPftqZdYDgw/AiZa3AUJrwdGpE3389xtmfIhYYeRWBXvElagS1AAKH1RLuBUUGv\n 6xQPx0my0RTC/453EePtpECd8A2K8Pfa+RAVPX", "X-Received": "by 2002:a05:7022:6629:b0:12a:713b:896a with SMTP id\n a92af1059eb24-12c34eedc16mr8127956c88.17.1776082114038;\n Mon, 13 Apr 2026 05:08:34 -0700 (PDT)", "To": "dev@openvswitch.org", "Date": "Mon, 13 Apr 2026 09:08:27 -0300", "Message-ID": "<20260413120827.59614-1-lucas.vdias@luizalabs.com>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Subject": "[ovs-dev] [PATCH ovn v3] northd,\n ic: Add hub-spoke options to adv DR routes learned in ovn-ic.", "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": "Consider the scenario where there are 2 AZs using ovn-ic, each AZ has\none LR and its LS. The LRs are interconnected by a transit switch.\nOn each AZ, we can configure the dynamic routing and exchange routes\nvia BGP with external BGP speakers.\n\nAZ1\nLS1 - LR1 - BGP Speaker1 - Local subnet1\n \\\n -----------------------\n transit switch\n -----------------------\nAZ2 /\nLS2 - LR2 - BGP Speaker2 - Local subnet2\n\nThe LR2 will learn the subnet1 prefix via ovn-ic but this prefix will\nnot be redistributed to BGP Speaker2 and it also happens with LR1.\nThis scenario uses the network's hub-and-spoke terminology where we can\nenable the hub-spoke on the LR for such redistribution.\nsubnet1 and subnet2 are configured as ic-source-dynamic=true in ovn-ic.\nAlso, consider the same scenario, but LR1 and LR2 learn the same subnet\nfor redundancy, hub-spoke option is disabled to not adv the subnet learned\nfrom BGP and advertised in ovn-ic in BGP speakers.\n\nSigned-off-by: Lucas Vargas Dias <lucas.vdias@luizalabs.com>\n---\n NEWS | 2 +\n ic/ovn-ic.c | 22 ++++---\n lib/ovn-util.h | 1 +\n northd/en-advertised-route-sync.c | 2 +\n northd/northd.c | 8 +++\n northd/northd.h | 5 +-\n northd/ovn-northd.c | 1 -\n ovn-ic-sb.ovsschema | 7 ++-\n ovn-ic-sb.xml | 14 +++--\n ovn-nb.xml | 14 +++++\n tests/ovn-ic.at | 99 +++++++++++++++++++++++++++++++\n 11 files changed, 156 insertions(+), 19 deletions(-)", "diff": "diff --git a/NEWS b/NEWS\nindex 888946b54..5710716aa 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -52,6 +52,8 @@ OVN v26.03.0 - xxx xx xxxx\n learned routes. This option has priority over its router counterpart.\n * The EVPN support is now considered stable. Its \"experimental\" tag has\n been removed.\n+ * Add support for hub-and-spoke propagation via the \"hub-spoke\" option\n+ in dynamic-routing-redistribute settings.\n - Add support for Network Function insertion in OVN with stateful traffic\n redirection capability in Logical Switch datapath. The feature introduces\n three new NB database tables:\ndiff --git a/ic/ovn-ic.c b/ic/ovn-ic.c\nindex 1aa8af9b9..d224d37f7 100644\n--- a/ic/ovn-ic.c\n+++ b/ic/ovn-ic.c\n@@ -1283,6 +1283,7 @@ struct ic_route_info {\n struct in6_addr prefix;\n unsigned int plen;\n struct in6_addr nexthop;\n+ bool is_src_dynamic;\n const char *origin;\n const char *route_table;\n const char *route_tag;\n@@ -1565,7 +1566,7 @@ add_to_routes_ad(struct hmap *routes_ad, const struct in6_addr prefix,\n const struct nbrec_logical_router_static_route *nb_route,\n const struct nbrec_logical_router *nb_lr,\n const struct nbrec_load_balancer *nb_lb,\n- const char *route_tag)\n+ const char *route_tag, bool is_src_dynamic)\n {\n ovs_assert(nb_route || nb_lrp || nb_lb || nb_lr);\n \n@@ -1585,6 +1586,7 @@ add_to_routes_ad(struct hmap *routes_ad, const struct in6_addr prefix,\n ic_route->nb_route = nb_route;\n ic_route->origin = origin;\n ic_route->route_table = route_table;\n+ ic_route->is_src_dynamic = is_src_dynamic;\n ic_route->nb_lrp = nb_lrp;\n ic_route->nb_lr = nb_lr;\n ic_route->nb_lb = nb_lb;\n@@ -1661,7 +1663,7 @@ add_static_to_routes_ad(\n \n add_to_routes_ad(routes_ad, prefix, plen, nexthop, ROUTE_ORIGIN_STATIC,\n nb_route->route_table, NULL, nb_route, nb_lr,\n- NULL, route_tag);\n+ NULL, route_tag, false);\n }\n \n static void\n@@ -1671,7 +1673,8 @@ add_network_to_routes_ad(struct hmap *routes_ad, const char *network,\n const struct smap *nb_options,\n const struct nbrec_logical_router *nb_lr,\n const char *route_tag,\n- const struct nbrec_logical_router_port *ts_lrp)\n+ const struct nbrec_logical_router_port *ts_lrp,\n+ bool is_src_dynamic)\n {\n struct in6_addr prefix, nexthop;\n unsigned int plen;\n@@ -1721,9 +1724,12 @@ add_network_to_routes_ad(struct hmap *routes_ad, const char *network,\n ds_destroy(&msg);\n }\n \n+ const char *origin = is_src_dynamic ? ROUTE_ORIGIN_CONNECTED_DYNAMIC :\n+ ROUTE_ORIGIN_CONNECTED;\n /* directly-connected routes go to <main> route table */\n- add_to_routes_ad(routes_ad, prefix, plen, nexthop, ROUTE_ORIGIN_CONNECTED,\n- NULL, nb_lrp, NULL, nb_lr, NULL, route_tag);\n+ add_to_routes_ad(routes_ad, prefix, plen, nexthop, origin,\n+ NULL, nb_lrp, NULL, nb_lr, NULL, route_tag,\n+ is_src_dynamic);\n }\n \n static void\n@@ -1781,7 +1787,7 @@ add_lb_vip_to_routes_ad(struct hmap *routes_ad, const char *vip_key,\n \n /* Lb vip routes go to <main> route table */\n add_to_routes_ad(routes_ad, vip_ip, plen, nexthop, ROUTE_ORIGIN_LB,\n- NULL, NULL, NULL, nb_lr, nb_lb, route_tag);\n+ NULL, NULL, NULL, nb_lr, nb_lb, route_tag, false);\n out:\n free(vip_str);\n }\n@@ -2374,7 +2380,7 @@ build_ts_routes_to_adv(struct ic_context *ctx,\n add_network_to_routes_ad(routes_ad, lrp->networks[j], lrp,\n ts_port_addrs,\n &nb_global->options,\n- lr, route_tag, ts_lrp);\n+ lr, route_tag, ts_lrp, false);\n }\n } else {\n /* The router port of the TS port is ignored. */\n@@ -2429,7 +2435,7 @@ build_ts_routes_to_adv(struct ic_context *ctx,\n add_network_to_routes_ad(routes_ad, sb_route->ip_prefix, NULL,\n ts_port_addrs,\n &nb_global->options,\n- lr, route_tag, ts_lrp);\n+ lr, route_tag, ts_lrp, true);\n }\n sbrec_learned_route_index_destroy_row(filter);\n }\ndiff --git a/lib/ovn-util.h b/lib/ovn-util.h\nindex 4c6623bef..4ccf6dc2d 100644\n--- a/lib/ovn-util.h\n+++ b/lib/ovn-util.h\n@@ -33,6 +33,7 @@\n #define ROUTE_ORIGIN_CONNECTED \"connected\"\n #define ROUTE_ORIGIN_STATIC \"static\"\n #define ROUTE_ORIGIN_LB \"loadbalancer\"\n+#define ROUTE_ORIGIN_CONNECTED_DYNAMIC \"connected-dynamic\"\n \n #define ETH_CRC_LENGTH 4\n #define ETHERNET_OVERHEAD (ETH_HEADER_LEN + ETH_CRC_LENGTH)\ndiff --git a/northd/en-advertised-route-sync.c b/northd/en-advertised-route-sync.c\nindex 8b73810c7..6ae9a9689 100644\n--- a/northd/en-advertised-route-sync.c\n+++ b/northd/en-advertised-route-sync.c\n@@ -683,6 +683,8 @@ should_advertise_route(const struct ovn_datapath *advertising_od,\n return drr_mode_LB_is_set(drr);\n case ROUTE_SOURCE_CONNECTED_AS_HOST:\n return drr_mode_CONNECTED_AS_HOST_is_set(drr);\n+ case ROUTE_SOURCE_IC_DYNAMIC:\n+ return drr_mode_IC_DYNAMIC_is_set(drr);\n case ROUTE_SOURCE_LEARNED:\n OVS_NOT_REACHED();\n default:\ndiff --git a/northd/northd.c b/northd/northd.c\nindex b7239f4e2..ce80639ea 100644\n--- a/northd/northd.c\n+++ b/northd/northd.c\n@@ -887,6 +887,10 @@ parse_dynamic_routing_redistribute(\n out |= DRRM_LB;\n continue;\n }\n+ if (!strcmp(token, \"hub-spoke\")) {\n+ out |= DRRM_IC_DYNAMIC;\n+ continue;\n+ }\n static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);\n VLOG_WARN_RL(&rl,\n \"unknown dynamic-routing-redistribute option '%s' on %s\",\n@@ -12342,6 +12346,9 @@ parsed_routes_add_static(const struct ovn_datapath *od,\n if (!strcmp(smap_get_def(&route->options, \"origin\", \"\"),\n ROUTE_ORIGIN_CONNECTED)) {\n source = ROUTE_SOURCE_CONNECTED;\n+ } else if (!strcmp(smap_get_def(&route->options, \"origin\", \"\"),\n+ ROUTE_ORIGIN_CONNECTED_DYNAMIC)) {\n+ source = ROUTE_SOURCE_IC_DYNAMIC;\n } else {\n source = ROUTE_SOURCE_STATIC;\n }\n@@ -12436,6 +12443,7 @@ route_source_to_offset(enum route_source source)\n {\n switch (source) {\n case ROUTE_SOURCE_CONNECTED:\n+ case ROUTE_SOURCE_IC_DYNAMIC:\n return ROUTE_PRIO_OFFSET_CONNECTED;\n case ROUTE_SOURCE_STATIC:\n return ROUTE_PRIO_OFFSET_STATIC;\ndiff --git a/northd/northd.h b/northd/northd.h\nindex 139519006..e86d39f9a 100644\n--- a/northd/northd.h\n+++ b/northd/northd.h\n@@ -365,7 +365,8 @@ struct mcast_port_info {\n DRR_MODE(CONNECTED_AS_HOST, 1) \\\n DRR_MODE(STATIC, 2) \\\n DRR_MODE(NAT, 3) \\\n- DRR_MODE(LB, 4)\n+ DRR_MODE(LB, 4) \\\n+ DRR_MODE(IC_DYNAMIC, 5)\n \n enum dynamic_routing_redistribute_mode_bits {\n #define DRR_MODE(PROTOCOL, BIT) DRRM_##PROTOCOL##_BIT = BIT,\n@@ -832,6 +833,8 @@ enum route_source {\n ROUTE_SOURCE_LB,\n /* The route is derived from out_port of connected logical router. */\n ROUTE_SOURCE_CONNECTED_AS_HOST,\n+ /* The route is derived from an ovn-controller and advertised to IC. */\n+ ROUTE_SOURCE_IC_DYNAMIC,\n };\n \n struct parsed_route {\ndiff --git a/northd/ovn-northd.c b/northd/ovn-northd.c\nindex 0ed2eb17a..cfaf2f74b 100644\n--- a/northd/ovn-northd.c\n+++ b/northd/ovn-northd.c\n@@ -905,7 +905,6 @@ main(int argc, char *argv[])\n &nbrec_load_balancer_col_external_ids,\n &nbrec_load_balancer_health_check_col_external_ids,\n &nbrec_logical_router_policy_col_external_ids,\n- &nbrec_logical_router_static_route_col_external_ids,\n &nbrec_meter_col_external_ids,\n &nbrec_meter_band_col_external_ids,\n &nbrec_mirror_col_external_ids,\ndiff --git a/ovn-ic-sb.ovsschema b/ovn-ic-sb.ovsschema\nindex 8981a4eef..e0e0fef5e 100644\n--- a/ovn-ic-sb.ovsschema\n+++ b/ovn-ic-sb.ovsschema\n@@ -1,7 +1,7 @@\n {\n \"name\": \"OVN_IC_Southbound\",\n- \"version\": \"2.4.0\",\n- \"cksum\": \"859073048 9662\",\n+ \"version\": \"2.5.0\",\n+ \"cksum\": \"1892994110 9713\",\n \"tables\": {\n \"IC_SB_Global\": {\n \"columns\": {\n@@ -116,7 +116,8 @@\n \"origin\": {\"type\": {\"key\": {\n \"type\": \"string\",\n \"enum\": [\"set\",\n- [\"connected\", \"static\", \"loadbalancer\"]]}}},\n+ [\"connected\", \"static\", \"loadbalancer\",\n+ \"connected-dynamic\"]]}}},\n \"external_ids\": {\n \"type\": {\"key\": \"string\", \"value\": \"string\",\n \"min\": 0, \"max\": \"unlimited\"}}},\ndiff --git a/ovn-ic-sb.xml b/ovn-ic-sb.xml\nindex b59fe1d03..3ca115073 100644\n--- a/ovn-ic-sb.xml\n+++ b/ovn-ic-sb.xml\n@@ -378,12 +378,14 @@\n </column>\n \n <column name=\"origin\">\n- Can be one of <code>connected</code>, <code>static</code> or\n- <code>loadbalancer</code>. Routes to directly-connected subnets -\n- LRP's CIDRs are inserted to OVN IC SB DB with <code>connected</code>\n- value in <ref column=\"origin\"/>. Static routes are inserted to OVN IC\n- SB DB with <code>static</code> value. Routes for LB VIPs are inserted\n- in OVN IC SB DB with <code>loadbalancer</code> value.\n+ Can be one of <code>connected</code>, <code>static</code>,\n+ <code>connected-dynamic</code> or <code>loadbalancer</code>. Routes\n+ to directly-connected subnets - LRP's CIDRs are inserted to OVN IC SB\n+ DB with <code>connected</code> value in <ref column=\"origin\"/>.\n+ Static routes are inserted to OVN IC SB DB with <code>static</code>\n+ value. Routes for LB VIPs are inserted in OVN IC SB DB with\n+ <code>loadbalancer</code> value. Routes learned from dynamic routing\n+ are inserted OVN IC SB DB with <code>connected-dynamic</code> value.\n Next when route is learned to another AZ NB DB by ovn-ic, route origin\n is synced to <ref table=\"Logical_Router_Static_Route\" column=\"options\"\n key=\"origin\"/>.\ndiff --git a/ovn-nb.xml b/ovn-nb.xml\nindex f1cd89509..7324e8656 100644\n--- a/ovn-nb.xml\n+++ b/ovn-nb.xml\n@@ -3533,6 +3533,13 @@ or\n Logical Switch.\n </p>\n \n+ <p>\n+ If <code>hub-spoke</code> is in the list then northd will synchronize\n+ dynamic routes learned through OVN-IC from other routers into the\n+ <ref table=\"Advertised_Route\" db=\"OVN_Southbound\"/> table, enabling\n+ hub-and-spoke propagation.\n+ </p>\n+\n <p>\n This value can be overwritten on a per LRP basis using\n <ref column=\"options\" key=\"dynamic-routing-redistribute\"\n@@ -4629,6 +4636,13 @@ or\n via shared Logical Switch.\n </p>\n \n+ <p>\n+ If <code>hub-spoke</code> is in the list then northd will synchronize\n+ dynamic routes learned through OVN-IC from other routers into the\n+ <ref table=\"Advertised_Route\" db=\"OVN_Southbound\"/> table, enabling\n+ hub-and-spoke propagation.\n+ </p>\n+\n <p>\n If not set the value from <ref column=\"options\"\n key=\"dynamic-routing-redistribute\" table=\"Logical_Router\"/> on the\ndiff --git a/tests/ovn-ic.at b/tests/ovn-ic.at\nindex 8bb5a4177..3c7ad8055 100644\n--- a/tests/ovn-ic.at\n+++ b/tests/ovn-ic.at\n@@ -4692,3 +4692,102 @@ OVS_WAIT_FOR_OUTPUT([ovn_as az2 ovn-nbctl lr-route-list lr12 | grep 192.168 |\n OVN_CLEANUP_IC([az1], [az2], [az3])\n AT_CLEANUP\n ])\n+\n+OVN_FOR_EACH_NORTHD([\n+AT_SETUP([ovn-ic -- Check ovn-ic adv and learn from SB Learned Route - hub and spoke mode])\n+\n+ovn_init_ic_db\n+\n+for i in 1 2; 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+#\n+#\n+# logical router (lr11) - transit switch (ts11) - logical router (lr12)\n+#\n+#\n+\n+# Create lr11, lr12 and ts11 and connect them\n+for i in 1 2; do\n+ ovn_as az$i\n+\n+ lr=lr1$i\n+ check ovn-nbctl lr-add $lr\n+\n+ ts=ts11\n+ check ovn-ic-nbctl --wait=sb --may-exist ts-add $ts\n+\n+ lrp=lrp-$lr-$ts\n+ lsp=lsp-$ts-$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.$i/24\n+ check ovn-nbctl lsp-add-router-port $ts $lsp $lrp\n+done\n+\n+# Create directly-connected route in lr12\n+check ovn_as az2 ovn-nbctl lrp-add lr12 lrp-lr12 aa:aa:aa:aa:bb:01 \"192.168.0.1/24\"\n+OVS_WAIT_FOR_OUTPUT([ovn_as az1 ovn-nbctl lr-route-list lr11 | grep 192.168 |\n+ grep learned | awk '{print $1, $2}' | sort ], [0], [dnl\n+192.168.0.0/24 169.254.101.2\n+])\n+\n+ovn_as az2\n+check ovn-nbctl --wait=sb set Logical_Router lr12 option:dynamic-routing=true \\\n+ option:dynamic-routing-redistribute=\"connected,static\"\n+check ovn_as az2 ovn-nbctl --wait=sb lrp-add lr12 lr12-dr1 00:00:00:00:ff:01 10.0.0.1/24\n+dr1=$(fetch_column port_binding _uuid logical_port=lr12-dr1)\n+datapath=$(fetch_column datapath_binding _uuid external_ids:name=lr12)\n+\n+check_uuid ovn-sbctl create Learned_Route \\\n+ datapath=$datapath \\\n+ logical_port=$dr1 \\\n+ ip_prefix=192.168.1.0/24 \\\n+ nexthop=10.0.0.20\n+\n+# Check Learned_Route adv in ovn-ic\n+OVS_WAIT_FOR_OUTPUT([ovn_as az1 ovn-nbctl lr-route-list lr11 |\n+ grep learned | awk '{print $1, $2}' | sort ], [0], [dnl\n+10.0.0.0/24 169.254.101.2\n+192.168.0.0/24 169.254.101.2\n+192.168.1.0/24 169.254.101.2\n+])\n+\n+ovn_as az1\n+check ovn-nbctl --wait=sb set Logical_Router lr11 option:dynamic-routing=true \\\n+ option:dynamic-routing-redistribute=\"connected,static\"\n+# Advertise just 10.0.0.0/24 and 192.168.0.0/24 routes\n+check_row_count Advertised_Route 1 ip_prefix=192.168.0.0/24\n+check_row_count Advertised_Route 1 ip_prefix=10.0.0.0/24\n+check_row_count Advertised_Route 0 ip_prefix=192.168.1.0/24\n+\n+\n+ovn_as az1\n+check ovn-nbctl --wait=sb set Logical_Router lr11 \\\n+ option:dynamic-routing-redistribute=\"connected,static,hub-spoke\"\n+# Advertise just 10.0.0.0/24, 192.168.0.0/24 and 192.168.1.0/24 routes\n+# Route 192.168.1.0/24 is learned by DR from other logical routes (lr12)\n+# And lr12 Advertised it in ovn-ic. Hub-spoke option enable re-routing in lr11\n+check_row_count Advertised_Route 1 ip_prefix=192.168.0.0/24\n+check_row_count Advertised_Route 1 ip_prefix=10.0.0.0/24\n+check_row_count Advertised_Route 1 ip_prefix=192.168.1.0/24\n+\n+ovn_as az1\n+check ovn-nbctl --wait=sb set Logical_Router lr11 \\\n+ option:dynamic-routing-redistribute=\"connected,static\"\n+\n+check_row_count Advertised_Route 1 ip_prefix=192.168.0.0/24\n+check_row_count Advertised_Route 1 ip_prefix=10.0.0.0/24\n+check_row_count Advertised_Route 0 ip_prefix=192.168.1.0/24\n+\n+OVN_CLEANUP_IC([az1], [az2])\n+\n+AT_CLEANUP\n+])\n", "prefixes": [ "ovs-dev", "v3" ] }