get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808217,
    "url": "http://patchwork.ozlabs.org/api/patches/808217/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1504180422.15310.12.camel@edumazet-glaptop3.roam.corp.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": "<1504180422.15310.12.camel@edumazet-glaptop3.roam.corp.google.com>",
    "list_archive_url": null,
    "date": "2017-08-31T11:53:42",
    "name": "[net-next] x86: bpf_jit: small optimization in emit_bpf_tail_call()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "05407d8143fc850a1d94c72d430e6dc2ab83f80e",
    "submitter": {
        "id": 2404,
        "url": "http://patchwork.ozlabs.org/api/people/2404/?format=api",
        "name": "Eric Dumazet",
        "email": "eric.dumazet@gmail.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/1504180422.15310.12.camel@edumazet-glaptop3.roam.corp.google.com/mbox/",
    "series": [
        {
            "id": 808,
            "url": "http://patchwork.ozlabs.org/api/series/808/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=808",
            "date": "2017-08-31T11:53:42",
            "name": "[net-next] x86: bpf_jit: small optimization in emit_bpf_tail_call()",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/808/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808217/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808217/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=gmail.com header.i=@gmail.com\n\theader.b=\"GoG45FA/\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjgkh6H9Jz9s81\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 21:53:48 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751325AbdHaLxr (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 31 Aug 2017 07:53:47 -0400",
            "from mail-io0-f194.google.com ([209.85.223.194]:33168 \"EHLO\n\tmail-io0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750893AbdHaLxp (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 31 Aug 2017 07:53:45 -0400",
            "by mail-io0-f194.google.com with SMTP id f99so1167861ioi.0\n\tfor <netdev@vger.kernel.org>; Thu, 31 Aug 2017 04:53:45 -0700 (PDT)",
            "from [192.168.86.171] (c-67-180-167-114.hsd1.ca.comcast.net.\n\t[67.180.167.114]) by smtp.googlemail.com with ESMTPSA id\n\tk28sm3690044iod.48.2017.08.31.04.53.43\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 31 Aug 2017 04:53:44 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=message-id:subject:from:to:cc:date:mime-version\n\t:content-transfer-encoding;\n\tbh=WwO12FZtQnyuh+fFMfiQ2iihxcfYIIcLqbCfD1Wu/PI=;\n\tb=GoG45FA/CSdWfPo0I+v4zBvhJUfYXtgd8K0nhVUe/SOrR23uV2Mrxu99l5QXMUu62O\n\tJ6IHiKEK9c3dE2tuY32DeNLcQ/g/29uMIcMM5S4qKuCpwMD27Mn6Ga/Rhe2DBpy+qjiz\n\tCcMLjJSJZ7ulJR4kl9VnFeKZOlxI7IC2wBWQ3pNVD8HDXBD0fMkE/ZolzEb6VoyKyNgB\n\tMTe8aPq3+MdTwdhL33meFJuYoip1/t3etUZTw+eV9sI4Ke9TyLzlqf50gpZeK/Eyvek+\n\tcVBSbl+MmLsQYMQggMKeXxbnDhewP3sCnrfdZVPi0T1UlYe7o3sq3uIedjXbZLhVTj0S\n\tjajw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:message-id:subject:from:to:cc:date:mime-version\n\t:content-transfer-encoding;\n\tbh=WwO12FZtQnyuh+fFMfiQ2iihxcfYIIcLqbCfD1Wu/PI=;\n\tb=Jt59ttgaHoByWv4MI/OOrAbMSSicf+CCN1vxLCp7rmHHkqC9jpZhQQsXu2EFihp8wz\n\t+fpSLP9uvmr+FoIgVDMPkrBq4fL7K7VnaljsdP7fRDHekD7FIP0hgm5f0X0Ho3o2QLN6\n\tozMm0BSWabV1iwrtd1hf5LqMNF8F4FHqvnH16yxI4i1usvjIMdGfr/HQt2HBIOFIbqEh\n\tFS51RMttgo/fIvDRa9n2q1AiX9wIvAFmlRnmI4FWYzv0EpfoIflp6Bh7LOzYrzmnnsoK\n\tKPmbvcCy3qxnFovh0YKCF0PwLNFxyqt99qpkbjFu4PPgsYOBPn1f9koK6MKuPI3X9d9F\n\tPIBQ==",
        "X-Gm-Message-State": "AHPjjUgAuGCixvq2toyGvxu0qRUVC8wXoteHC6bHvJIZXp4xD7ubuqef\n\to0pDDIBLV2ls5bBd",
        "X-Google-Smtp-Source": "ADKCNb4K7H95Im9dzi3tDRCYji5bNhLRzgqjmAvyaMYJT+9zXGWbhlHKGpyLAk3d8rtkxutIQU8FYw==",
        "X-Received": "by 10.107.128.86 with SMTP id b83mr4222399iod.266.1504180425062; \n\tThu, 31 Aug 2017 04:53:45 -0700 (PDT)",
        "Message-ID": "<1504180422.15310.12.camel@edumazet-glaptop3.roam.corp.google.com>",
        "Subject": "[PATCH net-next] x86: bpf_jit: small optimization in\n\temit_bpf_tail_call()",
        "From": "Eric Dumazet <eric.dumazet@gmail.com>",
        "To": "David Miller <davem@davemloft.net>",
        "Cc": "netdev <netdev@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,\n\tDaniel Borkmann <daniel@iogearbox.net>",
        "Date": "Thu, 31 Aug 2017 04:53:42 -0700",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "X-Mailer": "Evolution 3.10.4-0ubuntu2 ",
        "Mime-Version": "1.0",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "From: Eric Dumazet <edumazet@google.com>\n\nSaves 4 bytes replacing following instructions :\n\nlea rax, [rsi + rdx * 8 + offsetof(...)] \nmov rax, qword ptr [rax]\ncmp rax, 0\n\nby :\n\nmov rax, [rsi + rdx * 8 + offsetof(...)] \ntest rax, rax\n\nSigned-off-by: Eric Dumazet <edumazet@google.com>\nCc: Alexei Starovoitov <ast@kernel.org>\nCc: Daniel Borkmann <daniel@iogearbox.net>\n---\n arch/x86/net/bpf_jit_comp.c |    9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c\nindex 8194696e2805852a8246bf1db2a5862d5758f76b..7af5ee584bf8546f3c1b92df9d9f513416f2089d 100644\n--- a/arch/x86/net/bpf_jit_comp.c\n+++ b/arch/x86/net/bpf_jit_comp.c\n@@ -287,7 +287,7 @@ static void emit_bpf_tail_call(u8 **pprog)\n \tEMIT4(0x48, 0x8B, 0x46,                   /* mov rax, qword ptr [rsi + 16] */\n \t      offsetof(struct bpf_array, map.max_entries));\n \tEMIT3(0x48, 0x39, 0xD0);                  /* cmp rax, rdx */\n-#define OFFSET1 47 /* number of bytes to jump */\n+#define OFFSET1 43 /* number of bytes to jump */\n \tEMIT2(X86_JBE, OFFSET1);                  /* jbe out */\n \tlabel1 = cnt;\n \n@@ -296,21 +296,20 @@ static void emit_bpf_tail_call(u8 **pprog)\n \t */\n \tEMIT2_off32(0x8B, 0x85, 36);              /* mov eax, dword ptr [rbp + 36] */\n \tEMIT3(0x83, 0xF8, MAX_TAIL_CALL_CNT);     /* cmp eax, MAX_TAIL_CALL_CNT */\n-#define OFFSET2 36\n+#define OFFSET2 32\n \tEMIT2(X86_JA, OFFSET2);                   /* ja out */\n \tlabel2 = cnt;\n \tEMIT3(0x83, 0xC0, 0x01);                  /* add eax, 1 */\n \tEMIT2_off32(0x89, 0x85, 36);              /* mov dword ptr [rbp + 36], eax */\n \n \t/* prog = array->ptrs[index]; */\n-\tEMIT4_off32(0x48, 0x8D, 0x84, 0xD6,       /* lea rax, [rsi + rdx * 8 + offsetof(...)] */\n+\tEMIT4_off32(0x48, 0x8B, 0x84, 0xD6,       /* mov rax, [rsi + rdx * 8 + offsetof(...)] */\n \t\t    offsetof(struct bpf_array, ptrs));\n-\tEMIT3(0x48, 0x8B, 0x00);                  /* mov rax, qword ptr [rax] */\n \n \t/* if (prog == NULL)\n \t *   goto out;\n \t */\n-\tEMIT4(0x48, 0x83, 0xF8, 0x00);            /* cmp rax, 0 */\n+\tEMIT3(0x48, 0x85, 0xC0);\t\t  /* test rax,rax */\n #define OFFSET3 10\n \tEMIT2(X86_JE, OFFSET3);                   /* je out */\n \tlabel3 = cnt;\n",
    "prefixes": [
        "net-next"
    ]
}