{"id":2095629,"url":"http://patchwork.ozlabs.org/api/patches/2095629/?format=json","web_url":"http://patchwork.ozlabs.org/project/ovn/patch/20250609173539.1636916-3-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-3-mmichels@redhat.com>","list_archive_url":null,"date":"2025-06-09T17:35:21","name":"[ovs-dev,02/14] lflow-mgr: Remove the ovn_datapath from ovn_lflow.","commit_ref":null,"pull_url":null,"state":"deferred","archived":false,"hash":"ad1fc816aa0fb5aeeae8061c4ae5cf1339bfb20e","submitter":{"id":71978,"url":"http://patchwork.ozlabs.org/api/people/71978/?format=json","name":"Mark Michelson","email":"mmichels@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/ovn/patch/20250609173539.1636916-3-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/patches/2095629/comments/","check":"success","checks":"http://patchwork.ozlabs.org/api/patches/2095629/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=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=N+bHgmiS;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::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 header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=N+bHgmiS","smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","smtp2.osuosl.org;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.a=rsa-sha256 header.s=mimecast20190719 header.b=N+bHgmiS"],"Received":["from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::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 4bGJws1KGkz1yDx\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Jun 2025 03:35:40 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 31EE941C8A;\n\tMon,  9 Jun 2025 17:35:53 +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 03deL2wHbTyG; Mon,  9 Jun 2025 17:35:50 +0000 (UTC)","from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp4.osuosl.org (Postfix) with ESMTPS id 3588841C03;\n\tMon,  9 Jun 2025 17:35:50 +0000 (UTC)","from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id D82D5C0AC8;\n\tMon,  9 Jun 2025 17:35:49 +0000 (UTC)","from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 28693C0AC5\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:47 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id 752394196B\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:46 +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 CCSeJ3a7rTxb for <dev@openvswitch.org>;\n Mon,  9 Jun 2025 17:35:46 +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 8A30541D5F\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:45 +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-587-M5iSawmmPdqI8bnTlMUfxg-1; Mon,\n 09 Jun 2025 13:35:43 -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 69586180034E\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:42 +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 EC6FB1800285\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:41 +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 smtp4.osuosl.org 3588841C03","OpenDKIM Filter v2.11.0 smtp2.osuosl.org 8A30541D5F"],"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 8A30541D5F","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1749490544;\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 in-reply-to:in-reply-to:references:references;\n bh=RUFLybIrbzu6XnhrZ0Y2lwSorGRWbktKXWL+gDaLWEY=;\n b=N+bHgmiSODsp8HFFysxB2WGaMkPklO4R/hZvdhtdzRyojyUsr14FZrdXgy0seNqpFp8ZPy\n 5eEoJfmNHqi7TvJX2E+R6kdpOIxtvZFt0XeIhAG5zoxcpVoJwvkLDOXjgRNhaBg5gSXJ/z\n FpXgcWAagp/qEApVo3bzBLNDdw03iac=","X-MC-Unique":"M5iSawmmPdqI8bnTlMUfxg-1","X-Mimecast-MFC-AGG-ID":"M5iSawmmPdqI8bnTlMUfxg_1749490542","To":"dev@openvswitch.org","Date":"Mon,  9 Jun 2025 13:35:21 -0400","Message-ID":"<20250609173539.1636916-3-mmichels@redhat.com>","In-Reply-To":"<20250609173539.1636916-1-mmichels@redhat.com>","References":"<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":"M_HU5JSMDKi6HTVigBKDbx92mUwthl2mJSLyIm_e-zs_1749490542","X-Mimecast-Originator":"redhat.com","Subject":"[ovs-dev] [PATCH ovn 02/14] lflow-mgr: Remove the ovn_datapath from\n ovn_lflow.","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":"The only part of the ovn_datapath the ovn_lflow uses is the southbound\ndatapath binding, so just use that.\n\nSigned-off-by: Mark Michelson <mmichels@redhat.com>\n---\n northd/lflow-mgr.c | 18 ++++++++++--------\n 1 file changed, 10 insertions(+), 8 deletions(-)","diff":"diff --git a/northd/lflow-mgr.c b/northd/lflow-mgr.c\nindex 88ce7ce56..a1e962ee2 100644\n--- a/northd/lflow-mgr.c\n+++ b/northd/lflow-mgr.c\n@@ -32,7 +32,8 @@ VLOG_DEFINE_THIS_MODULE(lflow_mgr);\n /* Static function declarations. */\n struct ovn_lflow;\n \n-static void ovn_lflow_init(struct ovn_lflow *, struct ovn_datapath *od,\n+static void ovn_lflow_init(struct ovn_lflow *,\n+                           const struct sbrec_datapath_binding *sb_dp,\n                            size_t dp_bitmap_len, enum ovn_stage stage,\n                            uint16_t priority, char *match,\n                            char *actions, char *io_port,\n@@ -161,7 +162,7 @@ extern struct ovs_mutex fake_hash_mutex;\n struct ovn_lflow {\n     struct hmap_node hmap_node;\n \n-    struct ovn_datapath *od;     /* 'logical_datapath' in SB schema.  */\n+    const struct sbrec_datapath_binding *sb_dp;\n     unsigned long *dpg_bitmap;   /* Bitmap of all datapaths by their 'index'.*/\n     enum ovn_stage stage;\n     uint16_t priority;\n@@ -855,14 +856,15 @@ lflow_hash_lock_destroy(void)\n \n /* static functions. */\n static void\n-ovn_lflow_init(struct ovn_lflow *lflow, struct ovn_datapath *od,\n+ovn_lflow_init(struct ovn_lflow *lflow,\n+               const struct sbrec_datapath_binding *sb_dp,\n                size_t dp_bitmap_len, enum ovn_stage stage, uint16_t priority,\n                char *match, char *actions, char *io_port, char *ctrl_meter,\n                char *stage_hint, const char *where,\n                const char *flow_desc)\n {\n     lflow->dpg_bitmap = bitmap_allocate(dp_bitmap_len);\n-    lflow->od = od;\n+    lflow->sb_dp = sb_dp;\n     lflow->stage = stage;\n     lflow->priority = priority;\n     lflow->match = match;\n@@ -1038,10 +1040,10 @@ sync_lflow_to_sb(struct ovn_lflow *lflow,\n         size_t index = bitmap_scan(lflow->dpg_bitmap, true, 0,\n                                     n_datapaths);\n \n-        lflow->od = datapaths_array[index];\n+        lflow->sb_dp = datapaths_array[index]->sb;\n         lflow->dpg = NULL;\n     } else {\n-        lflow->od = NULL;\n+        lflow->sb_dp = NULL;\n     }\n \n     if (!sbflow) {\n@@ -1129,8 +1131,8 @@ sync_lflow_to_sb(struct ovn_lflow *lflow,\n         }\n     }\n \n-    if (lflow->od) {\n-        sbrec_logical_flow_set_logical_datapath(sbflow, lflow->od->sb);\n+    if (lflow->sb_dp) {\n+        sbrec_logical_flow_set_logical_datapath(sbflow, lflow->sb_dp);\n         sbrec_logical_flow_set_logical_dp_group(sbflow, NULL);\n     } else {\n         sbrec_logical_flow_set_logical_datapath(sbflow, NULL);\n","prefixes":["ovs-dev","02/14"]}