get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808437,
    "url": "http://patchwork.ozlabs.org/api/patches/808437/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1504217150-16151-2-git-send-email-dsahern@gmail.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": "<1504217150-16151-2-git-send-email-dsahern@gmail.com>",
    "list_archive_url": null,
    "date": "2017-08-31T22:05:44",
    "name": "[v3,net-next,1/7] bpf: Add mark and priority to sock options that can be set",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "08a532c9c5b55fb3f2f782d5aca3c072e3772372",
    "submitter": {
        "id": 6918,
        "url": "http://patchwork.ozlabs.org/api/people/6918/?format=api",
        "name": "David Ahern",
        "email": "dsahern@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/1504217150-16151-2-git-send-email-dsahern@gmail.com/mbox/",
    "series": [
        {
            "id": 913,
            "url": "http://patchwork.ozlabs.org/api/series/913/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=913",
            "date": "2017-08-31T22:05:43",
            "name": "bpf: Add option to set mark and priority in cgroup sock programs",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/913/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808437/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808437/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=\"abZGF1Xd\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjxKS146Pz9s8J\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 08:06:20 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751618AbdHaWGN (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 31 Aug 2017 18:06:13 -0400",
            "from mail-pf0-f193.google.com ([209.85.192.193]:36316 \"EHLO\n\tmail-pf0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751205AbdHaWGK (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 31 Aug 2017 18:06:10 -0400",
            "by mail-pf0-f193.google.com with SMTP id k3so530060pfc.3\n\tfor <netdev@vger.kernel.org>; Thu, 31 Aug 2017 15:06:10 -0700 (PDT)",
            "from kenny.it.cumulusnetworks.com. (fw.cumulusnetworks.com.\n\t[216.129.126.126]) by smtp.googlemail.com with ESMTPSA id\n\tx12sm845336pfk.42.2017.08.31.15.06.08\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tThu, 31 Aug 2017 15:06:09 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=VjFxVof2IgrFcNrCbA0jxzEi1xSH3nHX44SD1b/EWT0=;\n\tb=abZGF1Xd3KAA2jc0lS6QUlZIok+4fPbYIMCmFA5UtvxH9gflEeCtNuR/6U17kxR0/Z\n\th/7reWjJrztpFsabysa4RzbLqMUvSoxyh9+eUgxXSjFmfLGxaiuSS02e3W9QgeDAkRcx\n\tJxP/xGSXRQfon5kB/BL0yLQUiXIJDFq/hVyzKAQW5PjT8n8oU692qajQ7+SA6DIQFOUZ\n\t9Jckka7oRrz7x6ukVn6FR+nIanB6bZP4lfXauGxJu43nuEYMjwEXDdS6rqxyrmVP5rhb\n\tNuQkwmvKcw5m6m0tRiKkiNBJcI8Q79qK+YH8bK50aWqqTHz2DiaWwcsIP9IE4HasYxSP\n\tH7Dw==",
        "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=VjFxVof2IgrFcNrCbA0jxzEi1xSH3nHX44SD1b/EWT0=;\n\tb=bDLO1HqCSz75gVaze9Jmgr61Q74R9eDyefNQxGVKhI6vfxzrtm/m1mSl7uVtQc8JM8\n\t6k6LDWcgiNh4UoovkxU+ruxEN0eP3IuzNUNYLwNN5idIAibj2oSoZKHoJ+TApry+UgCR\n\tPiAtKcN1jjQuTHKI8dLSnr9a0y7YmmhvYVNCSwpS6VWZSQOdw4+Y/knouPNx/+ZiY2fO\n\to+dYf/x/ZrhFpf0wFs/MtV0rb8U+O4MQhFPr0UBQJHoAHHNjnXexbDbW9Vba+LvxTaMa\n\tTHZ6jyrCSVhkL9QEfWH/RtvDO1thmJzMGXFBU0H42Zj9PqpGAbHCONrQ2gYmGd1NJijZ\n\tBRDQ==",
        "X-Gm-Message-State": "AHYfb5j0u8UIqSvJokuSNzyGNOhgzS6YNhLoJn5Mk8N1fZ2YvMkNdKF1\n\tYOgiti4fclusYLcK",
        "X-Google-Smtp-Source": "ADKCNb4nZ7wRN+bP1SChOenLZwpm/JqJPtwr0XrtkrLuN7l4sFi0E1k60iHA/Y9Y4w2Y9hnWgMbKTQ==",
        "X-Received": "by 10.84.133.14 with SMTP id 14mr4231076plf.44.1504217169653;\n\tThu, 31 Aug 2017 15:06:09 -0700 (PDT)",
        "From": "David Ahern <dsahern@gmail.com>",
        "To": "netdev@vger.kernel.org, daniel@iogearbox.net, ast@kernel.org",
        "Cc": "David Ahern <dsahern@gmail.com>",
        "Subject": "[PATCH v3 net-next 1/7] bpf: Add mark and priority to sock options\n\tthat can be set",
        "Date": "Thu, 31 Aug 2017 15:05:44 -0700",
        "Message-Id": "<1504217150-16151-2-git-send-email-dsahern@gmail.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1504217150-16151-1-git-send-email-dsahern@gmail.com>",
        "References": "<1504217150-16151-1-git-send-email-dsahern@gmail.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "Add socket mark and priority to fields that can be set by\nebpf program when a socket is created.\n\nSigned-off-by: David Ahern <dsahern@gmail.com>\nAcked-by: Alexei Starovoitov <ast@kernel.org>\n---\n include/uapi/linux/bpf.h |  2 ++\n net/core/filter.c        | 26 ++++++++++++++++++++++++++\n 2 files changed, 28 insertions(+)",
    "diff": "diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h\nindex d46cf326b95f..e9c89e20adff 100644\n--- a/include/uapi/linux/bpf.h\n+++ b/include/uapi/linux/bpf.h\n@@ -758,6 +758,8 @@ struct bpf_sock {\n \t__u32 family;\n \t__u32 type;\n \t__u32 protocol;\n+\t__u32 mark;\n+\t__u32 priority;\n };\n \n #define XDP_PACKET_HEADROOM 256\ndiff --git a/net/core/filter.c b/net/core/filter.c\nindex c6a37fe0285b..f51b9690adf3 100644\n--- a/net/core/filter.c\n+++ b/net/core/filter.c\n@@ -3455,6 +3455,10 @@ static bool sock_filter_is_valid_access(int off, int size,\n \t\tswitch (off) {\n \t\tcase offsetof(struct bpf_sock, bound_dev_if):\n \t\t\tbreak;\n+\t\tcase offsetof(struct bpf_sock, mark):\n+\t\t\tbreak;\n+\t\tcase offsetof(struct bpf_sock, priority):\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\treturn false;\n \t\t}\n@@ -3958,6 +3962,28 @@ static u32 sock_filter_convert_ctx_access(enum bpf_access_type type,\n \t\t\t\t      offsetof(struct sock, sk_bound_dev_if));\n \t\tbreak;\n \n+\tcase offsetof(struct bpf_sock, mark):\n+\t\tBUILD_BUG_ON(FIELD_SIZEOF(struct sock, sk_mark) != 4);\n+\n+\t\tif (type == BPF_WRITE)\n+\t\t\t*insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg,\n+\t\t\t\t\toffsetof(struct sock, sk_mark));\n+\t\telse\n+\t\t\t*insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg,\n+\t\t\t\t      offsetof(struct sock, sk_mark));\n+\t\tbreak;\n+\n+\tcase offsetof(struct bpf_sock, priority):\n+\t\tBUILD_BUG_ON(FIELD_SIZEOF(struct sock, sk_priority) != 4);\n+\n+\t\tif (type == BPF_WRITE)\n+\t\t\t*insn++ = BPF_STX_MEM(BPF_W, si->dst_reg, si->src_reg,\n+\t\t\t\t\toffsetof(struct sock, sk_priority));\n+\t\telse\n+\t\t\t*insn++ = BPF_LDX_MEM(BPF_W, si->dst_reg, si->src_reg,\n+\t\t\t\t      offsetof(struct sock, sk_priority));\n+\t\tbreak;\n+\n \tcase offsetof(struct bpf_sock, family):\n \t\tBUILD_BUG_ON(FIELD_SIZEOF(struct sock, sk_family) != 2);\n \n",
    "prefixes": [
        "v3",
        "net-next",
        "1/7"
    ]
}