get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1525573,
    "url": "http://patchwork.ozlabs.org/api/patches/1525573/",
    "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20210907224516.489604-9-blp@ovn.org/",
    "project": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/projects/68/",
        "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": "<20210907224516.489604-9-blp@ovn.org>",
    "list_archive_url": null,
    "date": "2021-09-07T22:45:14",
    "name": "[ovs-dev,v2,08/10] ovn-northd-ddlog: Intern strings before joining when possible.",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "619c7702b02c6850628d96323d28054934d998a5",
    "submitter": {
        "id": 67603,
        "url": "http://patchwork.ozlabs.org/api/people/67603/",
        "name": "Ben Pfaff",
        "email": "blp@ovn.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20210907224516.489604-9-blp@ovn.org/mbox/",
    "series": [
        {
            "id": 261352,
            "url": "http://patchwork.ozlabs.org/api/series/261352/",
            "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=261352",
            "date": "2021-09-07T22:45:06",
            "name": "3x performance improvement for ddlog with load balancer benchmark",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/261352/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1525573/comments/",
    "check": "fail",
    "checks": "http://patchwork.ozlabs.org/api/patches/1525573/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@bilbo.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.138; helo=smtp1.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
        "Received": [
            "from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4H40jd0Cnlz9t10\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  8 Sep 2021 08:45:57 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 53F1182C91;\n\tTue,  7 Sep 2021 22:45:54 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n\tby localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id z8H5stLmFYPG; Tue,  7 Sep 2021 22:45:52 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id 3AC1680C16;\n\tTue,  7 Sep 2021 22:45:49 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 73B21C0030;\n\tTue,  7 Sep 2021 22:45:43 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 7CA35C000D\n for <dev@openvswitch.org>; Tue,  7 Sep 2021 22:45:41 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 1CDCA404C6\n for <dev@openvswitch.org>; Tue,  7 Sep 2021 22:45:40 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id v_nJexRVMvXx for <dev@openvswitch.org>;\n Tue,  7 Sep 2021 22:45:39 +0000 (UTC)",
            "from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net\n [217.70.183.201])\n by smtp4.osuosl.org (Postfix) with ESMTPS id A88F740491\n for <dev@openvswitch.org>; Tue,  7 Sep 2021 22:45:38 +0000 (UTC)",
            "(Authenticated sender: blp@ovn.org)\n by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 5E65A1BF204;\n Tue,  7 Sep 2021 22:45:36 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.8.0",
        "From": "Ben Pfaff <blp@ovn.org>",
        "To": "dev@openvswitch.org",
        "Date": "Tue,  7 Sep 2021 15:45:14 -0700",
        "Message-Id": "<20210907224516.489604-9-blp@ovn.org>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20210907224516.489604-1-blp@ovn.org>",
        "References": "<20210907224516.489604-1-blp@ovn.org>",
        "MIME-Version": "1.0",
        "Cc": "Ben Pfaff <blp@ovn.org>",
        "Subject": "[ovs-dev] [PATCH ovn v2 08/10] ovn-northd-ddlog: Intern strings\n\tbefore joining when possible.",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.15",
        "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": "By interning earlier, we do less copying across the joins with\nRouter and Switch, because DDlog always copies by value and\ncopying an interned string is cheap.\n\nSigned-off-by: Ben Pfaff <blp@ovn.org>\n---\n northd/ovn_northd.dl | 57 +++++++++++++++++++++++---------------------\n 1 file changed, 30 insertions(+), 27 deletions(-)",
    "diff": "diff --git a/northd/ovn_northd.dl b/northd/ovn_northd.dl\nindex 5af41fa22..1bf1e5333 100644\n--- a/northd/ovn_northd.dl\n+++ b/northd/ovn_northd.dl\n@@ -3216,14 +3216,14 @@ function build_lb_vip_actions(lbvip: Intern<LBVIP>,\n Flow(.logical_datapath = sw._uuid,\n      .stage            = s_SWITCH_IN_STATEFUL(),\n      .priority         = priority,\n-     .__match          = __match.intern(),\n-     .actions          = actions.intern(),\n+     .__match          = __match,\n+     .actions          = actions,\n      .io_port          = None,\n      .controller_meter = meter,\n      .stage_hint       = 0) :-\n     LBVIPWithStatus(lbvip@&LBVIP{.lb = lb}, up_backends),\n     var priority = if (lbvip.vip_port != 0) { 120 } else { 110 },\n-    (var actions, var reject) = {\n+    (var actions0, var reject) = {\n         /* Store the original destination IP to be used when generating\n          * hairpin flows.\n          */\n@@ -3243,7 +3243,8 @@ Flow(.logical_datapath = sw._uuid,\n \n         build_lb_vip_actions(lbvip, up_backends, s_SWITCH_OUT_QOS_MARK(), actions0 ++ actions1)\n     },\n-    var __match = \"ct.new && \" ++ get_match_for_lb_key(lbvip.vip_addr, lbvip.vip_port, lb.protocol, false, false, false),\n+    var actions = actions0.intern(),\n+    var __match = (\"ct.new && \" ++ get_match_for_lb_key(lbvip.vip_addr, lbvip.vip_port, lb.protocol, false, false, false)).intern(),\n     sw in &Switch(),\n     sw.load_balancer.contains(lb._uuid),\n     var meter = if (reject) {\n@@ -4610,10 +4611,10 @@ Flow(.logical_datapath = sw._uuid,\n      .stage_hint       = stage_hint(sp.lsp._uuid),\n      .io_port          = None,\n      .controller_meter = None) :-\n+    var mc_flood_l2 = json_escape(mC_FLOOD_L2().0),\n     sp in &SwitchPort(.sw = sw, .peer = Some{rp@&RouterPort{.enabled = true}}),\n     &SwitchPortARPForwards(.port = sp, .reachable_ips_v4 = ips_v4),\n-    var ipv4 = FlatMap(ips_v4),\n-    var mc_flood_l2 = json_escape(mC_FLOOD_L2().0).\n+    var ipv4 = FlatMap(ips_v4).\n Flow(.logical_datapath = sw._uuid,\n      .stage            = s_SWITCH_IN_L2_LKUP(),\n      .priority         = 80,\n@@ -4627,35 +4628,35 @@ Flow(.logical_datapath = sw._uuid,\n      .stage_hint       = stage_hint(sp.lsp._uuid),\n      .io_port          = None,\n      .controller_meter = None) :-\n+    var mc_flood_l2 = json_escape(mC_FLOOD_L2().0),\n     sp in &SwitchPort(.sw = sw, .peer = Some{rp@&RouterPort{.enabled = true}}),\n     &SwitchPortARPForwards(.port = sp, .reachable_ips_v6 = ips_v6),\n-    var ipv6 = FlatMap(ips_v6),\n-    var mc_flood_l2 = json_escape(mC_FLOOD_L2().0).\n+    var ipv6 = FlatMap(ips_v6).\n \n Flow(.logical_datapath = sw._uuid,\n      .stage            = s_SWITCH_IN_L2_LKUP(),\n      .priority         = 90,\n      .__match          = i\"${fLAGBIT_NOT_VXLAN()} && arp.op == 1 && arp.tpa == ${ipv4}\",\n-     .actions          = i\"outport = ${flood}; output;\",\n+     .actions          = actions,\n      .stage_hint       = 0,\n      .io_port          = None,\n      .controller_meter = None) :-\n+    var actions = i\"outport = ${json_escape(mC_FLOOD().0)}; output;\",\n     sp in &SwitchPort(.sw = sw, .peer = Some{rp@&RouterPort{.enabled = true}}),\n     &SwitchPortARPForwards(.port = sp, .unreachable_ips_v4 = ips_v4),\n-    var ipv4 = FlatMap(ips_v4),\n-    var flood = json_escape(mC_FLOOD().0).\n+    var ipv4 = FlatMap(ips_v4).\n Flow(.logical_datapath = sw._uuid,\n      .stage            = s_SWITCH_IN_L2_LKUP(),\n      .priority         = 90,\n      .__match          = i\"${fLAGBIT_NOT_VXLAN()} && nd_ns && nd.target == ${ipv6}\",\n-     .actions          = i\"outport = ${flood}; output;\",\n+     .actions          = actions,\n      .stage_hint       = stage_hint(sp.lsp._uuid),\n      .io_port          = None,\n      .controller_meter = None) :-\n+    var actions = i\"outport = ${json_escape(mC_FLOOD().0)}; output;\",\n     sp in &SwitchPort(.sw = sw, .peer = Some{rp@&RouterPort{.enabled = true}}),\n     &SwitchPortARPForwards(.port = sp, .unreachable_ips_v6 = ips_v6),\n-    var ipv6 = FlatMap(ips_v6),\n-    var flood = json_escape(mC_FLOOD().0).\n+    var ipv6 = FlatMap(ips_v6).\n \n for (SwitchPortNewDynamicAddress(.port = &SwitchPort{.lsp = lsp, .json_name = json_name, .sw = sw},\n                                  .address = Some{addrs})\n@@ -6701,7 +6702,7 @@ Flow(.logical_datapath = r._uuid,\n Flow(.logical_datapath = r._uuid,\n      .stage            = s_ROUTER_IN_DNAT(),\n      .priority         = prio,\n-     .__match          = __match.intern(),\n+     .__match          = __match,\n      .actions          = actions,\n      .stage_hint       = 0,\n      .io_port          = None,\n@@ -6718,13 +6719,13 @@ Flow(.logical_datapath = r._uuid,\n         \"\"\n     },\n     var prio = if (port != 0) { 120 } else { 110 },\n-    var match0 = \"ct.est && \" ++ match1 ++ match2 ++ \" && ct_label.natted == 1\",\n+    var match0 = (\"ct.est && \" ++ match1 ++ match2 ++ \" && ct_label.natted == 1\").intern(),\n     r in &Router(),\n     not r.l3dgw_ports.is_empty() or r.is_gateway,\n     r.load_balancer.contains(lb._uuid),\n-    var __match = match0 ++ match ((r.l3dgw_ports.nth(0), lbvip.backend_ips != i\"\" or lb.options.get_bool_def(i\"reject\", false))) {\n-            (Some {var gw_port}, true) -> \" && is_chassis_resident(${json_escape(chassis_redirect_name(gw_port.name))})\",\n-            _ -> \"\"\n+    var __match = match ((r.l3dgw_ports.nth(0), lbvip.backend_ips != i\"\" or lb.options.get_bool_def(i\"reject\", false))) {\n+            (Some {var gw_port}, true) -> i\"${match0} && is_chassis_resident(${json_escape(chassis_redirect_name(gw_port.name))})\",\n+            _ -> match0\n         },\n     var actions = match (snat_for_lb(r.options, lb)) {\n         SkipSNAT -> i\"flags.skip_snat_for_lb = 1; next;\",\n@@ -6827,27 +6828,29 @@ Flow(.logical_datapath = r._uuid,\n Flow(.logical_datapath = r._uuid,\n      .stage            = s_ROUTER_IN_DNAT(),\n      .priority         = priority,\n-     .__match          = __match.intern(),\n-     .actions          = actions.intern(),\n+     .__match          = __match,\n+     .actions          = actions,\n      .io_port          = None,\n      .controller_meter = meter,\n      .stage_hint       = 0) :-\n     LBVIPWithStatus(lbvip@&LBVIP{.lb = lb}, up_backends),\n     var priority = if (lbvip.vip_port != 0) 120 else 110,\n     (var actions0, var reject) = build_lb_vip_actions(lbvip, up_backends, s_ROUTER_OUT_SNAT(), \"\"),\n+    var actions1 = actions0.intern(),\n     var match0 = \"ct.new && \" ++\n         get_match_for_lb_key(lbvip.vip_addr, lbvip.vip_port, lb.protocol, true, true, true),\n+    var match1 = match0.intern(),\n     r in &Router(),\n     r.l3dgw_ports.len() > 0 or r.is_gateway,\n     r.load_balancer.contains(lb._uuid),\n     var actions = match ((reject, snat_for_lb(r.options, lb))) {\n-        (false, SkipSNAT) -> \"flags.skip_snat_for_lb = 1; \",\n-        (false, ForceSNAT) -> \"flags.force_snat_for_lb = 1; \",\n-        _ -> \"\"\n-    } ++ actions0,\n+        (false, SkipSNAT) -> i\"flags.skip_snat_for_lb = 1; ${actions1}\",\n+        (false, ForceSNAT) -> i\"flags.force_snat_for_lb = 1; ${actions1}\",\n+        _ -> actions1\n+    },\n     var __match = match (r.l3dgw_ports.nth(0)) {\n-        Some{gw_port} -> \"${match0} && is_chassis_resident(${json_escape(chassis_redirect_name(gw_port.name))})\",\n-        _ -> match0\n+        Some{gw_port} -> i\"${match1} && is_chassis_resident(${json_escape(chassis_redirect_name(gw_port.name))})\",\n+        _ -> match1\n     },\n     var meter = if (reject) {\n         r.copp.get(cOPP_REJECT())\n",
    "prefixes": [
        "ovs-dev",
        "v2",
        "08/10"
    ]
}