get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1529662,
    "url": "http://patchwork.ozlabs.org/api/patches/1529662/",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/1631968964-11390-3-git-send-email-wenxu@ucloud.cn/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/projects/47/",
        "name": "Open vSwitch",
        "link_name": "openvswitch",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "git@github.com:openvswitch/ovs.git",
        "webscm_url": "https://github.com/openvswitch/ovs",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1631968964-11390-3-git-send-email-wenxu@ucloud.cn>",
    "list_archive_url": null,
    "date": "2021-09-18T12:42:43",
    "name": "[ovs-dev,v5,2/3] conntrack: select correct sport range for well-known origin sport",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "29e81fbe85e3edd838163ee660f04623260e9171",
    "submitter": {
        "id": 67928,
        "url": "http://patchwork.ozlabs.org/api/people/67928/",
        "name": "wenxu",
        "email": "wenxu@ucloud.cn"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/1631968964-11390-3-git-send-email-wenxu@ucloud.cn/mbox/",
    "series": [
        {
            "id": 262934,
            "url": "http://patchwork.ozlabs.org/api/series/262934/",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=262934",
            "date": "2021-09-18T12:42:42",
            "name": "conntrack port selection optimization",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/262934/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1529662/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1529662/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@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 4HBVpw4b42z9ssD\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Sep 2021 22:43:04 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id C365D84398;\n\tSat, 18 Sep 2021 12:43:01 +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 kt6ekXyUBv66; Sat, 18 Sep 2021 12:43:00 +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 8854684390;\n\tSat, 18 Sep 2021 12:42:59 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 43CF9C002D;\n\tSat, 18 Sep 2021 12:42:56 +0000 (UTC)",
            "from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id C2400C000F\n for <dev@openvswitch.org>; Sat, 18 Sep 2021 12:42:53 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id B16FE400FC\n for <dev@openvswitch.org>; Sat, 18 Sep 2021 12:42:53 +0000 (UTC)",
            "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id hodeN_w_QCbA for <dev@openvswitch.org>;\n Sat, 18 Sep 2021 12:42:51 +0000 (UTC)",
            "from mail-m2456.qiye.163.com (mail-m2456.qiye.163.com\n [220.194.24.56])\n by smtp2.osuosl.org (Postfix) with ESMTPS id 519BE401F2\n for <dev@openvswitch.org>; Sat, 18 Sep 2021 12:42:50 +0000 (UTC)",
            "from localhost.localdomain (unknown [117.50.0.204])\n by mail-m2456.qiye.163.com (Hmail) with ESMTPA id 9632E700142;\n Sat, 18 Sep 2021 20:42:45 +0800 (CST)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.8.0",
        "From": "wenxu@ucloud.cn",
        "To": "i.maximets@ovn.org,\n\tpvalerio@redhat.com,\n\taconole@redhat.com",
        "Date": "Sat, 18 Sep 2021 20:42:43 +0800",
        "Message-Id": "<1631968964-11390-3-git-send-email-wenxu@ucloud.cn>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1631968964-11390-1-git-send-email-wenxu@ucloud.cn>",
        "References": "<1631968964-11390-1-git-send-email-wenxu@ucloud.cn>",
        "X-HM-Spam-Status": "e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZCBgUCR5ZQVlLVUtZV1\n kWDxoPAgseWUFZKDYvK1lXWShZQUlCN1dZLVlBSVdZDwkaFQgSH1lBWUNDH0lWGkxKSB4fSx5MSU\n 5JVRkRExYaEhckFA4PWVdZFhoPEhUdFFlBWVVLWQY+",
        "X-HM-Sender-Digest": "e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PTo6NSo*PzNKKwM1LxMtTQ4R\n NE1PCw9VSlVKTUhKQk1DQk1OTENLVTMWGhIXVQweFQMOOw4YFxQOH1UYFUVZV1kSC1lBWUpKTFVO\n S1VLVUlLT1lXWQgBWUFKQkJJNwY+",
        "X-HM-Tid": "0a7bf8ee33fc8c15kuqt9632e700142",
        "Cc": "dev@openvswitch.org",
        "Subject": "[ovs-dev] [PATCH v5 2/3] conntrack: select correct sport range for\n\twell-known origin sport",
        "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>",
        "MIME-Version": "1.0",
        "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: wenxu <wenxu@ucloud.cn>\n\nLike the kernel datapath. The sport nat range for well-konwn origin\nsport should limit in the well-known ports.\n\nSigned-off-by: wenxu <wenxu@ucloud.cn>\n---\n lib/conntrack.c | 12 ++++++++++--\n 1 file changed, 10 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/conntrack.c b/lib/conntrack.c\nindex 76c466c..52b5211 100644\n--- a/lib/conntrack.c\n+++ b/lib/conntrack.c\n@@ -2265,8 +2265,16 @@ set_sport_range(const struct nat_action_info_t *ni, const struct conn_key *k,\n     if (((ni->nat_action & NAT_ACTION_SNAT_ALL) == NAT_ACTION_SRC) ||\n         ((ni->nat_action & NAT_ACTION_DST))) {\n         *curr = ntohs(k->src.port);\n-        *min = MIN_NAT_EPHEMERAL_PORT;\n-        *max = MAX_NAT_EPHEMERAL_PORT;\n+        if (*curr < 512) {\n+            *min = 1;\n+            *max = 511;\n+        } else if (*curr < 1024) {\n+            *min = 600;\n+            *max = 1023;\n+        } else {\n+            *min = MIN_NAT_EPHEMERAL_PORT;\n+            *max = MAX_NAT_EPHEMERAL_PORT;\n+        }\n     } else {\n         *min = ni->min_port;\n         *max = ni->max_port;\n",
    "prefixes": [
        "ovs-dev",
        "v5",
        "2/3"
    ]
}