get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 818924,
    "url": "http://patchwork.ozlabs.org/api/patches/818924/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170927045803.2477-7-tom@quantonium.net/",
    "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": "<20170927045803.2477-7-tom@quantonium.net>",
    "list_archive_url": null,
    "date": "2017-09-27T04:57:57",
    "name": "[v4,net-next,06/12] gtp: Use goto for exceptions in gtp_udp_encap_recv funcs",
    "commit_ref": null,
    "pull_url": null,
    "state": "deferred",
    "archived": true,
    "hash": "c39f59d8e6fe0091c2bb8cfd65c4aaaea3dc58ca",
    "submitter": {
        "id": 72064,
        "url": "http://patchwork.ozlabs.org/api/people/72064/?format=api",
        "name": "Tom Herbert",
        "email": "tom@quantonium.net"
    },
    "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/20170927045803.2477-7-tom@quantonium.net/mbox/",
    "series": [
        {
            "id": 5279,
            "url": "http://patchwork.ozlabs.org/api/series/5279/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=5279",
            "date": "2017-09-27T04:57:51",
            "name": "gtp: Additional feature support - Part I",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/5279/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/818924/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/818924/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=quantonium-net.20150623.gappssmtp.com\n\theader.i=@quantonium-net.20150623.gappssmtp.com\n\theader.b=\"zwTns3xu\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y25FY36SZz9t3h\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 14:58:57 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1161071AbdI0E64 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 27 Sep 2017 00:58:56 -0400",
            "from mail-pf0-f173.google.com ([209.85.192.173]:47304 \"EHLO\n\tmail-pf0-f173.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1161066AbdI0E6y (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 27 Sep 2017 00:58:54 -0400",
            "by mail-pf0-f173.google.com with SMTP id u12so6674443pfl.4\n\tfor <netdev@vger.kernel.org>; Tue, 26 Sep 2017 21:58:54 -0700 (PDT)",
            "from localhost.localdomain (c-73-162-13-107.hsd1.ca.comcast.net.\n\t[73.162.13.107]) by smtp.gmail.com with ESMTPSA id\n\ty16sm16502728pfe.68.2017.09.26.21.58.52\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 26 Sep 2017 21:58:53 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=quantonium-net.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=M3FXeq2nLYeSn0fU0Ho7wThC1D83EIjbYlgwheu0zTM=;\n\tb=zwTns3xuX/eDWGocnfa8GcQqMClWuUT0xQp3b4PyxJD2KUXWAq7y9ftTDbezZijptz\n\tJ95FT4dvkBpdcMDv/K7Za8TeeyLfG7jwgfzDcHbIPeBw+iI/iwRYuEwqlgBvBn//wdXN\n\t0Lohx2DmoxLeaIEutLojgppRf6sp3OyrZzad5Fdya5K843lBJfOFmpEOEiyfP2wyrPg/\n\tJMlD25YWNT5uJ+HogP6CuAX+k+1RbYy/Ri6ZNyL5G+5kdc0j5v7F4QJaW5CpVIQpM1Y4\n\t3JQt2V9c/+k2QYlWL3Clke6LgaxfxmiTSZWo93/57+GTTKzYMzYIoht3QID2YifzRj8o\n\th7gw==",
        "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=M3FXeq2nLYeSn0fU0Ho7wThC1D83EIjbYlgwheu0zTM=;\n\tb=qddvGS6WZ32YNSKQR5JxEuuioi/v0R33IsyJMwIqGcbKZKlCfZFsFhbZ0lcr5VO4a+\n\t5Nucf0HylPU/Dr9PjLl821iQSrolRsvkzVn0a/lTGqxgPG/hOld6SjLlXdRERaVo06Lo\n\tv5XYbBDM4x0pasWgmEYhA1pmxvC4//BaqqoYT1/KnUcJ1rGZ4OqOARyNnNTQgdTvpTSr\n\tQTSyh9YwuLZQ5IgpbfZnCg7mz6oPhBbJK+DxpC430DblFrNDk3ZvDM9uwXKCxqissBjP\n\tkHIX830Z7CPDs/+kmMgvvScQ/Nn+LwJPATX4nbAB7iPTQAJsAa1gS15GftLBUYVOF6Ug\n\tUrvA==",
        "X-Gm-Message-State": "AHPjjUiXshqrc5VcM3lR4C0cBG6/D5g89lPG+HVZ/4RKbosRIi7+HMkk\n\tlBpsc20rTi0jnjIDRqwbW4Qeuw==",
        "X-Google-Smtp-Source": "AOwi7QCwMjg5RgogvmllnIiJv1gtwBEVlOO1hhcmItP2QmGBpW5QQeYqzyU8XZPjUxyto+9fYJh+Cw==",
        "X-Received": "by 10.99.163.65 with SMTP id v1mr199537pgn.310.1506488333938;\n\tTue, 26 Sep 2017 21:58:53 -0700 (PDT)",
        "From": "Tom Herbert <tom@quantonium.net>",
        "To": "davem@davemloft.net",
        "Cc": "pablo@netfilter.org, laforge@gnumonks.org, aschultz@tpip.net,\n\tnetdev@vger.kernel.org, rohit@quantonium.net,\n\tTom Herbert <tom@quantonium.net>",
        "Subject": "[PATCH v4 net-next 06/12] gtp: Use goto for exceptions in\n\tgtp_udp_encap_recv funcs",
        "Date": "Tue, 26 Sep 2017 21:57:57 -0700",
        "Message-Id": "<20170927045803.2477-7-tom@quantonium.net>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20170927045803.2477-1-tom@quantonium.net>",
        "References": "<20170927045803.2477-1-tom@quantonium.net>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "Consolidate return logic to make it easier to extend.\n\nSigned-off-by: Tom Herbert <tom@quantonium.net>\n---\n drivers/net/gtp.c | 26 +++++++++++++++++---------\n 1 file changed, 17 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c\nindex f2aac5d01143..00e5ea5cb935 100644\n--- a/drivers/net/gtp.c\n+++ b/drivers/net/gtp.c\n@@ -234,23 +234,27 @@ static int gtp0_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb)\n \tstruct pdp_ctx *pctx;\n \n \tif (!pskb_may_pull(skb, hdrlen))\n-\t\treturn -1;\n+\t\tgoto drop;\n \n \tgtp0 = (struct gtp0_header *)(skb->data + sizeof(struct udphdr));\n \n \tif ((gtp0->flags >> 5) != GTP_V0)\n-\t\treturn 1;\n+\t\tgoto pass;\n \n \tif (gtp0->type != GTP_TPDU)\n-\t\treturn 1;\n+\t\tgoto pass;\n \n \tpctx = gtp0_pdp_find(gtp, be64_to_cpu(gtp0->tid));\n \tif (!pctx) {\n \t\tnetdev_dbg(gtp->dev, \"No PDP ctx to decap skb=%p\\n\", skb);\n-\t\treturn 1;\n+\t\tgoto pass;\n \t}\n \n \treturn gtp_rx(pctx, skb, hdrlen, gtp->role);\n+drop:\n+\treturn -1;\n+pass:\n+\treturn 1;\n }\n \n static int gtp1u_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb)\n@@ -261,15 +265,15 @@ static int gtp1u_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb)\n \tstruct pdp_ctx *pctx;\n \n \tif (!pskb_may_pull(skb, hdrlen))\n-\t\treturn -1;\n+\t\tgoto drop;\n \n \tgtp1 = (struct gtp1_header *)(skb->data + sizeof(struct udphdr));\n \n \tif ((gtp1->flags >> 5) != GTP_V1)\n-\t\treturn 1;\n+\t\tgoto pass;\n \n \tif (gtp1->type != GTP_TPDU)\n-\t\treturn 1;\n+\t\tgoto pass;\n \n \t/* From 29.060: \"This field shall be present if and only if any one or\n \t * more of the S, PN and E flags are set.\".\n@@ -282,17 +286,21 @@ static int gtp1u_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb)\n \n \t/* Make sure the header is larger enough, including extensions. */\n \tif (!pskb_may_pull(skb, hdrlen))\n-\t\treturn -1;\n+\t\tgoto drop;\n \n \tgtp1 = (struct gtp1_header *)(skb->data + sizeof(struct udphdr));\n \n \tpctx = gtp1_pdp_find(gtp, ntohl(gtp1->tid));\n \tif (!pctx) {\n \t\tnetdev_dbg(gtp->dev, \"No PDP ctx to decap skb=%p\\n\", skb);\n-\t\treturn 1;\n+\t\tgoto drop;\n \t}\n \n \treturn gtp_rx(pctx, skb, hdrlen, gtp->role);\n+drop:\n+\treturn -1;\n+pass:\n+\treturn 1;\n }\n \n static void gtp_encap_destroy(struct sock *sk)\n",
    "prefixes": [
        "v4",
        "net-next",
        "06/12"
    ]
}