get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1238803,
    "url": "http://patchwork.ozlabs.org/api/patches/1238803/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20200216193005.144157-3-jolsa@kernel.org/",
    "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": "<20200216193005.144157-3-jolsa@kernel.org>",
    "list_archive_url": null,
    "date": "2020-02-16T19:29:49",
    "name": "[02/18] bpf: Add bpf_trampoline_ name prefix for DECLARE_BPF_DISPATCHER",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "0c9c09223d6720f4327aef2ef33d31ad58cba0ca",
    "submitter": {
        "id": 73687,
        "url": "http://patchwork.ozlabs.org/api/people/73687/?format=api",
        "name": "Jiri Olsa",
        "email": "jolsa@kernel.org"
    },
    "delegate": {
        "id": 77147,
        "url": "http://patchwork.ozlabs.org/api/users/77147/?format=api",
        "username": "bpf",
        "first_name": "BPF",
        "last_name": "Maintainers",
        "email": "bpf@iogearbox.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20200216193005.144157-3-jolsa@kernel.org/mbox/",
    "series": [
        {
            "id": 158829,
            "url": "http://patchwork.ozlabs.org/api/series/158829/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=158829",
            "date": "2020-02-16T19:29:47",
            "name": "bpf: Add trampoline and dispatcher to /proc/kallsyms",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/158829/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1238803/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1238803/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming-netdev@ozlabs.org",
        "Delivered-To": "patchwork-incoming-netdev@ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org; spf=none (no SPF record)\n\tsmtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67;\n\thelo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=kernel.org"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 48LHJm5RJRz9sPK\n\tfor <patchwork-incoming-netdev@ozlabs.org>;\n\tMon, 17 Feb 2020 06:30:32 +1100 (AEDT)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1726802AbgBPTac convert rfc822-to-8bit (ORCPT\n\t<rfc822;patchwork-incoming-netdev@ozlabs.org>);\n\tSun, 16 Feb 2020 14:30:32 -0500",
            "from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:56824 \"EHLO\n\tus-smtp-1.mimecast.com\" rhost-flags-OK-OK-OK-FAIL) by\n\tvger.kernel.org with ESMTP id S1726723AbgBPTab (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sun, 16 Feb 2020 14:30:31 -0500",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n\t[209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n\tus-mta-383-OQ86rym9OeGCZhUZipWhkw-1; Sun, 16 Feb 2020 14:30:25 -0500",
            "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mimecast-mx01.redhat.com (Postfix) with ESMTPS id C0E448014D0;\n\tSun, 16 Feb 2020 19:30:23 +0000 (UTC)",
            "from krava.redhat.com (ovpn-204-28.brq.redhat.com [10.40.204.28])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id A50128574E;\n\tSun, 16 Feb 2020 19:30:18 +0000 (UTC)"
        ],
        "From": "Jiri Olsa <jolsa@kernel.org>",
        "To": "Alexei Starovoitov <ast@kernel.org>,\n\tDaniel Borkmann <daniel@iogearbox.net>",
        "Cc": "netdev@vger.kernel.org, bpf@vger.kernel.org, Andrii Nakryiko\n\t<andriin@fb.com>, Yonghong Song <yhs@fb.com>, Song Liu\n\t<songliubraving@fb.com>,         Martin KaFai Lau <kafai@fb.com>,\n\tJakub Kicinski <kuba@kernel.org>, David Miller <davem@redhat.com>,\n\t=?utf-8?b?QmrDtnJuIFTDtnBlbA==?= <bjorn.topel@intel.com>,\n\tJohn Fastabend <john.fastabend@gmail.com>, Jesper Dangaard Brouer\n\t<hawk@kernel.org>,         Arnaldo Carvalho de Melo <acme@redhat.com>",
        "Subject": "[PATCH 02/18] bpf: Add bpf_trampoline_ name prefix for\n\tDECLARE_BPF_DISPATCHER",
        "Date": "Sun, 16 Feb 2020 20:29:49 +0100",
        "Message-Id": "<20200216193005.144157-3-jolsa@kernel.org>",
        "In-Reply-To": "<20200216193005.144157-1-jolsa@kernel.org>",
        "References": "<20200216193005.144157-1-jolsa@kernel.org>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11",
        "X-MC-Unique": "OQ86rym9OeGCZhUZipWhkw-1",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "kernel.org",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8BIT",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "From: Björn Töpel <bjorn.topel@intel.com>\n\nAdding bpf_trampoline_ name prefix for DECLARE_BPF_DISPATCHER,\nso all the dispatchers have the common name prefix.\n\nAnd also a small '_' cleanup for bpf_dispatcher_nopfunc function\nname.\n\nSigned-off-by: Björn Töpel <bjorn.topel@intel.com>\nSigned-off-by: Jiri Olsa <jolsa@kernel.org>\n---\n include/linux/bpf.h    | 21 +++++++++++----------\n include/linux/filter.h |  7 +++----\n net/core/filter.c      |  5 ++---\n 3 files changed, 16 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/include/linux/bpf.h b/include/linux/bpf.h\nindex 49b1a70e12c8..be7afccc9459 100644\n--- a/include/linux/bpf.h\n+++ b/include/linux/bpf.h\n@@ -512,7 +512,7 @@ struct bpf_dispatcher {\n \tu32 image_off;\n };\n \n-static __always_inline unsigned int bpf_dispatcher_nopfunc(\n+static __always_inline unsigned int bpf_dispatcher_nop_func(\n \tconst void *ctx,\n \tconst struct bpf_insn *insnsi,\n \tunsigned int (*bpf_func)(const void *,\n@@ -527,7 +527,7 @@ int bpf_trampoline_unlink_prog(struct bpf_prog *prog);\n void bpf_trampoline_put(struct bpf_trampoline *tr);\n #define BPF_DISPATCHER_INIT(name) {\t\t\t\\\n \t.mutex = __MUTEX_INITIALIZER(name.mutex),\t\\\n-\t.func = &name##func,\t\t\t\t\\\n+\t.func = &name##_func,\t\t\t\t\\\n \t.progs = {},\t\t\t\t\t\\\n \t.num_progs = 0,\t\t\t\t\t\\\n \t.image = NULL,\t\t\t\t\t\\\n@@ -535,7 +535,7 @@ void bpf_trampoline_put(struct bpf_trampoline *tr);\n }\n \n #define DEFINE_BPF_DISPATCHER(name)\t\t\t\t\t\\\n-\tnoinline unsigned int name##func(\t\t\t\t\\\n+\tnoinline unsigned int bpf_dispatcher_##name##_func(\t\t\\\n \t\tconst void *ctx,\t\t\t\t\t\\\n \t\tconst struct bpf_insn *insnsi,\t\t\t\t\\\n \t\tunsigned int (*bpf_func)(const void *,\t\t\t\\\n@@ -543,17 +543,18 @@ void bpf_trampoline_put(struct bpf_trampoline *tr);\n \t{\t\t\t\t\t\t\t\t\\\n \t\treturn bpf_func(ctx, insnsi);\t\t\t\t\\\n \t}\t\t\t\t\t\t\t\t\\\n-\tEXPORT_SYMBOL(name##func);\t\t\t\\\n-\tstruct bpf_dispatcher name = BPF_DISPATCHER_INIT(name);\n+\tEXPORT_SYMBOL(bpf_dispatcher_##name##_func);\t\t\t\\\n+\tstruct bpf_dispatcher bpf_dispatcher_##name =\t\t\t\\\n+\t\tBPF_DISPATCHER_INIT(bpf_dispatcher_##name);\n #define DECLARE_BPF_DISPATCHER(name)\t\t\t\t\t\\\n-\tunsigned int name##func(\t\t\t\t\t\\\n+\tunsigned int bpf_dispatcher_##name##_func(\t\t\t\\\n \t\tconst void *ctx,\t\t\t\t\t\\\n \t\tconst struct bpf_insn *insnsi,\t\t\t\t\\\n \t\tunsigned int (*bpf_func)(const void *,\t\t\t\\\n \t\t\t\t\t const struct bpf_insn *));\t\\\n-\textern struct bpf_dispatcher name;\n-#define BPF_DISPATCHER_FUNC(name) name##func\n-#define BPF_DISPATCHER_PTR(name) (&name)\n+\textern struct bpf_dispatcher bpf_dispatcher_##name;\n+#define BPF_DISPATCHER_FUNC(name) bpf_dispatcher_##name##_func\n+#define BPF_DISPATCHER_PTR(name) (&bpf_dispatcher_##name)\n void bpf_dispatcher_change_prog(struct bpf_dispatcher *d, struct bpf_prog *from,\n \t\t\t\tstruct bpf_prog *to);\n struct bpf_image {\n@@ -579,7 +580,7 @@ static inline int bpf_trampoline_unlink_prog(struct bpf_prog *prog)\n static inline void bpf_trampoline_put(struct bpf_trampoline *tr) {}\n #define DEFINE_BPF_DISPATCHER(name)\n #define DECLARE_BPF_DISPATCHER(name)\n-#define BPF_DISPATCHER_FUNC(name) bpf_dispatcher_nopfunc\n+#define BPF_DISPATCHER_FUNC(name) bpf_dispatcher_nop_func\n #define BPF_DISPATCHER_PTR(name) NULL\n static inline void bpf_dispatcher_change_prog(struct bpf_dispatcher *d,\n \t\t\t\t\t      struct bpf_prog *from,\ndiff --git a/include/linux/filter.h b/include/linux/filter.h\nindex f349e2c0884c..eafe72644282 100644\n--- a/include/linux/filter.h\n+++ b/include/linux/filter.h\n@@ -577,7 +577,7 @@ DECLARE_STATIC_KEY_FALSE(bpf_stats_enabled_key);\n \tret; })\n \n #define BPF_PROG_RUN(prog, ctx) __BPF_PROG_RUN(prog, ctx,\t\t\\\n-\t\t\t\t\t       bpf_dispatcher_nopfunc)\n+\t\t\t\t\t       bpf_dispatcher_nop_func)\n \n #define BPF_SKB_CB_LEN QDISC_CB_PRIV_LEN\n \n@@ -701,7 +701,7 @@ static inline u32 bpf_prog_run_clear_cb(const struct bpf_prog *prog,\n \treturn res;\n }\n \n-DECLARE_BPF_DISPATCHER(bpf_dispatcher_xdp)\n+DECLARE_BPF_DISPATCHER(xdp)\n \n static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog,\n \t\t\t\t\t    struct xdp_buff *xdp)\n@@ -712,8 +712,7 @@ static __always_inline u32 bpf_prog_run_xdp(const struct bpf_prog *prog,\n \t * already takes rcu_read_lock() when fetching the program, so\n \t * it's not necessary here anymore.\n \t */\n-\treturn __BPF_PROG_RUN(prog, xdp,\n-\t\t\t      BPF_DISPATCHER_FUNC(bpf_dispatcher_xdp));\n+\treturn __BPF_PROG_RUN(prog, xdp, BPF_DISPATCHER_FUNC(xdp));\n }\n \n void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog);\ndiff --git a/net/core/filter.c b/net/core/filter.c\nindex c180871e606d..9048453e235c 100644\n--- a/net/core/filter.c\n+++ b/net/core/filter.c\n@@ -8835,10 +8835,9 @@ const struct bpf_prog_ops sk_reuseport_prog_ops = {\n };\n #endif /* CONFIG_INET */\n \n-DEFINE_BPF_DISPATCHER(bpf_dispatcher_xdp)\n+DEFINE_BPF_DISPATCHER(xdp)\n \n void bpf_prog_change_xdp(struct bpf_prog *prev_prog, struct bpf_prog *prog)\n {\n-\tbpf_dispatcher_change_prog(BPF_DISPATCHER_PTR(bpf_dispatcher_xdp),\n-\t\t\t\t   prev_prog, prog);\n+\tbpf_dispatcher_change_prog(BPF_DISPATCHER_PTR(xdp), prev_prog, prog);\n }\n",
    "prefixes": [
        "02/18"
    ]
}