get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808827,
    "url": "http://patchwork.ozlabs.org/api/patches/808827/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170901165357.465121-5-yhs@fb.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": "<20170901165357.465121-5-yhs@fb.com>",
    "list_archive_url": null,
    "date": "2017-09-01T16:53:57",
    "name": "[net-next,4/4] bpf: add a test case for helper bpf_perf_prog_read_time",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "33342da549447ce02fa375bdad42a8b1b9a12a72",
    "submitter": {
        "id": 71628,
        "url": "http://patchwork.ozlabs.org/api/people/71628/?format=api",
        "name": "Yonghong Song",
        "email": "yhs@fb.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/20170901165357.465121-5-yhs@fb.com/mbox/",
    "series": [
        {
            "id": 1077,
            "url": "http://patchwork.ozlabs.org/api/series/1077/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1077",
            "date": "2017-09-01T16:53:53",
            "name": "bpf: add two helpers to read perf event enabled/running time",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1077/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808827/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808827/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 (1024-bit key;\n\tunprotected) header.d=fb.com header.i=@fb.com header.b=\"nCx80SoR\";\n\tdkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xkQLz2Dtdz9t2x\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat,  2 Sep 2017 02:54:19 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752392AbdIAQyQ (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 1 Sep 2017 12:54:16 -0400",
            "from mx0b-00082601.pphosted.com ([67.231.153.30]:53989 \"EHLO\n\tmx0a-00082601.pphosted.com\" rhost-flags-OK-OK-OK-FAIL)\n\tby vger.kernel.org with ESMTP id S1752292AbdIAQx7 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 1 Sep 2017 12:53:59 -0400",
            "from pps.filterd (m0001255.ppops.net [127.0.0.1])\n\tby mx0b-00082601.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv81GpjL2020992\n\tfor <netdev@vger.kernel.org>; Fri, 1 Sep 2017 09:53:59 -0700",
            "from mail.thefacebook.com ([199.201.64.23])\n\tby mx0b-00082601.pphosted.com with ESMTP id 2cq176jkjq-1\n\t(version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT)\n\tfor <netdev@vger.kernel.org>; Fri, 01 Sep 2017 09:53:59 -0700",
            "from mx-out.facebook.com (192.168.52.123) by\n\tPRN-CHUB05.TheFacebook.com (192.168.16.15) with Microsoft SMTP Server\n\tid 14.3.319.2; Fri, 1 Sep 2017 09:53:58 -0700",
            "by devbig474.prn1.facebook.com (Postfix, from userid 128203)  id\n\tEDFD646E03FC; Fri,  1 Sep 2017 09:53:57 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com;\n\th=from : to : cc : subject\n\t: date : message-id : in-reply-to : references : mime-version :\n\tcontent-type; s=facebook;\n\tbh=heBT0ukdQnndVX6e6IXqvB6vjhEo+qnoBej1PsPw5po=; \n\tb=nCx80SoRPdaxsN3FPPFX9Mpb2cvd4PL89gAcEKCO4Afl/GW1/J/xBNu0wFeNrLSfcLEo\n\tqLeAXZJLhXCe048be0+7CmNHGQJGc91DQ78DXtV5zFp3t0Mqp0QLGiMTbPHbTsWNzfEM\n\tugfbYagzyrsyh7xmXwVcxwD/kHCPmHh0lb4= ",
        "X-ThriftRelayHost": "devbig474.prn1.facebook.com",
        "Smtp-Origin-Hostprefix": "devbig",
        "From": "Yonghong Song <yhs@fb.com>",
        "Smtp-Origin-Hostname": "devbig474.prn1.facebook.com",
        "To": "<peterz@infradead.org>, <rostedt@goodmis.org>, <ast@fb.com>,\n\t<daniel@iogearbox.net>, <netdev@vger.kernel.org>",
        "CC": "<kernel-team@fb.com>",
        "Smtp-Origin-Cluster": "prn1c29",
        "Subject": "[PATCH net-next 4/4] bpf: add a test case for helper\n\tbpf_perf_prog_read_time",
        "Date": "Fri, 1 Sep 2017 09:53:57 -0700",
        "Message-ID": "<20170901165357.465121-5-yhs@fb.com>",
        "X-Mailer": "git-send-email 2.9.5",
        "In-Reply-To": "<20170901165357.465121-1-yhs@fb.com>",
        "References": "<20170901165357.465121-1-yhs@fb.com>",
        "X-FB-Internal": [
            "Safe",
            "Safe"
        ],
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-Spam-Reason": "safe",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-01_04:, , signatures=0",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "The bpf sample program trace_event is enhanced to use the new\nhelper to print out enabled/running time.\n\nSigned-off-by: Yonghong Song <yhs@fb.com>\n---\n samples/bpf/trace_event_kern.c            | 5 +++++\n tools/testing/selftests/bpf/bpf_helpers.h | 3 +++\n 2 files changed, 8 insertions(+)",
    "diff": "diff --git a/samples/bpf/trace_event_kern.c b/samples/bpf/trace_event_kern.c\nindex 41b6115..f372660 100644\n--- a/samples/bpf/trace_event_kern.c\n+++ b/samples/bpf/trace_event_kern.c\n@@ -37,8 +37,10 @@ struct bpf_map_def SEC(\"maps\") stackmap = {\n SEC(\"perf_event\")\n int bpf_prog1(struct bpf_perf_event_data *ctx)\n {\n+\tchar time_fmt[] = \"Time Enabled: %lld, Time Running: %lld\";\n \tchar fmt[] = \"CPU-%d period %lld ip %llx\";\n \tu32 cpu = bpf_get_smp_processor_id();\n+\tstruct bpf_perf_time time_buf;\n \tstruct key_t key;\n \tu64 *val, one = 1;\n \n@@ -54,6 +56,9 @@ int bpf_prog1(struct bpf_perf_event_data *ctx)\n \t\treturn 0;\n \t}\n \n+\tbpf_perf_prog_read_time(ctx, (void *)&time_buf, sizeof(struct bpf_perf_time));\n+\tbpf_trace_printk(time_fmt, sizeof(time_fmt), time_buf.enabled, time_buf.running);\n+\n \tval = bpf_map_lookup_elem(&counts, &key);\n \tif (val)\n \t\t(*val)++;\ndiff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h\nindex fe41852..ddad690 100644\n--- a/tools/testing/selftests/bpf/bpf_helpers.h\n+++ b/tools/testing/selftests/bpf/bpf_helpers.h\n@@ -74,6 +74,9 @@ static int (*bpf_perf_read_counter_time)(void *map, unsigned long long flags,\n \t\t\t\t       void *counter_time_buf,\n \t\t\t\t       unsigned int buf_size) =\n \t(void *) BPF_FUNC_perf_read_counter_time;\n+static int (*bpf_perf_prog_read_time)(void *ctx, void *time_buf,\n+\t\t\t\t      unsigned int size) =\n+\t(void *) BPF_FUNC_perf_prog_read_time;\n \n \n /* llvm builtin functions that eBPF C program may use to\n",
    "prefixes": [
        "net-next",
        "4/4"
    ]
}