{"id":2095627,"url":"http://patchwork.ozlabs.org/api/covers/2095627/?format=json","web_url":"http://patchwork.ozlabs.org/project/ovn/cover/20250609173539.1636916-1-mmichels@redhat.com/","project":{"id":68,"url":"http://patchwork.ozlabs.org/api/projects/68/?format=json","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":"<20250609173539.1636916-1-mmichels@redhat.com>","list_archive_url":null,"date":"2025-06-09T17:35:19","name":"[ovs-dev,00/14] Logical Flow Sync Refactor.","submitter":{"id":71978,"url":"http://patchwork.ozlabs.org/api/people/71978/?format=json","name":"Mark Michelson","email":"mmichels@redhat.com"},"mbox":"http://patchwork.ozlabs.org/project/ovn/cover/20250609173539.1636916-1-mmichels@redhat.com/mbox/","series":[{"id":460139,"url":"http://patchwork.ozlabs.org/api/series/460139/?format=json","web_url":"http://patchwork.ozlabs.org/project/ovn/list/?series=460139","date":"2025-06-09T17:35:19","name":"Logical Flow Sync Refactor.","version":1,"mbox":"http://patchwork.ozlabs.org/series/460139/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2095627/comments/","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=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=LiyHZERh;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)","smtp1.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=LiyHZERh","smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","smtp2.osuosl.org; dkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=LiyHZERh"],"Received":["from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\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 4bGJwp1D0vz1yDx\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Jun 2025 03:35:36 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id BD5178201D;\n\tMon,  9 Jun 2025 17:35:47 +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 bj_t4mhU5dhJ; Mon,  9 Jun 2025 17:35:46 +0000 (UTC)","from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id B06CC81E45;\n\tMon,  9 Jun 2025 17:35:46 +0000 (UTC)","from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 88089C0AC5;\n\tMon,  9 Jun 2025 17:35:46 +0000 (UTC)","from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 08C3BC0AC4\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:46 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id E98A541D60\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:45 +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 avCwOTfNCZD8 for <dev@openvswitch.org>;\n Mon,  9 Jun 2025 17:35:45 +0000 (UTC)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp2.osuosl.org (Postfix) with ESMTPS id 3E7FB4196B\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:44 +0000 (UTC)","from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-687-SvQl6U6gOYuIV6OiEHdy3w-1; Mon,\n 09 Jun 2025 13:35:41 -0400","from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id DC9E91808985\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:40 +0000 (UTC)","from localhost.localdomain.com (unknown [10.22.58.15])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 6BC341800285\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:40 +0000 (UTC)"],"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 smtp1.osuosl.org B06CC81E45","OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3E7FB4196B"],"Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=mmichels@redhat.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp2.osuosl.org 3E7FB4196B","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1749490543;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=coW4CjNaMG/wZPo2znFJ3U7qcTwJEMDCU0qUywp3220=;\n b=LiyHZERhBvdSFiaO2H/HZtu/zI6c76TA+bIUblRru1zxOyIyXvR4Wtt15YGg48se5Q2KNw\n rCMOPn47bj41SXWiFVY4oj/v+MOIIc0yzVRqtli9a5VdB1EC9hiFsPeT5rOiaYGtKVqDZ1\n ySUAzOv/W1SaAxYmChxU/Drt+WGb+KA=","X-MC-Unique":"SvQl6U6gOYuIV6OiEHdy3w-1","X-Mimecast-MFC-AGG-ID":"SvQl6U6gOYuIV6OiEHdy3w_1749490541","To":"dev@openvswitch.org","Date":"Mon,  9 Jun 2025 13:35:19 -0400","Message-ID":"<20250609173539.1636916-1-mmichels@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.111","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"YSfMSkaUGyesl5F9tHN__zkF5N2ia1qWPiNkYQvHl5g_1749490541","X-Mimecast-Originator":"redhat.com","Subject":"[ovs-dev] [PATCH ovn 00/14] Logical Flow Sync Refactor.","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":"Mark Michelson via dev <ovs-dev@openvswitch.org>","Reply-To":"Mark Michelson <mmichels@redhat.com>","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":"NOTE: This series is built on top of the datapath binding refactor and\nport binding refactor patches. You're likely to see tests failing on\nthese patches if those series are not merged already.\n\nThis series refactors how logical flows are synced, accomplishing two\nmain goals:\n\n1) Syncing of logical flows to the southbound database is handled in a\nnew node, rather than in en-lflow. This allows for syncing of logical\nflow tables from en-lflow and other nodes.\n\n2) The libraries for building logical flow tables and for syncing\nlogical flows no longer relies on ovn-northd constructs such as\novn_datapath.\n\nThis series accomplishes the above goals through a series of smaller\npatches rather than a single giant patch like other refactoring series.\n\nOverall, this series gets the job done, but there are a few things I'm\nnot especially happy about:\n\n1) The goal of the new en-lflow-sync node is to be able to sync logical\nflows from multiple logical flow tables. However, in current OVN, the\nonly logical flow table is the one created by en-lflow. Therefore, while\nthe code *should* be able to handle multiple logical flow tables, it's\nnot proven with this code change.\n\n2) I'm not happy about the non-constness of the inputs to the\nen-lflow-sync node. In particular,\n  * lflow_refs are created/destroyed in various nodes, then all are\n    populated in en-lflow, and then all are synced in en-lflow-sync.\n    This means that en-lflow and en-lflow-sync are modifying lflow_refs\n    beyond the node that manages their lifetimes.\n  * struct ovn_lflow has a datapath group field (dpg) that is modified\n    in en-lflow-sync.\n\nThere are ways to fix (2), but to do so in a performant way would be\noutside the scope of simply trying to refactor when/how logical flows\nare synced.\n\nMark Michelson (14):\n  northd: Find ovn_datapath from a single hmap.\n  lflow-mgr: Remove the ovn_datapath from ovn_lflow.\n  lflow-mgr: Use one ovn_datapaths arg for ovn_dp_group_create().\n  lflow-mgr: Pass one ovn_datapaths arg to sync_lflow_to_sb().\n  lflow_mgr: Pass dp_groups to sync_lflow_to_sb().\n  lflows: Create a separate node for lflow syncing.\n  en-lflow-sync: Separate syncing from datapaths and from the lflow\n    table.\n  northd: Convert ovn_stage from an enum to a struct.\n  lflow_ref: Allow multiple datapaths per lflow_ref_node.\n  lflows: Separate lflow_ref building and syncing.\n  lflows: Move dp_groups from lflow_data to lflow_sync_data.\n  datapaths: Add a hashvec of datapath bindings.\n  lflow: Remove northd dependency from en-lflow-sync.\n  lflows: Remove ovn_datapath parameter when adding lflows.\n\n northd/datapath_sync.c                       |  52 +++\n northd/datapath_sync.h                       |  33 +-\n northd/en-datapath-logical-router.c          |  23 +-\n northd/en-datapath-logical-router.h          |  10 +-\n northd/en-datapath-logical-switch.c          |  23 +-\n northd/en-datapath-logical-switch.h          |  10 +-\n northd/en-datapath-sync.c                    |  36 +-\n northd/en-learned-route-sync.c               |   8 +-\n northd/en-lflow.c                            | 309 +++++++++++---\n northd/en-lflow.h                            |  32 ++\n northd/en-multicast.c                        |   3 +-\n northd/en-northd-output.c                    |  14 +-\n northd/en-northd-output.h                    |   5 +-\n northd/en-northd.c                           |   5 +-\n northd/en-port-binding-chassisredirect.c     |   8 +-\n northd/en-port-binding-logical-router-port.c |   2 +-\n northd/en-port-binding-logical-switch-port.c |   2 +-\n northd/en-port-binding-mirror.c              |   4 +-\n northd/en-sync-sb.c                          | 104 +++--\n northd/inc-proc-northd.c                     |  22 +-\n northd/lflow-mgr.c                           | 419 +++++++++----------\n northd/lflow-mgr.h                           |  84 ++--\n northd/northd.c                              | 376 +++++++----------\n northd/northd.h                              |  92 ++--\n tests/ovn-northd.at                          | 125 +++++-\n 25 files changed, 1112 insertions(+), 689 deletions(-)"}