get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 811334,
    "url": "http://patchwork.ozlabs.org/api/patches/811334/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20170908070018.4141-2-daniel.axtens@canonical.com/",
    "project": {
        "id": 15,
        "url": "http://patchwork.ozlabs.org/api/projects/15/?format=api",
        "name": "Ubuntu Kernel",
        "link_name": "ubuntu-kernel",
        "list_id": "kernel-team.lists.ubuntu.com",
        "list_email": "kernel-team@lists.ubuntu.com",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170908070018.4141-2-daniel.axtens@canonical.com>",
    "list_archive_url": null,
    "date": "2017-09-08T07:00:12",
    "name": "[SRU,Zesty,1/7] sock: add sk_dst_pending_confirm flag",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "4fe39913578fa0c5877e6d70b3bd082fc942c34c",
    "submitter": {
        "id": 71548,
        "url": "http://patchwork.ozlabs.org/api/people/71548/?format=api",
        "name": "Daniel Axtens",
        "email": "daniel.axtens@canonical.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20170908070018.4141-2-daniel.axtens@canonical.com/mbox/",
    "series": [
        {
            "id": 2111,
            "url": "http://patchwork.ozlabs.org/api/series/2111/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=2111",
            "date": "2017-09-08T07:00:11",
            "name": "Fixes for LP#1715812",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/2111/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/811334/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/811334/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<kernel-team-bounces@lists.ubuntu.com>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com\n\t(client-ip=91.189.94.19; helo=huckleberry.canonical.com;\n\tenvelope-from=kernel-team-bounces@lists.ubuntu.com;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from huckleberry.canonical.com (huckleberry.canonical.com\n\t[91.189.94.19])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpSrh2PrBz9t16;\n\tFri,  8 Sep 2017 17:00:36 +1000 (AEST)",
            "from localhost ([127.0.0.1] helo=huckleberry.canonical.com)\n\tby huckleberry.canonical.com with esmtp (Exim 4.86_2)\n\t(envelope-from <kernel-team-bounces@lists.ubuntu.com>)\n\tid 1dqDHF-0000jh-Ky; Fri, 08 Sep 2017 07:00:33 +0000",
            "from youngberry.canonical.com ([91.189.89.112])\n\tby huckleberry.canonical.com with esmtps\n\t(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128)\n\t(Exim 4.86_2) (envelope-from <daniel.axtens@canonical.com>)\n\tid 1dqDHD-0000i7-UM\n\tfor kernel-team@lists.canonical.com; Fri, 08 Sep 2017 07:00:31 +0000",
            "from mail-pf0-f198.google.com ([209.85.192.198])\n\tby youngberry.canonical.com with esmtps\n\t(TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.76) (envelope-from <daniel.axtens@canonical.com>)\n\tid 1dqDHD-00039T-Ii\n\tfor kernel-team@lists.canonical.com; Fri, 08 Sep 2017 07:00:31 +0000",
            "by mail-pf0-f198.google.com with SMTP id s137so3479211pfs.4\n\tfor <kernel-team@lists.canonical.com>;\n\tFri, 08 Sep 2017 00:00:31 -0700 (PDT)",
            "from localhost.localdomain (124-171-202-56.dyn.iinet.net.au.\n\t[124.171.202.56]) by smtp.gmail.com with ESMTPSA id\n\t125sm2138129pff.5.2017.09.08.00.00.26\n\tfor <kernel-team@lists.canonical.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 00:00:29 -0700 (PDT)"
        ],
        "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:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=SfLQmSiQCv5E9U82vv47F6hT+6/yu8vx1Fp9Tg1FrXs=;\n\tb=rJAjuJa52PU4/cA6Ha+Vjmfgr0UHLuopM5Bw6xv8cFYLhwbbGAkLWykAJFC2vwOavA\n\t4fRfyJN1Bk9lmMsdFd6reot/H22EYx0nMEKyMvjZTF8Mnzjrzhq5qHFqMhD0HUNzVjIv\n\tR8xdyPSszTSeiYTT02zvxY4FLD9CyxnIoUZVerNsKFwc4cQmLCjaqQFSXF36Ox+h5srN\n\tdSaToqLmJ7an3TIe52yYvRqLpbDmKEiamYNdXIm9XfR6Sg/f1dZLi6GBeO1Dw/49rzpb\n\tGu3F0LpRlGMukrKEN5CXQjEUzXjRdysCMbS2Qh5+EbqWe/C8IC0c6jIdXtY4z4QWdCH5\n\tkKXQ==",
        "X-Gm-Message-State": "AHPjjUijNCI+1egKG2HovOgYEUxFqTAfrHS039NCoKKe7TJv0yLQZocP\n\tP5+1GUT01tehf7gjL3enluV/oYxyUZGg37mzayElFyzzf4VlSj4sgz+yZrufAVmFUid7exwPfeP\n\t29XTDCZqRH8rm0TFj3aLzZWIJnVsgaGWFb4fx7+0=",
        "X-Received": [
            "by 10.99.157.200 with SMTP id i191mr2051863pgd.247.1504854030130;\n\tFri, 08 Sep 2017 00:00:30 -0700 (PDT)",
            "by 10.99.157.200 with SMTP id i191mr2051843pgd.247.1504854029902;\n\tFri, 08 Sep 2017 00:00:29 -0700 (PDT)"
        ],
        "X-Google-Smtp-Source": "ADKCNb4uDniHluxsrj3a3M/Zq6YFcQCIkGAlb6PBrhLUXnlQAELqtm0WHCKmNQDlBAkGhlyuDKdSNQ==",
        "From": "Daniel Axtens <daniel.axtens@canonical.com>",
        "To": "kernel-team@lists.canonical.com",
        "Subject": "[SRU][Zesty][PATCH 1/7] sock: add sk_dst_pending_confirm flag",
        "Date": "Fri,  8 Sep 2017 17:00:12 +1000",
        "Message-Id": "<20170908070018.4141-2-daniel.axtens@canonical.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20170908070018.4141-1-daniel.axtens@canonical.com>",
        "References": "<20170908070018.4141-1-daniel.axtens@canonical.com>",
        "X-BeenThere": "kernel-team@lists.ubuntu.com",
        "X-Mailman-Version": "2.1.20",
        "Precedence": "list",
        "List-Id": "Kernel team discussions <kernel-team.lists.ubuntu.com>",
        "List-Unsubscribe": "<https://lists.ubuntu.com/mailman/options/kernel-team>,\n\t<mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe>",
        "List-Archive": "<https://lists.ubuntu.com/archives/kernel-team>",
        "List-Post": "<mailto:kernel-team@lists.ubuntu.com>",
        "List-Help": "<mailto:kernel-team-request@lists.ubuntu.com?subject=help>",
        "List-Subscribe": "<https://lists.ubuntu.com/mailman/listinfo/kernel-team>,\n\t<mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "kernel-team-bounces@lists.ubuntu.com",
        "Sender": "\"kernel-team\" <kernel-team-bounces@lists.ubuntu.com>"
    },
    "content": "From: Julian Anastasov <ja@ssi.bg>\n\nBugLink: https://bugs.launchpad.net/bugs/1715812\n\nAdd new sock flag to allow sockets to confirm neighbour.\nWhen same struct dst_entry can be used for many different\nneighbours we can not use it for pending confirmations.\nAs not all call paths lock the socket use full word for\nthe flag.\n\nAdd sk_dst_confirm as replacement for dst_confirm when\ncalled for received packets.\n\nSigned-off-by: Julian Anastasov <ja@ssi.bg>\nAcked-by: Eric Dumazet <edumazet@google.com>\nSigned-off-by: David S. Miller <davem@davemloft.net>\n(cherry picked from commit 9b8805a325591cf5b6b9df71200de25a2bd721fd)\nSigned-off-by: Daniel Axtens <daniel.axtens@canonical.com>\n---\n include/net/sock.h | 12 ++++++++++++\n net/core/sock.c    |  2 ++\n 2 files changed, 14 insertions(+)",
    "diff": "diff --git a/include/net/sock.h b/include/net/sock.h\nindex c4f5e6fca17c..7e4ca83a6815 100644\n--- a/include/net/sock.h\n+++ b/include/net/sock.h\n@@ -239,6 +239,7 @@ struct sock_common {\n   *\t@sk_wq: sock wait queue and async head\n   *\t@sk_rx_dst: receive input route used by early demux\n   *\t@sk_dst_cache: destination cache\n+  *\t@sk_dst_pending_confirm: need to confirm neighbour\n   *\t@sk_policy: flow policy\n   *\t@sk_receive_queue: incoming packets\n   *\t@sk_wmem_alloc: transmit queue bytes committed\n@@ -392,6 +393,8 @@ struct sock {\n \tstruct sk_buff_head\tsk_write_queue;\n \t__s32\t\t\tsk_peek_off;\n \tint\t\t\tsk_write_pending;\n+\t__u32\t\t\tsk_dst_pending_confirm;\n+\t/* Note: 32bit hole on 64bit arches */\n \tlong\t\t\tsk_sndtimeo;\n \tstruct timer_list\tsk_timer;\n \t__u32\t\t\tsk_priority;\n@@ -1761,6 +1764,7 @@ static inline void dst_negative_advice(struct sock *sk)\n \t\tif (ndst != dst) {\n \t\t\trcu_assign_pointer(sk->sk_dst_cache, ndst);\n \t\t\tsk_tx_queue_clear(sk);\n+\t\t\tsk->sk_dst_pending_confirm = 0;\n \t\t}\n \t}\n }\n@@ -1771,6 +1775,7 @@ __sk_dst_set(struct sock *sk, struct dst_entry *dst)\n \tstruct dst_entry *old_dst;\n \n \tsk_tx_queue_clear(sk);\n+\tsk->sk_dst_pending_confirm = 0;\n \t/*\n \t * This can be called while sk is owned by the caller only,\n \t * with no state that can be checked in a rcu_dereference_check() cond\n@@ -1786,6 +1791,7 @@ sk_dst_set(struct sock *sk, struct dst_entry *dst)\n \tstruct dst_entry *old_dst;\n \n \tsk_tx_queue_clear(sk);\n+\tsk->sk_dst_pending_confirm = 0;\n \told_dst = xchg((__force struct dst_entry **)&sk->sk_dst_cache, dst);\n \tdst_release(old_dst);\n }\n@@ -1806,6 +1812,12 @@ struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie);\n \n struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie);\n \n+static inline void sk_dst_confirm(struct sock *sk)\n+{\n+\tif (!sk->sk_dst_pending_confirm)\n+\t\tsk->sk_dst_pending_confirm = 1;\n+}\n+\n bool sk_mc_loop(struct sock *sk);\n \n static inline bool sk_can_gso(const struct sock *sk)\ndiff --git a/net/core/sock.c b/net/core/sock.c\nindex 4e7f10c92666..a74660a1347a 100644\n--- a/net/core/sock.c\n+++ b/net/core/sock.c\n@@ -502,6 +502,7 @@ struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)\n \n \tif (dst && dst->obsolete && dst->ops->check(dst, cookie) == NULL) {\n \t\tsk_tx_queue_clear(sk);\n+\t\tsk->sk_dst_pending_confirm = 0;\n \t\tRCU_INIT_POINTER(sk->sk_dst_cache, NULL);\n \t\tdst_release(dst);\n \t\treturn NULL;\n@@ -1527,6 +1528,7 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)\n \t\t\t\taf_family_clock_key_strings[newsk->sk_family]);\n \n \t\tnewsk->sk_dst_cache\t= NULL;\n+\t\tnewsk->sk_dst_pending_confirm = 0;\n \t\tnewsk->sk_wmem_queued\t= 0;\n \t\tnewsk->sk_forward_alloc = 0;\n \t\tatomic_set(&newsk->sk_drops, 0);\n",
    "prefixes": [
        "SRU",
        "Zesty",
        "1/7"
    ]
}