get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2095631/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2095631,
    "url": "http://patchwork.ozlabs.org/api/patches/2095631/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20250609173539.1636916-6-mmichels@redhat.com/",
    "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": "<20250609173539.1636916-6-mmichels@redhat.com>",
    "list_archive_url": null,
    "date": "2025-06-09T17:35:24",
    "name": "[ovs-dev,05/14] lflow_mgr: Pass dp_groups to sync_lflow_to_sb().",
    "commit_ref": null,
    "pull_url": null,
    "state": "deferred",
    "archived": false,
    "hash": "db39c0664ab11796b26a1e8c5ff77672772caa86",
    "submitter": {
        "id": 71978,
        "url": "http://patchwork.ozlabs.org/api/people/71978/?format=api",
        "name": "Mark Michelson",
        "email": "mmichels@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20250609173539.1636916-6-mmichels@redhat.com/mbox/",
    "series": [
        {
            "id": 460139,
            "url": "http://patchwork.ozlabs.org/api/series/460139/?format=api",
            "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/2095631/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/2095631/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=PNKrOb/o;\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=PNKrOb/o",
            "smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com",
            "smtp3.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=PNKrOb/o"
        ],
        "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 4bGJww1rLfz1yZ1\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Jun 2025 03:35:44 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 4166F8208B;\n\tMon,  9 Jun 2025 17:35:56 +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 FROONzK_WcUT; Mon,  9 Jun 2025 17:35:52 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id 4935482047;\n\tMon,  9 Jun 2025 17:35:52 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 0029DC0AC6;\n\tMon,  9 Jun 2025 17:35:52 +0000 (UTC)",
            "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 95F29C0ACA\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:48 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 7ADB4613CE\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:48 +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 eVJPRGHRtn9X for <dev@openvswitch.org>;\n Mon,  9 Jun 2025 17:35:47 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 958D461424\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:47 +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-653-Za5y4MP3OBmXrcd6NZYhew-1; Mon,\n 09 Jun 2025 13:35:45 -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 B3F961809C97\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:44 +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 4370818002B2\n for <dev@openvswitch.org>; Mon,  9 Jun 2025 17:35:44 +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 smtp1.osuosl.org 4935482047",
            "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 958D461424"
        ],
        "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 smtp3.osuosl.org 958D461424",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1749490546;\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=bxCnCrmp06d1deuNP/b0jyrnLQpPh2mZfjbS2bvHdnk=;\n b=PNKrOb/owrG+1fLEumv7MYQcPJL3bHhbyPk80Mt6x5/4DJKZxSAdgfNhD8hMf8JP0da+w1\n d226PNhiOWB8JHIWRxlA56x79q8Ttz4AOgVIsbV2/p9Sd9PZXpWS7SZBV069JLkrDQBuTf\n zS43I6GPxnKdS1Ew4v1hX85mBeKZTUo=",
        "X-MC-Unique": "Za5y4MP3OBmXrcd6NZYhew-1",
        "X-Mimecast-MFC-AGG-ID": "Za5y4MP3OBmXrcd6NZYhew_1749490544",
        "To": "dev@openvswitch.org",
        "Date": "Mon,  9 Jun 2025 13:35:24 -0400",
        "Message-ID": "<20250609173539.1636916-6-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": "pzlSd3aitsN5UUA2a3x7Eu8ZPqGonbugfxC_hN28BN4_1749490544",
        "X-Mimecast-Originator": "redhat.com",
        "Subject": "[ovs-dev] [PATCH ovn 05/14] lflow_mgr: Pass dp_groups to\n sync_lflow_to_sb().",
        "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": "We were passing the lflow_table, but the only part of the lflow table we\nneeded was the dp_groups, so just pass that instead.\n\nSigned-off-by: Mark Michelson <mmichels@redhat.com>\n---\n northd/lflow-mgr.c | 28 ++++++++++++++++------------\n 1 file changed, 16 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/northd/lflow-mgr.c b/northd/lflow-mgr.c\nindex b41eb1d87..fcedbfe43 100644\n--- a/northd/lflow-mgr.c\n+++ b/northd/lflow-mgr.c\n@@ -89,7 +89,7 @@ static bool lflow_ref_sync_lflows__(\n     const struct sbrec_logical_dp_group_table *);\n static bool sync_lflow_to_sb(struct ovn_lflow *,\n                              struct ovsdb_idl_txn *ovnsb_txn,\n-                             struct lflow_table *,\n+                             struct hmap *dp_groups,\n                              const struct ovn_datapaths *datapaths,\n                              bool ovn_internal_version_changed,\n                              const struct sbrec_logical_flow *sbflow,\n@@ -311,8 +311,15 @@ lflow_table_sync_to_sb(struct lflow_table *lflow_table,\n             sbflow->controller_meter, sbflow->hash);\n         if (lflow) {\n             const struct ovn_datapaths *datapaths;\n-            datapaths = dp_type == DP_SWITCH ? ls_datapaths : lr_datapaths;\n-            sync_lflow_to_sb(lflow, ovnsb_txn, lflow_table, datapaths,\n+            struct hmap *dp_groups;\n+            if (dp_type == DP_SWITCH) {\n+                datapaths = ls_datapaths;\n+                dp_groups = &lflow_table->ls_dp_groups;\n+            } else {\n+                datapaths = lr_datapaths;\n+                dp_groups = &lflow_table->lr_dp_groups;\n+            }\n+            sync_lflow_to_sb(lflow, ovnsb_txn, dp_groups, datapaths,\n                              ovn_internal_version_changed,\n                              sbflow, dpgrp_table);\n \n@@ -326,12 +333,15 @@ lflow_table_sync_to_sb(struct lflow_table *lflow_table,\n \n     HMAP_FOR_EACH_SAFE (lflow, hmap_node, lflows) {\n         const struct ovn_datapaths *datapaths;\n+        struct hmap *dp_groups;\n         if (ovn_stage_to_datapath_type(lflow->stage) == DP_SWITCH) {\n             datapaths = ls_datapaths;\n+            dp_groups = &lflow_table->ls_dp_groups;\n         } else {\n             datapaths = lr_datapaths;\n+            dp_groups = &lflow_table->lr_dp_groups;\n         }\n-        sync_lflow_to_sb(lflow, ovnsb_txn, lflow_table, datapaths,\n+        sync_lflow_to_sb(lflow, ovnsb_txn, dp_groups, datapaths,\n                          ovn_internal_version_changed, NULL, dpgrp_table);\n \n         hmap_remove(lflows, &lflow->hmap_node);\n@@ -1008,7 +1018,7 @@ do_ovn_lflow_add(struct lflow_table *lflow_table, size_t dp_bitmap_len,\n static bool\n sync_lflow_to_sb(struct ovn_lflow *lflow,\n                  struct ovsdb_idl_txn *ovnsb_txn,\n-                 struct lflow_table *lflow_table,\n+                 struct hmap *dp_groups,\n                  const struct ovn_datapaths *datapaths,\n                  bool ovn_internal_version_changed,\n                  const struct sbrec_logical_flow *sbflow,\n@@ -1017,16 +1027,10 @@ sync_lflow_to_sb(struct ovn_lflow *lflow,\n     struct sbrec_logical_dp_group *sbrec_dp_group = NULL;\n     struct ovn_dp_group *pre_sync_dpg = lflow->dpg;\n     struct ovn_datapath **datapaths_array;\n-    struct hmap *dp_groups;\n     size_t n_datapaths;\n \n     n_datapaths = ods_size(datapaths);\n     datapaths_array = datapaths->array;\n-    if (ovn_stage_to_datapath_type(lflow->stage) == DP_SWITCH) {\n-        dp_groups = &lflow_table->ls_dp_groups;\n-    } else {\n-        dp_groups = &lflow_table->lr_dp_groups;\n-    }\n \n     lflow->n_ods = bitmap_count1(lflow->dpg_bitmap, n_datapaths);\n     ovs_assert(lflow->n_ods);\n@@ -1301,7 +1305,7 @@ lflow_ref_sync_lflows__(struct lflow_ref  *lflow_ref,\n         size_t n_ods = bitmap_count1(lflow->dpg_bitmap, n_datapaths);\n \n         if (n_ods) {\n-            if (!sync_lflow_to_sb(lflow, ovnsb_txn, lflow_table, datapaths,\n+            if (!sync_lflow_to_sb(lflow, ovnsb_txn, dp_groups, datapaths,\n                                   ovn_internal_version_changed, sblflow,\n                                   dpgrp_table)) {\n                 return false;\n",
    "prefixes": [
        "ovs-dev",
        "05/14"
    ]
}