get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1524287,
    "url": "http://patchwork.ozlabs.org/api/patches/1524287/",
    "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20210903122148.826196-6-mark.d.gray@redhat.com/",
    "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": "<20210903122148.826196-6-mark.d.gray@redhat.com>",
    "list_archive_url": null,
    "date": "2021-09-03T12:21:46",
    "name": "[ovs-dev,v4,5/7] northd: Add n_nat_entries field to 'struct ovn_datapath'",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b774fc083bb1b3fe9cd3dde63edca98d7b91ff7a",
    "submitter": {
        "id": 79963,
        "url": "http://patchwork.ozlabs.org/api/people/79963/",
        "name": "Mark Gray",
        "email": "mark.d.gray@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20210903122148.826196-6-mark.d.gray@redhat.com/mbox/",
    "series": [
        {
            "id": 260884,
            "url": "http://patchwork.ozlabs.org/api/series/260884/",
            "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=260884",
            "date": "2021-09-03T12:21:41",
            "name": "northd: Split northd and northd incremental processing framework",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/260884/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1524287/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1524287/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\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=GA7DN3Q7;\n\tdkim-atps=neutral",
            "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>)",
            "smtp4.osuosl.org (amavisd-new);\n dkim=pass (1024-bit key) header.d=redhat.com",
            "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mark.d.gray@redhat.com"
        ],
        "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 4H1H3n5zTbz9sSn\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  3 Sep 2021 22:22:13 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 3434583EBD;\n\tFri,  3 Sep 2021 12:22:11 +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 sZPW1naL3Stm; Fri,  3 Sep 2021 12:22:09 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id 93FE283EB3;\n\tFri,  3 Sep 2021 12:22:05 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 02E2FC002C;\n\tFri,  3 Sep 2021 12:22:04 +0000 (UTC)",
            "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 0D0A5C002C\n for <dev@openvswitch.org>; Fri,  3 Sep 2021 12:22:03 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id A78644268B\n for <dev@openvswitch.org>; Fri,  3 Sep 2021 12:22:02 +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 ljP7lvcWADAl for <dev@openvswitch.org>;\n Fri,  3 Sep 2021 12:22:02 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by smtp4.osuosl.org (Postfix) with ESMTPS id 1488542681\n for <dev@openvswitch.org>; Fri,  3 Sep 2021 12:22:01 +0000 (UTC)",
            "from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-84-LBsKjxvRNgSdyonSoJCQLA-1; Fri, 03 Sep 2021 08:22:00 -0400",
            "by mail-wm1-f72.google.com with SMTP id\n p11-20020a05600c204b00b002f05aff1663so1905124wmg.2\n for <dev@openvswitch.org>; Fri, 03 Sep 2021 05:22:00 -0700 (PDT)",
            "from wsfd-netdev91.ntdv.lab.eng.bos.redhat.com\n (nat-pool-bos-t.redhat.com. [66.187.233.206])\n by smtp.gmail.com with ESMTPSA id a6sm4836612wrh.97.2021.09.03.05.21.57\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 03 Sep 2021 05:21:57 -0700 (PDT)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.8.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1630671721;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc: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=Sp8x3dtKml/WyXQNjvWlnsQMLij5XU2NHJQMDkn1ScM=;\n b=GA7DN3Q7w7EfBcB70QTX4jvKf0OwMIcQ6BgZg2c0yWHDKM6KmWheJ9famjz06735JpA3qy\n 4yBvpbuZdYo0OzYlZtMzFd3be6tW161+rIN9RpJIbz1Rl1bax/UZ+14FEhr1zxH3/Lx3So\n VJ758dd6LsfbqGGut8bS5pqyGvYNhS0=",
        "X-MC-Unique": "LBsKjxvRNgSdyonSoJCQLA-1",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=Sp8x3dtKml/WyXQNjvWlnsQMLij5XU2NHJQMDkn1ScM=;\n b=Q+a2A7NIrTCXWHmK1DCFkurxbUM2yDdHY9SRjLpYqtMwu8L1V7j4dXsbWuK6FoAzm+\n PKXUt/s0Tdsiz1dRCjFRjXEsdHd70SqyxFf7bJhGOKff2ic977Hou2zHApCOxH5AchyT\n ztZLg8EyxFNgRZoJfLqR7KgE37LsWos0MDBiHSLvJfkVPQpzh9tZ8G8VzbMnjGzbNRep\n 6D0+O5zyl8ptzlRth+ZXU5Uczj8rezGaFHkELvgkzpgDvCM3RF3hMy1qtZr3ZFXJ5bSk\n p2MW8irmRkdB9o3HSh5jpBPrlgMJ82Sk1Xtrm151l2QOBC073SgQa5Brs0QtbupRgPyX\n xR9A==",
        "X-Gm-Message-State": "AOAM532xP8tG10bMWKibvtHopgb0A01qOiCoiC7oCgGbjQdV/73bAKr+\n MwfEif1msD78yIM48eL9HVMiIKkI9vdj8FYu4EYEuu2IuQt2OHphGskdj4jcyx3mtlLSe8eirgu\n WGkI2G0H4wTgHUbXeVEQnFP27GjLqJ8ymj1NPo2rK20yWs96fPNJD326O/Sa2arYD4ftl",
        "X-Received": [
            "by 2002:a1c:5401:: with SMTP id i1mr103126wmb.156.1630671718825;\n Fri, 03 Sep 2021 05:21:58 -0700 (PDT)",
            "by 2002:a1c:5401:: with SMTP id i1mr103072wmb.156.1630671718088;\n Fri, 03 Sep 2021 05:21:58 -0700 (PDT)"
        ],
        "X-Google-Smtp-Source": "\n ABdhPJz/CwieCnHjisUrE2MmUaOhGfTR10blnHXRJoUtyfYfjguZUc5j0ZH64Zam+m6l5FdseYR44g==",
        "From": "Mark Gray <mark.d.gray@redhat.com>",
        "To": "dev@openvswitch.org",
        "Date": "Fri,  3 Sep 2021 08:21:46 -0400",
        "Message-Id": "<20210903122148.826196-6-mark.d.gray@redhat.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210903122148.826196-1-mark.d.gray@redhat.com>",
        "References": "<20210903122148.826196-1-mark.d.gray@redhat.com>",
        "MIME-Version": "1.0",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Cc": "numans@redhat.com",
        "Subject": "[ovs-dev] [PATCH ovn v4 5/7] northd: Add n_nat_entries field to\n\t'struct ovn_datapath'",
        "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": "destroy_nat_entries() iterates over nat_entries using the\nnumber of NAT entries from the NB database. When using I-P,\nthis behaviour is incorrect as the number of NAT entries in\nthe NBDB may differ from that stored in 'struct ovn_datapath'\ncausing unexpected behaviour.\n\nSigned-off-by: Mark Gray <mark.d.gray@redhat.com>\n---\n northd/northd.c | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/northd/northd.c b/northd/northd.c\nindex 724baa3994d5..829c4479f14b 100644\n--- a/northd/northd.c\n+++ b/northd/northd.c\n@@ -605,6 +605,8 @@ struct ovn_datapath {\n \n     /* NAT entries configured on the router. */\n     struct ovn_nat *nat_entries;\n+    size_t n_nat_entries;\n+\n     bool has_distributed_nat;\n \n     /* Set of nat external ips on the router. */\n@@ -789,6 +791,7 @@ init_nat_entries(struct ovn_datapath *od)\n             od->has_distributed_nat = true;\n         }\n     }\n+    od->n_nat_entries = od->nbr->n_nat;\n }\n \n static void\n@@ -802,7 +805,7 @@ destroy_nat_entries(struct ovn_datapath *od)\n     destroy_lport_addresses(&od->dnat_force_snat_addrs);\n     destroy_lport_addresses(&od->lb_force_snat_addrs);\n \n-    for (size_t i = 0; i < od->nbr->n_nat; i++) {\n+    for (size_t i = 0; i < od->n_nat_entries; i++) {\n         destroy_lport_addresses(&od->nat_entries[i].ext_addrs);\n     }\n }\n",
    "prefixes": [
        "ovs-dev",
        "v4",
        "5/7"
    ]
}