Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2194256/?format=api
{ "id": 2194256, "url": "http://patchwork.ozlabs.org/api/patches/2194256/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20260207214852.86991-4-arukomoinikova@k2.cloud/", "project": { "id": 68, "url": "http://patchwork.ozlabs.org/api/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": "<20260207214852.86991-4-arukomoinikova@k2.cloud>", "list_archive_url": null, "date": "2026-02-07T21:48:45", "name": "[ovs-dev,4/8,v2] northd: Refactor SB sync to use engine data structure.", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "499fd4238f8a823dcd2d75352bcf80a2c60f7f29", "submitter": { "id": 89461, "url": "http://patchwork.ozlabs.org/api/people/89461/?format=api", "name": "Rukomoinikova Aleksandra", "email": "ARukomoinikova@k2.cloud" }, "delegate": { "id": 94943, "url": "http://patchwork.ozlabs.org/api/users/94943/?format=api", "username": "dceara", "first_name": "Dumitru", "last_name": "Ceara", "email": "dceara@redhat.com" }, "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20260207214852.86991-4-arukomoinikova@k2.cloud/mbox/", "series": [ { "id": 491397, "url": "http://patchwork.ozlabs.org/api/series/491397/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=491397", "date": "2026-02-07T21:48:46", "name": "[ovs-dev,1/8,v2] ovn-nb, ovn-nbctl: Add Logical Switch Port Health Check support.", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/491397/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2194256/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2194256/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=k2.cloud header.i=@k2.cloud header.a=rsa-sha256\n header.s=cloudmail header.b=K1dzg81n;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.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 unprotected) header.d=k2.cloud header.i=@k2.cloud header.a=rsa-sha256\n header.s=cloudmail header.b=K1dzg81n", "smtp1.osuosl.org;\n dmarc=pass (p=none dis=none) header.from=k2.cloud", "smtp1.osuosl.org; dkim=pass (1024-bit key,\n unprotected) header.d=k2.cloud header.i=@k2.cloud header.a=rsa-sha256\n header.s=cloudmail header.b=K1dzg81n" ], "Received": [ "from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.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 4f7l372X6Kz1xvh\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 08 Feb 2026 08:49:07 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp2.osuosl.org (Postfix) with ESMTP id 17C92403B9;\n\tSat, 7 Feb 2026 21:49:04 +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 205VkMWpT7Vm; Sat, 7 Feb 2026 21:49:02 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp2.osuosl.org (Postfix) with ESMTPS id C9D9D400A7;\n\tSat, 7 Feb 2026 21:49:02 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 77BE9C077E;\n\tSat, 7 Feb 2026 21:49:02 +0000 (UTC)", "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id DD031C02A4\n for <dev@openvswitch.org>; Sat, 7 Feb 2026 21:49:00 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id B776D83449\n for <dev@openvswitch.org>; Sat, 7 Feb 2026 21:49:00 +0000 (UTC)", "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id ebMLT04MBGVe for <dev@openvswitch.org>;\n Sat, 7 Feb 2026 21:49:00 +0000 (UTC)", "from mail1.k2.cloud (mail1.k2.cloud [109.73.14.252])\n by smtp1.osuosl.org (Postfix) with ESMTPS id DD93C83330\n for <dev@openvswitch.org>; Sat, 7 Feb 2026 21:48:58 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections -\n client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp2.osuosl.org C9D9D400A7", "OpenDKIM Filter v2.11.0 smtp1.osuosl.org DD93C83330" ], "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=109.73.14.252;\n helo=mail1.k2.cloud; envelope-from=arukomoinikova@k2.cloud;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp1.osuosl.org DD93C83330", "From": "Alexandra Rukomoinikova <arukomoinikova@k2.cloud>", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=k2.cloud;\n s=cloudmail; t=1770500935;\n bh=n/19JSAdatcmKC+bpCQUeewtVlL+U8fog2OUesU+ZQ4=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=K1dzg81nHviheiBNNS2pgYZVZ4djt4wSDJdgouYfkFAj3kyImzD3wdeqrjLES35EE\n uqJdB1UByeQnI7QuPIHGSr2J76qKGgycc+M3yTsBOIePY/cLGU9m+unCnL62FOXO6N\n FZtLakqduDQ7iZJ3yHEjwlj7cs/R5ygN0Dgj7fv8=", "To": "dev@openvswitch.org", "Cc": "Alexandra Rukomoinikova <arukomoinikova@k2.cloud>", "Date": "Sun, 8 Feb 2026 00:48:45 +0300", "Message-Id": "<20260207214852.86991-4-arukomoinikova@k2.cloud>", "In-Reply-To": "<20260207214852.86991-1-arukomoinikova@k2.cloud>", "References": "<20260207214852.86991-1-arukomoinikova@k2.cloud>", "MIME-Version": "1.0", "Subject": "[ovs-dev] [PATCH ovn 4/8 v2] northd: Refactor SB sync to use engine\n data structure.", "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>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "ovs-dev-bounces@openvswitch.org", "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>" }, "content": "Signed-off-by: Alexandra Rukomoinikova <arukomoinikova@k2.cloud>\n---\nv1 --> v2: nothind changed\n---\n northd/en-sync-from-sb.c | 28 +++++++++++++++++++---------\n northd/en-sync-from-sb.h | 6 ++++++\n northd/northd.c | 29 +++++++++++++++++------------\n northd/northd.h | 7 +++----\n 4 files changed, 45 insertions(+), 25 deletions(-)", "diff": "diff --git a/northd/en-sync-from-sb.c b/northd/en-sync-from-sb.c\nindex dde0e9f55..6d4ff3e39 100644\n--- a/northd/en-sync-from-sb.c\n+++ b/northd/en-sync-from-sb.c\n@@ -40,23 +40,33 @@ void *\n en_sync_from_sb_init(struct engine_node *node OVS_UNUSED,\n struct engine_arg *arg OVS_UNUSED)\n {\n- return NULL;\n+ struct en_sync_from_sb_data *data = xmalloc(sizeof *data);\n+ return data;\n+}\n+\n+static void\n+en_sync_from_sb_get_input_data(struct engine_node *node,\n+ struct en_sync_from_sb_data *data)\n+{\n+ data->sb_pb_table =\n+ EN_OVSDB_GET(engine_get_input(\"SB_port_binding\", node));\n+ data->sb_ha_ch_grp_table =\n+ EN_OVSDB_GET(engine_get_input(\"SB_ha_chassis_group\", node));\n }\n \n enum engine_node_state\n-en_sync_from_sb_run(struct engine_node *node, void *data OVS_UNUSED)\n+en_sync_from_sb_run(struct engine_node *node, void *data_)\n {\n+ struct en_sync_from_sb_data *data =\n+ (struct en_sync_from_sb_data *) data_;\n const struct engine_context *eng_ctx = engine_get_context();\n- struct northd_data *nd = engine_get_input_data(\"northd\", node);\n+ struct northd_data *northd_data = engine_get_input_data(\"northd\", node);\n+\n+ en_sync_from_sb_get_input_data(node, data);\n \n- const struct sbrec_port_binding_table *sb_pb_table =\n- EN_OVSDB_GET(engine_get_input(\"SB_port_binding\", node));\n- const struct sbrec_ha_chassis_group_table *sb_ha_ch_grp_table =\n- EN_OVSDB_GET(engine_get_input(\"SB_ha_chassis_group\", node));\n stopwatch_start(OVNSB_DB_RUN_STOPWATCH_NAME, time_msec());\n ovnsb_db_run(eng_ctx->ovnsb_idl_txn,\n- sb_pb_table, sb_ha_ch_grp_table,\n- &nd->ls_ports, &nd->lr_ports);\n+ data, northd_data);\n stopwatch_stop(OVNSB_DB_RUN_STOPWATCH_NAME, time_msec());\n \n return EN_UNCHANGED;\ndiff --git a/northd/en-sync-from-sb.h b/northd/en-sync-from-sb.h\nindex 0ad07853a..bea248c45 100644\n--- a/northd/en-sync-from-sb.h\n+++ b/northd/en-sync-from-sb.h\n@@ -3,6 +3,12 @@\n \n #include \"lib/inc-proc-eng.h\"\n \n+struct en_sync_from_sb_data {\n+ /* Southbound table references */\n+ const struct sbrec_port_binding_table *sb_pb_table;\n+ const struct sbrec_ha_chassis_group_table *sb_ha_ch_grp_table;\n+};\n+\n void *en_sync_from_sb_init(struct engine_node *, struct engine_arg *);\n enum engine_node_state en_sync_from_sb_run(struct engine_node *, void *data);\n void en_sync_from_sb_cleanup(void *data);\ndiff --git a/northd/northd.c b/northd/northd.c\nindex 8cb307ca3..1904b162b 100644\n--- a/northd/northd.c\n+++ b/northd/northd.c\n@@ -55,6 +55,7 @@\n #include \"en-sampling-app.h\"\n #include \"en-datapath-logical-switch.h\"\n #include \"en-datapath-logical-router.h\"\n+#include \"en-sync-from-sb.h\"\n #include \"lib/ovn-parallel-hmap.h\"\n #include \"ovn/actions.h\"\n #include \"ovn/features.h\"\n@@ -2439,7 +2440,7 @@ op_get_name(const struct ovn_port *op)\n }\n \n static void\n-ovn_update_ipv6_prefix(struct hmap *lr_ports)\n+ovn_update_ipv6_prefix(const struct hmap *lr_ports)\n {\n const struct ovn_port *op;\n HMAP_FOR_EACH (op, key_node, lr_ports) {\n@@ -21011,10 +21012,11 @@ handle_cr_port_binding_changes(const struct sbrec_port_binding *sb,\n * this column is not empty, it means we need to set the corresponding logical\n * port as 'up' in the northbound DB. */\n static void\n-handle_port_binding_changes(const struct sbrec_port_binding_table *sb_pb_table,\n+handle_port_binding_changes(\n+ const struct sbrec_port_binding_table *sb_pb_table,\n const struct sbrec_ha_chassis_group_table *sb_ha_ch_grp_table,\n- struct hmap *ls_ports,\n- struct hmap *lr_ports,\n+ const struct hmap *ls_ports,\n+ const struct hmap *lr_ports,\n struct shash *ha_ref_chassis_map)\n {\n struct hmapx lr_groups = HMAPX_INITIALIZER(&lr_groups);\n@@ -21090,23 +21092,26 @@ handle_port_binding_changes(const struct sbrec_port_binding_table *sb_pb_table,\n /* Handle a fairly small set of changes in the southbound database. */\n void\n ovnsb_db_run(struct ovsdb_idl_txn *ovnsb_txn,\n- const struct sbrec_port_binding_table *sb_pb_table,\n- const struct sbrec_ha_chassis_group_table *sb_ha_ch_grp_table,\n- struct hmap *ls_ports,\n- struct hmap *lr_ports)\n+ const struct en_sync_from_sb_data *sync_from_sb_data,\n+ const struct northd_data *northd_data)\n {\n if (!ovsdb_idl_has_ever_connected(ovsdb_idl_txn_get_idl(ovnsb_txn))) {\n return;\n }\n \n struct shash ha_ref_chassis_map = SHASH_INITIALIZER(&ha_ref_chassis_map);\n- handle_port_binding_changes(sb_pb_table, sb_ha_ch_grp_table,\n- ls_ports, lr_ports, &ha_ref_chassis_map);\n- update_sb_ha_group_ref_chassis(sb_ha_ch_grp_table, &ha_ref_chassis_map);\n+ handle_port_binding_changes(sync_from_sb_data->sb_pb_table,\n+ sync_from_sb_data->sb_ha_ch_grp_table,\n+ &northd_data->ls_ports,\n+ &northd_data->lr_ports,\n+ &ha_ref_chassis_map);\n+\n+ update_sb_ha_group_ref_chassis(sync_from_sb_data->sb_ha_ch_grp_table,\n+ &ha_ref_chassis_map);\n \n shash_destroy(&ha_ref_chassis_map);\n \n- ovn_update_ipv6_prefix(lr_ports);\n+ ovn_update_ipv6_prefix(&northd_data->lr_ports);\n }\n \n const struct ovn_datapath *\ndiff --git a/northd/northd.h b/northd/northd.h\nindex 77e8b049b..f5c8b17dd 100644\n--- a/northd/northd.h\n+++ b/northd/northd.h\n@@ -22,6 +22,7 @@\n #include \"lib/sset.h\"\n #include \"lib/hmapx.h\"\n #include \"northd/en-port-group.h\"\n+#include \"northd/en-sync-from-sb.h\"\n #include \"northd/ipam.h\"\n #include \"northd/lb.h\"\n #include \"openvswitch/hmap.h\"\n@@ -892,10 +893,8 @@ void ovnnb_db_run(struct northd_input *input_data,\n struct northd_data *data,\n struct ovsdb_idl_txn *ovnsb_txn);\n void ovnsb_db_run(struct ovsdb_idl_txn *ovnsb_txn,\n- const struct sbrec_port_binding_table *,\n- const struct sbrec_ha_chassis_group_table *,\n- struct hmap *ls_ports,\n- struct hmap *lr_ports);\n+ const struct en_sync_from_sb_data *sync_from_sb_data,\n+ const struct northd_data *northd_data);\n bool northd_handle_ls_changes(struct ovsdb_idl_txn *,\n const struct northd_input *,\n struct northd_data *);\n", "prefixes": [ "ovs-dev", "4/8", "v2" ] }