get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1525476,
    "url": "http://patchwork.ozlabs.org/api/patches/1525476/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20210907171507.1617879-1-numans@ovn.org/",
    "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": "<20210907171507.1617879-1-numans@ovn.org>",
    "list_archive_url": null,
    "date": "2021-09-07T17:15:07",
    "name": "[ovs-dev] controller: Fall back to full recompute of pflow_output for vtep lport changes.",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0438f5bd3bf7aedbc883510308e151837c923ea7",
    "submitter": {
        "id": 77669,
        "url": "http://patchwork.ozlabs.org/api/people/77669/?format=api",
        "name": "Numan Siddique",
        "email": "numans@ovn.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20210907171507.1617879-1-numans@ovn.org/mbox/",
    "series": [
        {
            "id": 261319,
            "url": "http://patchwork.ozlabs.org/api/series/261319/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=261319",
            "date": "2021-09-07T17:15:07",
            "name": "[ovs-dev] controller: Fall back to full recompute of pflow_output for vtep lport changes.",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/261319/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1525476/comments/",
    "check": "fail",
    "checks": "http://patchwork.ozlabs.org/api/patches/1525476/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=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
        "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 RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4H3sNQ4k20z9sRN\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  8 Sep 2021 03:15:33 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id D9194403DC;\n\tTue,  7 Sep 2021 17:15:29 +0000 (UTC)",
            "from smtp4.osuosl.org ([127.0.0.1])\n\tby localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id yQQL9kj1tDvk; Tue,  7 Sep 2021 17:15:29 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org\n [IPv6:2605:bc80:3010:104::8cd3:938])\n\tby smtp4.osuosl.org (Postfix) with ESMTPS id 31B92403DD;\n\tTue,  7 Sep 2021 17:15:28 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 05CEBC0011;\n\tTue,  7 Sep 2021 17:15:28 +0000 (UTC)",
            "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 29850C000D\n for <dev@openvswitch.org>; Tue,  7 Sep 2021 17:15:26 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 192F881D34\n for <dev@openvswitch.org>; Tue,  7 Sep 2021 17:15:26 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id aCXOZOMHbCkS for <dev@openvswitch.org>;\n Tue,  7 Sep 2021 17:15:25 +0000 (UTC)",
            "from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n [217.70.183.194])\n by smtp1.osuosl.org (Postfix) with ESMTPS id A300A81826\n for <dev@openvswitch.org>; Tue,  7 Sep 2021 17:15:24 +0000 (UTC)",
            "(Authenticated sender: numans@ovn.org)\n by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 7C3124000A;\n Tue,  7 Sep 2021 17:15:20 +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": "numans@ovn.org",
        "To": "dev@openvswitch.org",
        "Date": "Tue,  7 Sep 2021 13:15:07 -0400",
        "Message-Id": "<20210907171507.1617879-1-numans@ovn.org>",
        "X-Mailer": "git-send-email 2.31.1",
        "MIME-Version": "1.0",
        "Subject": "[ovs-dev] [PATCH ovn] controller: Fall back to full recompute of\n\tpflow_output for vtep lport changes.",
        "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": "From: Numan Siddique <numans@ovn.org>\n\nWhen a vtep logical port changes, necessary flows are not added as\nexpected.  This is because the function physical_handle_flows_for_lport()\nin physical.c does not add flows required for vtep logical ports.\nThese flows are added by physical_run(). So fall back to full recompute\nof pflow_output engine node when vtep lports change.\n\nReported-by: Odintsov Vladislav <VlOdintsov@croc.ru>\nReported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2021-September/387435.html\nSigned-off-by: Numan Siddique <numans@ovn.org>\n---\n controller/ovn-controller.c | 11 ++++++++---\n controller/physical.c       |  9 ++++++++-\n controller/physical.h       |  2 +-\n 3 files changed, 17 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c\nindex 0031a1035..d98ebbbfa 100644\n--- a/controller/ovn-controller.c\n+++ b/controller/ovn-controller.c\n@@ -2867,7 +2867,10 @@ pflow_output_sb_port_binding_handler(struct engine_node *node,\n     const struct sbrec_port_binding *pb;\n     SBREC_PORT_BINDING_TABLE_FOR_EACH_TRACKED (pb, p_ctx.port_binding_table) {\n         bool removed = sbrec_port_binding_is_deleted(pb);\n-        physical_handle_flows_for_lport(pb, removed, &p_ctx, &pfo->flow_table);\n+        if (!physical_handle_flows_for_lport(pb, removed, &p_ctx,\n+                                             &pfo->flow_table)) {\n+            return false;\n+        }\n     }\n \n     engine_set_node_state(node, EN_UPDATED);\n@@ -2930,8 +2933,10 @@ pflow_output_runtime_data_handler(struct engine_node *node, void *data)\n             struct tracked_lport *lport = shash_node->data;\n             bool removed =\n                 lport->tracked_type == TRACKED_RESOURCE_REMOVED ? true: false;\n-            physical_handle_flows_for_lport(lport->pb, removed, &p_ctx,\n-                                            &pfo->flow_table);\n+            if (!physical_handle_flows_for_lport(lport->pb, removed, &p_ctx,\n+                                                 &pfo->flow_table)) {\n+                return false;\n+            }\n         }\n     }\n \ndiff --git a/controller/physical.c b/controller/physical.c\nindex 6f2c1cea0..ffb9f9952 100644\n--- a/controller/physical.c\n+++ b/controller/physical.c\n@@ -1509,11 +1509,16 @@ consider_mc_group(enum mf_field_id mff_ovn_geneve,\n     sset_destroy(&remote_chassis);\n }\n \n-void\n+bool\n physical_handle_flows_for_lport(const struct sbrec_port_binding *pb,\n                                 bool removed, struct physical_ctx *p_ctx,\n                                 struct ovn_desired_flow_table *flow_table)\n {\n+    if (!strcmp(pb->type, \"vtep\")) {\n+        /* Cannot handle changes to vtep lports (yet). */\n+        return false;\n+    }\n+\n     ofctrl_remove_flows(flow_table, &pb->header_.uuid);\n \n     if (!strcmp(pb->type, \"external\")) {\n@@ -1553,6 +1558,8 @@ physical_handle_flows_for_lport(const struct sbrec_port_binding *pb,\n                               p_ctx->chassis, flow_table, &ofpacts);\n         ofpbuf_uninit(&ofpacts);\n     }\n+\n+    return true;\n }\n \n void\ndiff --git a/controller/physical.h b/controller/physical.h\nindex c4540ad7f..ee4b1ae1f 100644\n--- a/controller/physical.h\n+++ b/controller/physical.h\n@@ -65,7 +65,7 @@ void physical_run(struct physical_ctx *,\n                   struct ovn_desired_flow_table *);\n void physical_handle_mc_group_changes(struct physical_ctx *,\n                                       struct ovn_desired_flow_table *);\n-void physical_handle_flows_for_lport(const struct sbrec_port_binding *,\n+bool physical_handle_flows_for_lport(const struct sbrec_port_binding *,\n                                      bool removed,\n                                      struct physical_ctx *,\n                                      struct ovn_desired_flow_table *);\n",
    "prefixes": [
        "ovs-dev"
    ]
}