get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 711967,
    "url": "http://patchwork.ozlabs.org/api/patches/711967/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170106160622.1501.56085.stgit@localhost.localdomain/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170106160622.1501.56085.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2017-01-06T16:06:33",
    "name": "[next,01/11] ixgbe: Add function for checking to see if we can reuse page",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "c271343587311323db8cc08189c8a3dae28d31c9",
    "submitter": {
        "id": 252,
        "url": "http://patchwork.ozlabs.org/api/people/252/?format=api",
        "name": "Alexander Duyck",
        "email": "alexander.duyck@gmail.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170106160622.1501.56085.stgit@localhost.localdomain/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/711967/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/711967/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3tw8Yq5FTpz9sfH\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  7 Jan 2017 03:06:39 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 475D085BC3;\n\tFri,  6 Jan 2017 16:06:38 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Wz92Br+TPFjD; Fri,  6 Jan 2017 16:06:36 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id A13A685A4E;\n\tFri,  6 Jan 2017 16:06:36 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0D91B1BFA57\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Jan 2017 16:06:36 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 094B22A0DE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Jan 2017 16:06:36 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id CpazO7TSWrOa for <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Jan 2017 16:06:34 +0000 (UTC)",
            "from mail-pg0-f66.google.com (mail-pg0-f66.google.com\n\t[74.125.83.66])\n\tby silver.osuosl.org (Postfix) with ESMTPS id DB73127329\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Jan 2017 16:06:34 +0000 (UTC)",
            "by mail-pg0-f66.google.com with SMTP id 75so6189048pgf.3\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 06 Jan 2017 08:06:34 -0800 (PST)",
            "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\tr26sm157309670pgd.42.2017.01.06.08.06.33\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 06 Jan 2017 08:06:33 -0800 (PST)"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"Lsyc/75E\"; dkim-atps=neutral",
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:from:to:cc:date:message-id:in-reply-to:references\n\t:user-agent:mime-version:content-transfer-encoding;\n\tbh=f5uT1j3+adY7NlJlMi24JnoH61f4nZ1QuYpUUTQEp9k=;\n\tb=Lsyc/75EkEvzsbwH/QoNFYXi2+ZU7mQZ1D8q+HldttyG/t/+MVwug17OCcSloCBswB\n\tkS6J4Bc2NG0KuAphPRMZHtQB4OTvS2/Oo/aOQFPVsfjcOq2Jj7QWL7xsi82nCUdFPB3P\n\t7CjChtQcprnK4R+50rW/6q6XzY00dVbtcpQx+HjET+itNsjHtGSu35loJCF23xrGygUK\n\t4ICO+X/l4wl2yyKT6gzBq07DcJqYtMwpj44Sz4yZaEHO5VWGiMJb/vHn2Ni3MUkG8FLI\n\tSJd8mIb5skdWLd4FDjjRm0/x9XQlnQjeEKwaOx8Utn5ww/0L/oLbsbH+c/NUSdwmRwGu\n\tF+0g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:from:to:cc:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=f5uT1j3+adY7NlJlMi24JnoH61f4nZ1QuYpUUTQEp9k=;\n\tb=YwrhR7Q/IK1GPx4fYZyPfSi1KoFtSCRseBbgYoP9u0aIfOdjUJVLZb2z6sjIYouWEW\n\tfUkIUlMjz5wzYZjdeQ6z+g0kuY7jeIc4Oyqr5HhQ4z/I6xWFCISzWG9TpFBu70Em7XQL\n\tbwBOiQjMxfMFH861tN5emcu5DS2/sYWfotG2k3J29RUKZIVhbdSbtuEXbTfz/2NTke7x\n\tDJwR7f5QCImunOWNyFTy7VLQ94x4sPwwxDVNkVNLTEIgkePQ3lyiVNWBnxbQJnSe67oG\n\tLjDqnU+awFoyjEqBmj+b6Hmh1+3rWe0u2m4SFAM7t4pYSnr7UFVFsczCnidth1Mx8XYV\n\tyzIQ==",
        "X-Gm-Message-State": "AIkVDXLp0GeZxZtjHjCLU5R4PECoEliiHmUiNMQ2WMKE6NddA3X9TNtSwrBcSMCqyAF96Q==",
        "X-Received": "by 10.99.152.10 with SMTP id q10mr142760668pgd.106.1483718794509;\n\tFri, 06 Jan 2017 08:06:34 -0800 (PST)",
        "From": "Alexander Duyck <alexander.duyck@gmail.com>",
        "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com",
        "Date": "Fri, 06 Jan 2017 08:06:33 -0800",
        "Message-ID": "<20170106160622.1501.56085.stgit@localhost.localdomain>",
        "In-Reply-To": "<20170106155448.1501.31298.stgit@localhost.localdomain>",
        "References": "<20170106155448.1501.31298.stgit@localhost.localdomain>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Cc": "netdev@vger.kernel.org",
        "Subject": "[Intel-wired-lan] [next PATCH 01/11] ixgbe: Add function for\n\tchecking to see if we can reuse page",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "From: Alexander Duyck <alexander.h.duyck@intel.com>\n\nThis patch consolidates the code for the ixgbe driver so that it is more\ninline with what is already in igb.  The general idea is to just\nconsolidate functions that represent logical steps in the Rx process so we\ncan later update them more easily.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   70 +++++++++++++++----------\n 1 file changed, 41 insertions(+), 29 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 3beadc8c7a0a..e80d885af4d3 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -1947,6 +1947,41 @@ static inline bool ixgbe_page_is_reserved(struct page *page)\n \treturn (page_to_nid(page) != numa_mem_id()) || page_is_pfmemalloc(page);\n }\n \n+static bool ixgbe_can_reuse_rx_page(struct ixgbe_rx_buffer *rx_buffer,\n+\t\t\t\t    struct page *page,\n+\t\t\t\t    const unsigned int truesize)\n+{\n+#if (PAGE_SIZE >= 8192)\n+\tunsigned int last_offset = ixgbe_rx_pg_size(rx_ring) -\n+\t\t\t\t   ixgbe_rx_bufsz(rx_ring);\n+#endif\n+\t/* avoid re-using remote pages */\n+\tif (unlikely(ixgbe_page_is_reserved(page)))\n+\t\treturn false;\n+\n+#if (PAGE_SIZE < 8192)\n+\t/* if we are only owner of page we can reuse it */\n+\tif (unlikely(page_count(page) != 1))\n+\t\treturn false;\n+\n+\t/* flip page offset to other buffer */\n+\trx_buffer->page_offset ^= truesize;\n+#else\n+\t/* move offset up to the next cache line */\n+\trx_buffer->page_offset += truesize;\n+\n+\tif (rx_buffer->page_offset > last_offset)\n+\t\treturn false;\n+#endif\n+\n+\t/* Even if we own the page, we are not allowed to use atomic_set()\n+\t * This would break get_page_unless_zero() users.\n+\t */\n+\tpage_ref_inc(page);\n+\n+\treturn true;\n+}\n+\n /**\n  * ixgbe_add_rx_frag - Add contents of Rx buffer to sk_buff\n  * @rx_ring: rx descriptor ring to transact packets on\n@@ -1968,18 +2003,18 @@ static bool ixgbe_add_rx_frag(struct ixgbe_ring *rx_ring,\n \t\t\t      struct sk_buff *skb)\n {\n \tstruct page *page = rx_buffer->page;\n+\tunsigned char *va = page_address(page) + rx_buffer->page_offset;\n \tunsigned int size = le16_to_cpu(rx_desc->wb.upper.length);\n #if (PAGE_SIZE < 8192)\n \tunsigned int truesize = ixgbe_rx_bufsz(rx_ring);\n #else\n \tunsigned int truesize = ALIGN(size, L1_CACHE_BYTES);\n-\tunsigned int last_offset = ixgbe_rx_pg_size(rx_ring) -\n-\t\t\t\t   ixgbe_rx_bufsz(rx_ring);\n #endif\n \n-\tif ((size <= IXGBE_RX_HDR_SIZE) && !skb_is_nonlinear(skb)) {\n-\t\tunsigned char *va = page_address(page) + rx_buffer->page_offset;\n+\tif (unlikely(skb_is_nonlinear(skb)))\n+\t\tgoto add_tail_frag;\n \n+\tif (size <= IXGBE_RX_HDR_SIZE) {\n \t\tmemcpy(__skb_put(skb, size), va, ALIGN(size, sizeof(long)));\n \n \t\t/* page is not reserved, we can reuse buffer as-is */\n@@ -1991,34 +2026,11 @@ static bool ixgbe_add_rx_frag(struct ixgbe_ring *rx_ring,\n \t\treturn false;\n \t}\n \n+add_tail_frag:\n \tskb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,\n \t\t\trx_buffer->page_offset, size, truesize);\n \n-\t/* avoid re-using remote pages */\n-\tif (unlikely(ixgbe_page_is_reserved(page)))\n-\t\treturn false;\n-\n-#if (PAGE_SIZE < 8192)\n-\t/* if we are only owner of page we can reuse it */\n-\tif (unlikely(page_count(page) != 1))\n-\t\treturn false;\n-\n-\t/* flip page offset to other buffer */\n-\trx_buffer->page_offset ^= truesize;\n-#else\n-\t/* move offset up to the next cache line */\n-\trx_buffer->page_offset += truesize;\n-\n-\tif (rx_buffer->page_offset > last_offset)\n-\t\treturn false;\n-#endif\n-\n-\t/* Even if we own the page, we are not allowed to use atomic_set()\n-\t * This would break get_page_unless_zero() users.\n-\t */\n-\tpage_ref_inc(page);\n-\n-\treturn true;\n+\treturn ixgbe_can_reuse_rx_page(rx_buffer, page, truesize);\n }\n \n static struct sk_buff *ixgbe_fetch_rx_buffer(struct ixgbe_ring *rx_ring,\n",
    "prefixes": [
        "next",
        "01/11"
    ]
}