get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 815175,
    "url": "http://patchwork.ozlabs.org/api/patches/815175/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170918210711.10202-4-fw@strlen.de/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170918210711.10202-4-fw@strlen.de>",
    "list_archive_url": null,
    "date": "2017-09-18T21:07:10",
    "name": "[net-next,3/4] test_rhashtable: add a check for max_size",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "13c6a4b4fc0184e4d21480e333c41c80812d96e0",
    "submitter": {
        "id": 1025,
        "url": "http://patchwork.ozlabs.org/api/people/1025/?format=api",
        "name": "Florian Westphal",
        "email": "fw@strlen.de"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170918210711.10202-4-fw@strlen.de/mbox/",
    "series": [
        {
            "id": 3736,
            "url": "http://patchwork.ozlabs.org/api/series/3736/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=3736",
            "date": "2017-09-18T21:07:07",
            "name": "test_rhashtable: add test case for rhl table",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/3736/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/815175/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/815175/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xwz8q4vvZz9s7p\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 19 Sep 2017 07:07:07 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751465AbdIRVHG (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 18 Sep 2017 17:07:06 -0400",
            "from Chamillionaire.breakpoint.cc ([146.0.238.67]:51760 \"EHLO\n\tChamillionaire.breakpoint.cc\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1750972AbdIRVHE (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 18 Sep 2017 17:07:04 -0400",
            "from fw by Chamillionaire.breakpoint.cc with local (Exim 4.84_2)\n\t(envelope-from <fw@breakpoint.cc>)\n\tid 1du3Cm-0008C3-BD; Mon, 18 Sep 2017 23:03:48 +0200"
        ],
        "From": "Florian Westphal <fw@strlen.de>",
        "To": "<netdev@vger.kernel.org>",
        "Cc": "Florian Westphal <fw@strlen.de>",
        "Subject": "[PATCH net-next 3/4] test_rhashtable: add a check for max_size",
        "Date": "Mon, 18 Sep 2017 23:07:10 +0200",
        "Message-Id": "<20170918210711.10202-4-fw@strlen.de>",
        "X-Mailer": "git-send-email 2.13.5",
        "In-Reply-To": "<20170918210711.10202-1-fw@strlen.de>",
        "References": "<20170918210711.10202-1-fw@strlen.de>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "add a test that tries to insert more than max_size elements.\n\nSigned-off-by: Florian Westphal <fw@strlen.de>\n---\n lib/test_rhashtable.c | 41 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 41 insertions(+)",
    "diff": "diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c\nindex 69f5b3849980..1eee90e6e394 100644\n--- a/lib/test_rhashtable.c\n+++ b/lib/test_rhashtable.c\n@@ -246,6 +246,43 @@ static s64 __init test_rhashtable(struct rhashtable *ht, struct test_obj *array,\n \n static struct rhashtable ht;\n \n+static int __init test_rhashtable_max(struct test_obj *array,\n+\t\t\t\t      unsigned int entries)\n+{\n+\tunsigned int i, insert_retries = 0;\n+\tint err;\n+\n+\ttest_rht_params.max_size = roundup_pow_of_two(entries / 8);\n+\terr = rhashtable_init(&ht, &test_rht_params);\n+\tif (err)\n+\t\treturn err;\n+\n+\tfor (i = 0; i < ht.max_elems; i++) {\n+\t\tstruct test_obj *obj = &array[i];\n+\n+\t\tobj->value.id = i * 2;\n+\t\terr = insert_retry(&ht, obj, test_rht_params);\n+\t\tif (err > 0)\n+\t\t\tinsert_retries += err;\n+\t\telse if (err)\n+\t\t\treturn err;\n+\t}\n+\n+\terr = insert_retry(&ht, &array[ht.max_elems], test_rht_params);\n+\tif (err == -E2BIG) {\n+\t\terr = 0;\n+\t} else {\n+\t\tpr_info(\"insert element %u should have failed with %d, got %d\\n\",\n+\t\t\t\tht.max_elems, -E2BIG, err);\n+\t\tif (err == 0)\n+\t\t\terr = -1;\n+\t}\n+\n+\trhashtable_destroy(&ht);\n+\n+\treturn err;\n+}\n+\n static int thread_lookup_test(struct thread_data *tdata)\n {\n \tunsigned int entries = tdata->entries;\n@@ -386,7 +423,11 @@ static int __init test_rht_init(void)\n \t\ttotal_time += time;\n \t}\n \n+\tpr_info(\"test if its possible to exceed max_size %d: %s\\n\",\n+\t\t\ttest_rht_params.max_size, test_rhashtable_max(objs, entries) == 0 ?\n+\t\t\t\"no, ok\" : \"YES, failed\");\n \tvfree(objs);\n+\n \tdo_div(total_time, runs);\n \tpr_info(\"Average test time: %llu\\n\", total_time);\n \n",
    "prefixes": [
        "net-next",
        "3/4"
    ]
}