get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 811345,
    "url": "http://patchwork.ozlabs.org/api/patches/811345/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20170908070142.4440-5-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": "<20170908070142.4440-5-daniel.axtens@canonical.com>",
    "list_archive_url": null,
    "date": "2017-09-08T07:01:39",
    "name": "[SRU,Xenial,4/7] tcp: replace dst_confirm with sk_dst_confirm",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "031cb59540108bf1ada2f675b025c147b51f1987",
    "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/20170908070142.4440-5-daniel.axtens@canonical.com/mbox/",
    "series": [
        {
            "id": 2112,
            "url": "http://patchwork.ozlabs.org/api/series/2112/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=2112",
            "date": "2017-09-08T07:01:35",
            "name": "Fixes for LP#1715812",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/2112/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/811345/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/811345/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 3xpStN6Zzyz9s83;\n\tFri,  8 Sep 2017 17:02:04 +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 1dqDIg-0001Hz-2z; Fri, 08 Sep 2017 07:02:02 +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 1dqDIe-0001G5-7w\n\tfor kernel-team@lists.canonical.com; Fri, 08 Sep 2017 07:02:00 +0000",
            "from mail-pf0-f197.google.com ([209.85.192.197])\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 1dqDId-0003DV-RN\n\tfor kernel-team@lists.canonical.com; Fri, 08 Sep 2017 07:01:59 +0000",
            "by mail-pf0-f197.google.com with SMTP id e199so3493137pfh.3\n\tfor <kernel-team@lists.canonical.com>;\n\tFri, 08 Sep 2017 00:01:59 -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\th1sm2255518pfg.153.2017.09.08.00.01.55\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:01:57 -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=tfs+nXutVxUp4cJCX6nOpg9wC1C83UEGQq9zVmxuNRU=;\n\tb=IxcDHPCJnlfAkaKMjB5t/LOdoh4GCW2GGpkoqyY7QQG0xUf5uuqVgSvz4ACESrgoZv\n\tFf5yFHgGZF0c9JPZKIF88GtWNz+MmBxq/W4dNmb3KgJoN/adYeiSz08cRSKx0f/xbnBP\n\tK+AAE9NDC7RLi9UIOPbAJP7+r+4x5EUMLfKT7RHRDCShSRBIaxZRzM33/kseR1xQLqdd\n\tcYyeGg8gZhA6SpoQ1Bz2fqw0C0CZevx6aCWoJdJdYVCqF9tR1D5IVJ7/n+F0u4DoGZI+\n\tlPBHei8L8a1Vjy9sZaIeOpabAc4LBgNYL8xXyTT6TZp6+BEIbZ3iS90RLpxQotQH677k\n\t+d6Q==",
        "X-Gm-Message-State": "AHPjjUivUNJzT/HN7/T9EMNswutWKYmM/m7+FSwkJiTUPDbF5DZT77On\n\tZ0Q/wYJAB2dfMnDqcI5UNlpEdVaj+P62aZp7CMlpAUpbBaNNA4FGbCmd3vERJMzeneM935scfUc\n\thTcPJmC3XX5zkSlDNj3PUGC/dObtx8rcRUy7cgZg=",
        "X-Received": [
            "by 10.84.246.200 with SMTP id j8mr2265719plt.55.1504854118425;\n\tFri, 08 Sep 2017 00:01:58 -0700 (PDT)",
            "by 10.84.246.200 with SMTP id j8mr2265707plt.55.1504854118235;\n\tFri, 08 Sep 2017 00:01:58 -0700 (PDT)"
        ],
        "X-Google-Smtp-Source": "ADKCNb668w3FSI8B3dN00jS9cN45JXN2Nu2tJJGyIe1K04P0lIazpdDeVI1+pxWm3NokXqH3F5gclQ==",
        "From": "Daniel Axtens <daniel.axtens@canonical.com>",
        "To": "kernel-team@lists.canonical.com",
        "Subject": "[SRU][Xenial][PATCH 4/7] tcp: replace dst_confirm with\n\tsk_dst_confirm",
        "Date": "Fri,  8 Sep 2017 17:01:39 +1000",
        "Message-Id": "<20170908070142.4440-5-daniel.axtens@canonical.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20170908070142.4440-1-daniel.axtens@canonical.com>",
        "References": "<20170908070142.4440-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\nWhen same struct dst_entry can be used for many different\nneighbours we can not use it for pending confirmations.\nUse the new sk_dst_confirm() helper to propagate the\nindication from received packets to sock_confirm_neigh().\n\nReported-by: YueHaibing <yuehaibing@huawei.com>\nFixes: 5110effee8fd (\"net: Do delayed neigh confirmation.\")\nFixes: f2bb4bedf35d (\"ipv4: Cache output routes in fib_info nexthops.\")\nTested-by: YueHaibing <yuehaibing@huawei.com>\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(backported from commit c3a2e8370534f810cac6050169db0ed3e0f94f0b)\nSigned-off-by: Daniel Axtens <daniel.axtens@canonical.com>\n---\n net/ipv4/tcp_input.c   | 12 +++---------\n net/ipv4/tcp_metrics.c |  7 ++-----\n net/ipv4/tcp_output.c  |  2 ++\n 3 files changed, 7 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c\nindex 8f13b2eaabf8..d28cf618e063 100644\n--- a/net/ipv4/tcp_input.c\n+++ b/net/ipv4/tcp_input.c\n@@ -3637,11 +3637,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)\n \tif (tcp_may_raise_cwnd(sk, flag))\n \t\ttcp_cong_avoid(sk, ack, acked);\n \n-\tif ((flag & FLAG_FORWARD_PROGRESS) || !(flag & FLAG_NOT_DUP)) {\n-\t\tstruct dst_entry *dst = __sk_dst_get(sk);\n-\t\tif (dst)\n-\t\t\tdst_confirm(dst);\n-\t}\n+\tif ((flag & FLAG_FORWARD_PROGRESS) || !(flag & FLAG_NOT_DUP))\n+\t\tsk_dst_confirm(sk);\n \n \tif (icsk->icsk_pending == ICSK_TIME_RETRANS)\n \t\ttcp_schedule_loss_probe(sk);\n@@ -5897,7 +5894,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)\n \t\tbreak;\n \n \tcase TCP_FIN_WAIT1: {\n-\t\tstruct dst_entry *dst;\n \t\tint tmo;\n \n \t\t/* If we enter the TCP_FIN_WAIT1 state and we are a\n@@ -5924,9 +5920,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)\n \t\ttcp_set_state(sk, TCP_FIN_WAIT2);\n \t\tsk->sk_shutdown |= SEND_SHUTDOWN;\n \n-\t\tdst = __sk_dst_get(sk);\n-\t\tif (dst)\n-\t\t\tdst_confirm(dst);\n+\t\tsk_dst_confirm(sk);\n \n \t\tif (!sock_flag(sk, SOCK_DEAD)) {\n \t\t\t/* Wake up lingering close() */\ndiff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c\nindex a726d7853ce5..c47f5d199eb8 100644\n--- a/net/ipv4/tcp_metrics.c\n+++ b/net/ipv4/tcp_metrics.c\n@@ -374,12 +374,10 @@ void tcp_update_metrics(struct sock *sk)\n \tu32 val;\n \tint m;\n \n+\tsk_dst_confirm(sk);\n \tif (sysctl_tcp_nometrics_save || !dst)\n \t\treturn;\n \n-\tif (dst->flags & DST_HOST)\n-\t\tdst_confirm(dst);\n-\n \trcu_read_lock();\n \tif (icsk->icsk_backoff || !tp->srtt_us) {\n \t\t/* This session failed to estimate rtt. Why?\n@@ -492,11 +490,10 @@ void tcp_init_metrics(struct sock *sk)\n \tstruct tcp_metrics_block *tm;\n \tu32 val, crtt = 0; /* cached RTT scaled by 8 */\n \n+\tsk_dst_confirm(sk);\n \tif (!dst)\n \t\tgoto reset;\n \n-\tdst_confirm(dst);\n-\n \trcu_read_lock();\n \ttm = tcp_get_metrics(sk, dst, true);\n \tif (!tm) {\ndiff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c\nindex 3fdcdc730f71..ab71b1f04df1 100644\n--- a/net/ipv4/tcp_output.c\n+++ b/net/ipv4/tcp_output.c\n@@ -957,6 +957,8 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,\n \tskb_set_hash_from_sk(skb, sk);\n \tatomic_add(skb->truesize, &sk->sk_wmem_alloc);\n \n+\tskb_set_dst_pending_confirm(skb, sk->sk_dst_pending_confirm);\n+\n \t/* Build TCP header and checksum it. */\n \tth = tcp_hdr(skb);\n \tth->source\t\t= inet->inet_sport;\n",
    "prefixes": [
        "SRU",
        "Xenial",
        "4/7"
    ]
}