get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1030,
    "url": "http://patchwork.ozlabs.org/api/patches/1030/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20080923.010707.209241926.davem@davemloft.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": "<20080923.010707.209241926.davem@davemloft.net>",
    "list_archive_url": null,
    "date": "2008-09-23T08:07:07",
    "name": ": tcp: Use SKB queue handling interfaces instead of by-hand versions.",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9ba75ff969a3420c7b05383f2fa7b8133d28dcbe",
    "submitter": {
        "id": 15,
        "url": "http://patchwork.ozlabs.org/api/people/15/?format=api",
        "name": "David Miller",
        "email": "davem@davemloft.net"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20080923.010707.209241926.davem@davemloft.net/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/1030/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1030/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id 31EFEDDE2A\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 23 Sep 2008 18:07:26 +1000 (EST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751954AbYIWIHV (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 23 Sep 2008 04:07:21 -0400",
            "(majordomo@vger.kernel.org) by vger.kernel.org id S1751773AbYIWIHU\n\t(ORCPT <rfc822; netdev-outgoing>); Tue, 23 Sep 2008 04:07:20 -0400",
            "from 74-93-104-97-Washington.hfc.comcastbusiness.net\n\t([74.93.104.97]:52464\n\t\"EHLO sunset.davemloft.net\" rhost-flags-OK-FAIL-OK-OK)\n\tby vger.kernel.org with ESMTP id S1751573AbYIWIHS (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 23 Sep 2008 04:07:18 -0400",
            "from localhost (localhost [127.0.0.1])\n\tby sunset.davemloft.net (Postfix) with ESMTP id 50AC8C8C181\n\tfor <netdev@vger.kernel.org>; Tue, 23 Sep 2008 01:07:07 -0700 (PDT)"
        ],
        "Date": "Tue, 23 Sep 2008 01:07:07 -0700 (PDT)",
        "Message-Id": "<20080923.010707.209241926.davem@davemloft.net>",
        "To": "netdev@vger.kernel.org",
        "Subject": "[PATCH]: tcp: Use SKB queue handling interfaces instead of by-hand\n\tversions.",
        "From": "David Miller <davem@davemloft.net>",
        "X-Mailer": "Mew version 6.1 on Emacs 22.1 / Mule 5.0 (SAKAKI)",
        "Mime-Version": "1.0",
        "Content-Type": "Text/Plain; charset=us-ascii",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "tcp: Use SKB queue handling interfaces instead of by-hand versions.\n\nSigned-off-by: David S. Miller <davem@davemloft.net>\n---\n include/net/tcp.h |   40 +++++++++++++++-------------------------\n 1 files changed, 15 insertions(+), 25 deletions(-)",
    "diff": "diff --git a/include/net/tcp.h b/include/net/tcp.h\nindex 5c5327e..12c9b4f 100644\n--- a/include/net/tcp.h\n+++ b/include/net/tcp.h\n@@ -1181,49 +1181,45 @@ static inline void tcp_write_queue_purge(struct sock *sk)\n \n static inline struct sk_buff *tcp_write_queue_head(struct sock *sk)\n {\n-\tstruct sk_buff *skb = sk->sk_write_queue.next;\n-\tif (skb == (struct sk_buff *) &sk->sk_write_queue)\n-\t\treturn NULL;\n-\treturn skb;\n+\treturn skb_peek(&sk->sk_write_queue);\n }\n \n static inline struct sk_buff *tcp_write_queue_tail(struct sock *sk)\n {\n-\tstruct sk_buff *skb = sk->sk_write_queue.prev;\n-\tif (skb == (struct sk_buff *) &sk->sk_write_queue)\n-\t\treturn NULL;\n-\treturn skb;\n+\treturn skb_peek_tail(&sk->sk_write_queue);\n }\n \n static inline struct sk_buff *tcp_write_queue_next(struct sock *sk, struct sk_buff *skb)\n {\n-\treturn skb->next;\n+\treturn skb_queue_next(&sk->sk_write_queue, skb);\n }\n \n #define tcp_for_write_queue(skb, sk)\t\t\t\t\t\\\n-\t\tfor (skb = (sk)->sk_write_queue.next;\t\t\t\\\n-\t\t     (skb != (struct sk_buff *)&(sk)->sk_write_queue);\t\\\n-\t\t     skb = skb->next)\n+\tskb_queue_walk(&(sk)->sk_write_queue, skb)\n \n #define tcp_for_write_queue_from(skb, sk)\t\t\t\t\\\n-\t\tfor (; (skb != (struct sk_buff *)&(sk)->sk_write_queue);\\\n-\t\t     skb = skb->next)\n+\tskb_queue_walk_from(&(sk)->sk_write_queue, skb)\n \n #define tcp_for_write_queue_from_safe(skb, tmp, sk)\t\t\t\\\n-\t\tfor (tmp = skb->next;\t\t\t\t\t\\\n-\t\t     (skb != (struct sk_buff *)&(sk)->sk_write_queue);\t\\\n-\t\t     skb = tmp, tmp = skb->next)\n+\tskb_queue_walk_from_safe(&(sk)->sk_write_queue, skb, tmp)\n \n static inline struct sk_buff *tcp_send_head(struct sock *sk)\n {\n \treturn sk->sk_send_head;\n }\n \n+static inline bool tcp_skb_is_last(const struct sock *sk,\n+\t\t\t\t   const struct sk_buff *skb)\n+{\n+\treturn skb_queue_is_last(&sk->sk_write_queue, skb);\n+}\n+\n static inline void tcp_advance_send_head(struct sock *sk, struct sk_buff *skb)\n {\n-\tsk->sk_send_head = skb->next;\n-\tif (sk->sk_send_head == (struct sk_buff *)&sk->sk_write_queue)\n+\tif (tcp_skb_is_last(sk, skb))\n \t\tsk->sk_send_head = NULL;\n+\telse\n+\t\tsk->sk_send_head = tcp_write_queue_next(sk, skb);\n }\n \n static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlinked)\n@@ -1284,12 +1280,6 @@ static inline void tcp_unlink_write_queue(struct sk_buff *skb, struct sock *sk)\n \t__skb_unlink(skb, &sk->sk_write_queue);\n }\n \n-static inline bool tcp_skb_is_last(const struct sock *sk,\n-\t\t\t\t   const struct sk_buff *skb)\n-{\n-\treturn skb_queue_is_last(&sk->sk_write_queue, skb);\n-}\n-\n static inline int tcp_write_queue_empty(struct sock *sk)\n {\n \treturn skb_queue_empty(&sk->sk_write_queue);\n",
    "prefixes": []
}