get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 815940,
    "url": "http://patchwork.ozlabs.org/api/patches/815940/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170919232709.14690-3-edumazet@google.com/",
    "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": "<20170919232709.14690-3-edumazet@google.com>",
    "list_archive_url": null,
    "date": "2017-09-19T23:27:04",
    "name": "[v2,net-next,2/7] kobject: copy env blob in one go",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "46b7f8482bd2765e61cb865465631fd425e90ecd",
    "submitter": {
        "id": 13357,
        "url": "http://patchwork.ozlabs.org/api/people/13357/?format=api",
        "name": "Eric Dumazet",
        "email": "edumazet@google.com"
    },
    "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/20170919232709.14690-3-edumazet@google.com/mbox/",
    "series": [
        {
            "id": 3987,
            "url": "http://patchwork.ozlabs.org/api/series/3987/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=3987",
            "date": "2017-09-19T23:27:02",
            "name": "net: speedup netns create/delete time",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/3987/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/815940/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/815940/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>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"TRkIXkEv\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xxfD964gTz9sPr\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 20 Sep 2017 09:27:21 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751722AbdISX1U (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 19 Sep 2017 19:27:20 -0400",
            "from mail-pg0-f41.google.com ([74.125.83.41]:47873 \"EHLO\n\tmail-pg0-f41.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751619AbdISX1S (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 19 Sep 2017 19:27:18 -0400",
            "by mail-pg0-f41.google.com with SMTP id d8so675490pgt.4\n\tfor <netdev@vger.kernel.org>; Tue, 19 Sep 2017 16:27:17 -0700 (PDT)",
            "from localhost ([2620:15c:2cb:201:58bc:17b0:6372:1d5f])\n\tby smtp.gmail.com with ESMTPSA id\n\t72sm5334474pfj.102.2017.09.19.16.27.16\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tTue, 19 Sep 2017 16:27:16 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=google.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=/DRYr3B/EYZ677PMfEaLYMwAChuX2oMu0c9/fIaCpkc=;\n\tb=TRkIXkEvtwaxqnmo9k46BhkFt7iP2c3k1zJmwxADW1skQbLXtVdBbxbwXeVsEm2h20\n\tW5nVef+jcMVxmD5IM0tpjnyyTuX+mKwiHNAakG6e2SaZsEJa0tLL0nywz2aypx2w6XzS\n\t7iWfFUWAaS9+Zjd6jM3G9Ot4deRs49grDju/PWri4gekMWL5KlnEsIn3JZKnohHVqmB+\n\tETeBgezZ1jTi00udNOWM2RylGPbsdS/l9MVlJvPSXKqytPeu02QmiOiw+zH0ycAxxq8p\n\tp26/iqK5qsFujSpmSmCmX4ntu40t8PmXVxMO1L36rRxVFhnS5e4aYNg0GM0Bq0nBMWv/\n\tNqkQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=/DRYr3B/EYZ677PMfEaLYMwAChuX2oMu0c9/fIaCpkc=;\n\tb=qYXiHtZIfyLAFJjd9WIy5iURxzbWTErEg21XQTBretoG57v4Hs7oBSwHRMOjtvm0RX\n\tlMge8cWUNZgIHRwKewQcVSataQC+Gem8xe7NDarH9xUqYWDUwaUXr84tGIoJdhO94AUw\n\t3qiWDoxLEW0au8eFNahlPi1dmrahSeX4Duaw0n+qv8G7EISdxbrNEVRpo2V+horzQDDQ\n\tFajcMxRBJS27NeVgnAyKyts424wG7Klx61v8nJRC68/W/cfsYeqzNx+4+5b/UzcbSKit\n\tarik10G6Y+76Qa8+/4DVLM+OT1MdvLcJJZqw5LJHyo5AuUuylkSTYDYOxxIF6j/pFTY9\n\tmU0Q==",
        "X-Gm-Message-State": "AHPjjUgbiOmuOgagrQJX7l/HcUOCIIBGnc33SIBmYCgmQw7gDOGurTMo\n\t8eY24dbytIQeXMki8dCW8hqvjQ==",
        "X-Google-Smtp-Source": "AOwi7QDleHmokhwdGW2YNVDxY83PS74+RVGw+d/xBq4mSu/ObuXdHVjpYSzL8eMRg6p6xGAG9f10WA==",
        "X-Received": "by 10.159.244.24 with SMTP id x24mr219471plr.434.1505863637069; \n\tTue, 19 Sep 2017 16:27:17 -0700 (PDT)",
        "From": "Eric Dumazet <edumazet@google.com>",
        "To": "\"David S . Miller\" <davem@davemloft.net>",
        "Cc": "netdev <netdev@vger.kernel.org>,\n\t\"Eric W . Biederman\" <ebiederm@xmission.com>,\n\tEric Dumazet <edumazet@google.com>, Eric Dumazet <eric.dumazet@gmail.com>",
        "Subject": "[PATCH v2 net-next 2/7] kobject: copy env blob in one go",
        "Date": "Tue, 19 Sep 2017 16:27:04 -0700",
        "Message-Id": "<20170919232709.14690-3-edumazet@google.com>",
        "X-Mailer": "git-send-email 2.14.1.690.gbb1197296e-goog",
        "In-Reply-To": "<20170919232709.14690-1-edumazet@google.com>",
        "References": "<20170919232709.14690-1-edumazet@google.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "No need to iterate over strings, just copy in one efficient memcpy() call.\n\nTested:\ntime perf record \"(for f in `seq 1 3000` ; do ip netns add tast$f; done)\"\n[ perf record: Woken up 10 times to write data ]\n[ perf record: Captured and wrote 8.224 MB perf.data (~359301 samples) ]\n\nreal    0m52.554s  # instead of 1m7.492s\nuser    0m0.309s\nsys 0m51.375s # instead of 1m6.875s\n\n     9.88%       ip  [kernel.kallsyms]  [k] netlink_broadcast_filtered\n     8.86%       ip  [kernel.kallsyms]  [k] string\n     7.37%       ip  [kernel.kallsyms]  [k] __ip6addrlbl_add\n     5.68%       ip  [kernel.kallsyms]  [k] netlink_has_listeners\n     5.52%       ip  [kernel.kallsyms]  [k] memcpy_erms\n     4.76%       ip  [kernel.kallsyms]  [k] __alloc_skb\n     4.54%       ip  [kernel.kallsyms]  [k] vsnprintf\n     3.94%       ip  [kernel.kallsyms]  [k] format_decode\n     3.80%       ip  [kernel.kallsyms]  [k] kmem_cache_alloc_node_trace\n     3.71%       ip  [kernel.kallsyms]  [k] kmem_cache_alloc_node\n     3.66%       ip  [kernel.kallsyms]  [k] kobject_uevent_env\n     3.38%       ip  [kernel.kallsyms]  [k] strlen\n     2.65%       ip  [kernel.kallsyms]  [k] _raw_spin_lock_irqsave\n     2.20%       ip  [kernel.kallsyms]  [k] kfree\n     2.09%       ip  [kernel.kallsyms]  [k] memset_erms\n     2.07%       ip  [kernel.kallsyms]  [k] ___cache_free\n     1.95%       ip  [kernel.kallsyms]  [k] kmem_cache_free\n     1.91%       ip  [kernel.kallsyms]  [k] _raw_read_lock\n     1.45%       ip  [kernel.kallsyms]  [k] ksize\n     1.25%       ip  [kernel.kallsyms]  [k] _raw_spin_unlock_irqrestore\n     1.00%       ip  [kernel.kallsyms]  [k] widen_string\n\nSigned-off-by: Eric Dumazet <edumazet@google.com>\n---\n lib/kobject_uevent.c | 8 +-------\n 1 file changed, 1 insertion(+), 7 deletions(-)",
    "diff": "diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c\nindex 4f48cc3b11d566e44c4115cc7716bc3b1cdf96df..78b2a7e378c0deda3b32b1178d7f44203702c3f2 100644\n--- a/lib/kobject_uevent.c\n+++ b/lib/kobject_uevent.c\n@@ -317,18 +317,12 @@ static int kobject_uevent_net_broadcast(struct kobject *kobj,\n \t\tskb = alloc_skb(len + env->buflen, GFP_KERNEL);\n \t\tif (skb) {\n \t\t\tchar *scratch;\n-\t\t\tint i;\n \n \t\t\t/* add header */\n \t\t\tscratch = skb_put(skb, len);\n \t\t\tsprintf(scratch, \"%s@%s\", action_string, devpath);\n \n-\t\t\t/* copy keys to our continuous event payload buffer */\n-\t\t\tfor (i = 0; i < env->envp_idx; i++) {\n-\t\t\t\tlen = strlen(env->envp[i]) + 1;\n-\t\t\t\tscratch = skb_put(skb, len);\n-\t\t\t\tstrcpy(scratch, env->envp[i]);\n-\t\t\t}\n+\t\t\tskb_put_data(skb, env->buf, env->buflen);\n \n \t\t\tNETLINK_CB(skb).dst_group = 1;\n \t\t\tretval = netlink_broadcast_filtered(uevent_sock, skb,\n",
    "prefixes": [
        "v2",
        "net-next",
        "2/7"
    ]
}