get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 718667,
    "url": "http://patchwork.ozlabs.org/api/patches/718667/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170123165831.13402.48374.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": "<20170123165831.13402.48374.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2017-01-23T16:58:35",
    "name": "[next,v3,3/9] igb: Clear Rx buffer_info in configure instead of clean",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "142624f9d6ad0148689ef19ea647c24de0edf6d5",
    "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/20170123165831.13402.48374.stgit@localhost.localdomain/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/718667/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/718667/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 3v6cw50r3yz9s3T\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 24 Jan 2017 03:58:44 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 8E7B787B36;\n\tMon, 23 Jan 2017 16:58:43 +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 R4M7UDlptm9f; Mon, 23 Jan 2017 16:58:41 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 742D987B1C;\n\tMon, 23 Jan 2017 16:58:41 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id C10211C07B7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Jan 2017 16:58:38 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 9CD6330785\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Jan 2017 16:58:38 +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 xOEgTm6JmTQf for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Jan 2017 16:58:36 +0000 (UTC)",
            "from mail-pf0-f196.google.com (mail-pf0-f196.google.com\n\t[209.85.192.196])\n\tby silver.osuosl.org (Postfix) with ESMTPS id A86F0306FE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Jan 2017 16:58:36 +0000 (UTC)",
            "by mail-pf0-f196.google.com with SMTP id y143so10361881pfb.1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 23 Jan 2017 08:58:36 -0800 (PST)",
            "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\tj78sm38264309pfk.39.2017.01.23.08.58.35\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 23 Jan 2017 08:58:35 -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=\"KNb5vEjN\"; 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:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=kETiHkleDHXW3zGctwYe5tEim4H1XXzFv9I37SEWTKs=;\n\tb=KNb5vEjNZ9ZJ7HYOXcS0tyCCXtd3JYnPLIxVrs3BfXQlAdM7z9TQToSPwCg9oxsyuF\n\tjYVszDm/kfmKhKv0A9yj74NGWmaFaWD86o6C/D6wK9tCUA7r8XNJXQUzMPBSIlCA0oVy\n\thqn2WrjMN3vOtULwxqXIlyLUEZ1JPUDjvXaL3TncycKkKXiGy32W+2ZlYay76LWv0Ruf\n\tMacLSpE6pXi0p6B8N1P5rpPiYZTXQukZNCT4GQVhn81981h3G0nU3fjFNxWSZ/5nMRVD\n\tzCZoqQDKmk73Kihkj49a0CBD9GChiVbll8xeoeD0YZMGoCYoCPPDl8Qru4xqLRLFa2bv\n\tNQWA==",
        "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:date:message-id:in-reply-to\n\t:references:user-agent:mime-version:content-transfer-encoding;\n\tbh=kETiHkleDHXW3zGctwYe5tEim4H1XXzFv9I37SEWTKs=;\n\tb=aC42cBz7hEwjIRY8Hw8+HXT0A3u1aHe0ue4tybonGn7VbU/gmvu3w3lVrGtKPA15xm\n\tpArOhlQarT5NjZVHskb29/le4lzPU3dSotpzGGkpje4X0SxLrwPpNXDhyr5nmvDK5c40\n\tRPazj52YoLIirD//t7qGDaGSkwe44MKjOXGIA2c66wOaAguXNPdlotmc7Jk3s7CaEVC/\n\tUFwVDTXncYPU6llqRMmc5rheA7jYpC/0eZDZM2oOS+KRV8iY2L4GnjgOILf1U+iJYcEC\n\tLuOctLDtVLB1lGkHyNYBfXKEgm3uh2YvQ4o6kONWYN1JKe5nhhvNsMHAuypBpkph7php\n\tU+SA==",
        "X-Gm-Message-State": "AIkVDXIOAUAB03jKYdAPtNWiNjcgwV1wGCYklqDzOAzblJNKCiE3nYbA1Bgb1uR0qtwhWQ==",
        "X-Received": "by 10.98.86.203 with SMTP id h72mr33166620pfj.108.1485190716087; \n\tMon, 23 Jan 2017 08:58:36 -0800 (PST)",
        "From": "Alexander Duyck <alexander.duyck@gmail.com>",
        "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com",
        "Date": "Mon, 23 Jan 2017 08:58:35 -0800",
        "Message-ID": "<20170123165831.13402.48374.stgit@localhost.localdomain>",
        "In-Reply-To": "<20170123165647.13402.1254.stgit@localhost.localdomain>",
        "References": "<20170123165647.13402.1254.stgit@localhost.localdomain>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [next PATCH v3 3/9] igb: Clear Rx buffer_info in\n\tconfigure instead of clean",
        "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 change makes it so that instead of going through the entire ring on Rx\ncleanup we only go through the region that was designated to be cleaned up\nand stop when we reach the region where new allocations should start.\n\nIn addition we can avoid having to perform a memset on the Rx buffer_info\nstructures until we are about to start using the ring again.  By deferring\nthis we can avoid dirtying the cache any more than we have to which can\nhelp to improve the time needed to bring the interface down and then back\nup again in a reset or suspend/resume cycle.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\n drivers/net/ethernet/intel/igb/igb_main.c |   24 ++++++++++--------------\n 1 file changed, 10 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c\nindex 91a524b155ce..79a8f3a3356e 100644\n--- a/drivers/net/ethernet/intel/igb/igb_main.c\n+++ b/drivers/net/ethernet/intel/igb/igb_main.c\n@@ -3435,7 +3435,7 @@ int igb_setup_rx_resources(struct igb_ring *rx_ring)\n \n \tsize = sizeof(struct igb_rx_buffer) * rx_ring->count;\n \n-\trx_ring->rx_buffer_info = vzalloc(size);\n+\trx_ring->rx_buffer_info = vmalloc(size);\n \tif (!rx_ring->rx_buffer_info)\n \t\tgoto err;\n \n@@ -3759,6 +3759,10 @@ void igb_configure_rx_ring(struct igb_adapter *adapter,\n \trxdctl |= IGB_RX_HTHRESH << 8;\n \trxdctl |= IGB_RX_WTHRESH << 16;\n \n+\t/* initialize rx_buffer_info */\n+\tmemset(ring->rx_buffer_info, 0,\n+\t       sizeof(struct igb_rx_buffer) * ring->count);\n+\n \t/* initialize Rx descriptor 0 */\n \trx_desc = IGB_RX_DESC(ring, 0);\n \trx_desc->wb.upper.length = 0;\n@@ -3937,23 +3941,16 @@ static void igb_free_all_rx_resources(struct igb_adapter *adapter)\n  **/\n static void igb_clean_rx_ring(struct igb_ring *rx_ring)\n {\n-\tunsigned long size;\n-\tu16 i;\n+\tu16 i = rx_ring->next_to_clean;\n \n \tif (rx_ring->skb)\n \t\tdev_kfree_skb(rx_ring->skb);\n \trx_ring->skb = NULL;\n \n-\tif (!rx_ring->rx_buffer_info)\n-\t\treturn;\n-\n \t/* Free all the Rx ring sk_buffs */\n-\tfor (i = 0; i < rx_ring->count; i++) {\n+\twhile (i != rx_ring->next_to_alloc) {\n \t\tstruct igb_rx_buffer *buffer_info = &rx_ring->rx_buffer_info[i];\n \n-\t\tif (!buffer_info->page)\n-\t\t\tcontinue;\n-\n \t\t/* Invalidate cache lines that may have been written to by\n \t\t * device so that we avoid corrupting memory.\n \t\t */\n@@ -3972,12 +3969,11 @@ static void igb_clean_rx_ring(struct igb_ring *rx_ring)\n \t\t__page_frag_cache_drain(buffer_info->page,\n \t\t\t\t\tbuffer_info->pagecnt_bias);\n \n-\t\tbuffer_info->page = NULL;\n+\t\ti++;\n+\t\tif (i == rx_ring->count)\n+\t\t\ti = 0;\n \t}\n \n-\tsize = sizeof(struct igb_rx_buffer) * rx_ring->count;\n-\tmemset(rx_ring->rx_buffer_info, 0, size);\n-\n \trx_ring->next_to_alloc = 0;\n \trx_ring->next_to_clean = 0;\n \trx_ring->next_to_use = 0;\n",
    "prefixes": [
        "next",
        "v3",
        "3/9"
    ]
}