get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 812746,
    "url": "http://patchwork.ozlabs.org/api/patches/812746/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1505209677-12728-1-git-send-email-yanhaishuang@cmss.chinamobile.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": "<1505209677-12728-1-git-send-email-yanhaishuang@cmss.chinamobile.com>",
    "list_archive_url": null,
    "date": "2017-09-12T09:47:56",
    "name": "[v4,1/2] ip_tunnel: fix ip tunnel lookup in collect_md mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f629af6de5198e43db88606cfb2134b62407bb6e",
    "submitter": {
        "id": 68606,
        "url": "http://patchwork.ozlabs.org/api/people/68606/?format=api",
        "name": "Haishuang Yan",
        "email": "yanhaishuang@cmss.chinamobile.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/1505209677-12728-1-git-send-email-yanhaishuang@cmss.chinamobile.com/mbox/",
    "series": [
        {
            "id": 2647,
            "url": "http://patchwork.ozlabs.org/api/series/2647/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=2647",
            "date": "2017-09-12T09:47:57",
            "name": "[v4,1/2] ip_tunnel: fix ip tunnel lookup in collect_md mode",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/2647/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/812746/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/812746/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>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xs0Nw2HCPz9ryk\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 12 Sep 2017 19:48:48 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751443AbdILJsR (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 12 Sep 2017 05:48:17 -0400",
            "from cmccmta1.chinamobile.com ([221.176.66.79]:15985 \"EHLO\n\tcmccmta1.chinamobile.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751326AbdILJsQ (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 12 Sep 2017 05:48:16 -0400",
            "from spf.mail.chinamobile.com (unknown[172.16.121.13]) by\n\trmmx-syy-dmz-app03-12003 (RichMail) with SMTP id\n\t2ee359b7ad5ca35-13e56; Tue, 12 Sep 2017 17:48:12 +0800 (CST)",
            "from localhost (unknown[223.105.0.240])\n\tby rmsmtp-syy-appsvr07-12007 (RichMail) with SMTP id\n\t2ee759b7ad5b069-5de64; Tue, 12 Sep 2017 17:48:12 +0800 (CST)"
        ],
        "X-RM-TRANSID": [
            "2ee359b7ad5ca35-13e56",
            "2ee759b7ad5b069-5de64"
        ],
        "X-RM-SPAM-FLAG": "00000000",
        "From": "Haishuang Yan <yanhaishuang@cmss.chinamobile.com>",
        "To": "\"David S. Miller\" <davem@davemloft.net>,\n\tAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>,\n\tHideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>",
        "Cc": "netdev@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tHaishuang Yan <yanhaishuang@cmss.chinamobile.com>,\n\tPravin B Shelar <pshelar@nicira.com>",
        "Subject": "[PATCH v4 1/2] ip_tunnel: fix ip tunnel lookup in collect_md mode",
        "Date": "Tue, 12 Sep 2017 17:47:56 +0800",
        "Message-Id": "<1505209677-12728-1-git-send-email-yanhaishuang@cmss.chinamobile.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "In collect_md mode, if the tun dev is down, it still can call\nip_tunnel_rcv to receive on packets, and the rx statistics increase\nimproperly.\n\nWhen the md tunnel is down, it's not neccessary to increase RX drops\nfor the tunnel device, packets would be recieved on fallback tunnel,\nand the RX drops on fallback device will be increased as expected.\n\nFixes: 2e15ea390e6f (\"ip_gre: Add support to collect tunnel metadata.\")\nCc: Pravin B Shelar <pshelar@nicira.com>\nSigned-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>\n\n---\nChange since v4:\n  * Make the commit message more clearer.\n  * Fix wrong recipient addresss\n---\n net/ipv4/ip_tunnel.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c\nindex e1856bf..e9805ad 100644\n--- a/net/ipv4/ip_tunnel.c\n+++ b/net/ipv4/ip_tunnel.c\n@@ -176,7 +176,7 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn,\n \t\treturn cand;\n \n \tt = rcu_dereference(itn->collect_md_tun);\n-\tif (t)\n+\tif (t && t->dev->flags & IFF_UP)\n \t\treturn t;\n \n \tif (itn->fb_tunnel_dev && itn->fb_tunnel_dev->flags & IFF_UP)\n",
    "prefixes": [
        "v4",
        "1/2"
    ]
}