get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 724864,
    "url": "http://patchwork.ozlabs.org/api/patches/724864/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170207022547.9864.60500.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": "<20170207022547.9864.60500.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2017-02-07T02:25:50",
    "name": "[next,v5,03/12] igb: Clear Rx buffer_info in configure instead of clean",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "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/20170207022547.9864.60500.stgit@localhost.localdomain/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/724864/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/724864/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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3vHSr36RYyz9s2P\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  7 Feb 2017 13:25:55 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 6BB4630353;\n\tTue,  7 Feb 2017 02:25:54 +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 i8aIGGaeuaPW; Tue,  7 Feb 2017 02:25:53 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 5924830A47;\n\tTue,  7 Feb 2017 02:25:53 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 6851D1BFEC6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Feb 2017 02:25:52 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 628B08A401\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Feb 2017 02:25:52 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id yy8J-lBXt9pd for <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Feb 2017 02:25:51 +0000 (UTC)",
            "from mail-pg0-f67.google.com (mail-pg0-f67.google.com\n\t[74.125.83.67])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id CC22F8A3FA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Feb 2017 02:25:51 +0000 (UTC)",
            "by mail-pg0-f67.google.com with SMTP id 194so10628206pgd.0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 06 Feb 2017 18:25:51 -0800 (PST)",
            "from localhost.localdomain ([2001:470:b:9c3:9e5c:8eff:fe4f:f2d0])\n\tby smtp.gmail.com with ESMTPSA id\n\tz70sm5809937pff.26.2017.02.06.18.25.50\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 06 Feb 2017 18:25:51 -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=\"gxuq8QlU\"; 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=gxuq8QlUnzrU/VkBZxrGFbcGMynEtKBwdlBg4wIFcHq8R9/2Y3PtX/nMZDnFg6NApI\n\t7pcoi9tIprKnrv481LyaHIeweHqK1zk7TuAOrbN2jSBxxxh5j2cjhHZ761cAD8rF6cpW\n\tn/N38r+ybRsQ7TMxSQ/HQTrd3Ev8HTsrcU6p9YSVNF8Wg/p+abXioAz0IGWx4fQCeRYt\n\tu39T+zHqCPXkAsKC//FTj2nY72KeYfeEnYF0GIP8ZG9neeU5GXgowbXCGfCI2zxR/SXz\n\tKsvlhC67tz4rimObEG1IDD7ojD9MQfrgtonne4jiOpwRM8UI/ZERmCuvbGRt/gCzpQmn\n\tc+sw==",
        "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=MIp2RSsmlRUe8hWd0WrC095bgNhPwiV9FaiowPWN0OJIi7g5KfVfHYoLl/Lu17KrBJ\n\tCHC+dLKg3a28xo1wrVbqrBdrLp/lPHTjhu4EkxWu6WVsmc9cZHNGgq723KZ+Tvr5Zn32\n\tkgCZmXzFAJGP80BCbgdGhdI3xRuqo1xjsyqWRKYMKn6HtDjm06tvbpjlIU7RLjYcmGS1\n\tF1RPGQDc/zQA/tHttNGmR8qEiS8TdMyk0WI4kI4FiqOoh/OuFvulZzm712PckBQcfiAK\n\tt/FJ6gw7HcsBLr+VxABIOthHj3NvzUWWBxL+6l6rsurijN4NCckMZNFyS8Q300zm3gOt\n\tWeZw==",
        "X-Gm-Message-State": "AIkVDXIx25/dpzckaiWZeNDBueOhiGS7jTWBt0RdlZWTiAufPOSqdkgY6LjA1NKdjIJ+qQ==",
        "X-Received": "by 10.84.139.195 with SMTP id 61mr22119331plr.116.1486434351464; \n\tMon, 06 Feb 2017 18:25:51 -0800 (PST)",
        "From": "Alexander Duyck <alexander.duyck@gmail.com>",
        "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com",
        "Date": "Mon, 06 Feb 2017 18:25:50 -0800",
        "Message-ID": "<20170207022547.9864.60500.stgit@localhost.localdomain>",
        "In-Reply-To": "<20170207022339.9864.87863.stgit@localhost.localdomain>",
        "References": "<20170207022339.9864.87863.stgit@localhost.localdomain>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [next PATCH v5 03/12] igb: Clear Rx buffer_info\n\tin configure 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",
        "v5",
        "03/12"
    ]
}