get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 593065,
    "url": "http://patchwork.ozlabs.org/api/patches/593065/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160307172957.5682.16383.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": "<20160307172957.5682.16383.stgit@localhost.localdomain>",
    "list_archive_url": null,
    "date": "2016-03-07T17:29:57",
    "name": "[1/5] i40e/i40evf: Fix handling of boolean logic in polling routines",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "f6a99349a09ae31c6330e30a8315dcf01a2f6c84",
    "submitter": {
        "id": 67293,
        "url": "http://patchwork.ozlabs.org/api/people/67293/?format=api",
        "name": "Alexander Duyck",
        "email": "aduyck@mirantis.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/20160307172957.5682.16383.stgit@localhost.localdomain/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/593065/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/593065/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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ozlabs.org (Postfix) with ESMTP id 4A7191401CA\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  8 Mar 2016 04:30:10 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 988C195CDF;\n\tMon,  7 Mar 2016 17:30:09 +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 NncnLn-WxSDu; Mon,  7 Mar 2016 17:30:08 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id AEF5595CCC;\n\tMon,  7 Mar 2016 17:30:08 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id F23D01C1677\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  7 Mar 2016 17:30:06 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id EDD2295CCA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  7 Mar 2016 17:30:06 +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 F3NtlLEtR5bp for <intel-wired-lan@lists.osuosl.org>;\n\tMon,  7 Mar 2016 17:29:58 +0000 (UTC)",
            "from mail-pa0-f54.google.com (mail-pa0-f54.google.com\n\t[209.85.220.54])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id BAC4C95CB6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  7 Mar 2016 17:29:58 +0000 (UTC)",
            "by mail-pa0-f54.google.com with SMTP id tt10so20011002pab.3\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 07 Mar 2016 09:29:58 -0800 (PST)",
            "from localhost.localdomain\n\t(static-50-53-29-36.bvtn.or.frontiernet.net. [50.53.29.36])\n\tby smtp.gmail.com with ESMTPSA id\n\t144sm25384807pfa.83.2016.03.07.09.29.57\n\tfor <intel-wired-lan@lists.osuosl.org>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 07 Mar 2016 09:29:58 -0800 (PST)"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=mirantis.com header.i=@mirantis.com\n\theader.b=Wqj+odWH; dkim-atps=neutral",
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirantis.com;\n\ts=google; \n\th=subject:from:to:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-transfer-encoding;\n\tbh=0ZqVpUu/YPekz/NWQZeh8Mkw8UHTxVd4mCpMmZopOBk=;\n\tb=Wqj+odWHtewXIjQY0bb6ht0TVN4+FB4f+XiklSxiCDwrglP2dtU+/a+/SNZH9awx0Z\n\t+Fcsyb3UHJeKgluJDxI9JeS21p0NZY973VoH1wjZ+vmaUubHFG7C3PbJq8L3tzpBV0P+\n\tyMvHuJQPoQHjVkRonA+YhCJuTirXWaWUifVEQ=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\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=0ZqVpUu/YPekz/NWQZeh8Mkw8UHTxVd4mCpMmZopOBk=;\n\tb=TLcMQk7mTHNqCqXBHY8YvO/RJGv5RtCgqHnESP22ikzfV6ug0YoUSWRh1+YtrSsGks\n\tkY9OWX7ylBbFKF0Am+nL2W4bAQ+AnuG3t/4igHTWqx5mERw4vpjeCb0baPJ44+dJ70r0\n\tfiBnNgF7xrJt34myAbBRINlqwFI5xvf2NOuwNSfp07CQB6TwKElcMHKyV08aaCuaZBgr\n\tVfTwc64Aw7EMgoxdoH7KiuJ1hJpbc4b81W3sECSk4PcPHSMlNbZx2AR3fKn3Gp+9kAsa\n\twSFGYML+SVg/gJaUGwV9ipa67QkE5bJVUo2qLDdYavAGAwfFuRAyeCq8gmtUp0z8Iqib\n\tuEhQ==",
        "X-Gm-Message-State": "AD7BkJLxxX6PDV5PcM+6l63zsDxwxNiBexwDzqAT99Ur+1vrbbj7WNDkrSkSYCPMUAdBXWC9",
        "X-Received": "by 10.66.159.232 with SMTP id xf8mr18986630pab.71.1457371798441; \n\tMon, 07 Mar 2016 09:29:58 -0800 (PST)",
        "From": "Alexander Duyck <aduyck@mirantis.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Mon, 07 Mar 2016 09:29:57 -0800",
        "Message-ID": "<20160307172957.5682.16383.stgit@localhost.localdomain>",
        "In-Reply-To": "<20160307172722.5682.38580.stgit@localhost.localdomain>",
        "References": "<20160307172722.5682.38580.stgit@localhost.localdomain>",
        "User-Agent": "StGit/0.17.1-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH 1/5] i40e/i40evf: Fix handling of boolean\n\tlogic in polling routines",
        "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": "In the polling routines for i40e and i40evf we were using bitwise operators\nto avoid the side effects of the logical operators, specifically the fact\nthat if the first case is true with \"||\" we skip the second case, or if it\nis false with \"&&\" we skip the second case.  This fixes an earlier patch\nthat converted the bitwise operators over to the logical operators and\ninstead replaces the entire thing with just an if statement since it should\nbe more readable what we are trying to do this way.\n\nFixes: 1a36d7fadd14 (\"i40e/i40evf: use logical operators, not bitwise\")\nSigned-off-by: Alexander Duyck <aduyck@mirantis.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_txrx.c   |   13 ++++++++-----\n drivers/net/ethernet/intel/i40evf/i40e_txrx.c |   13 ++++++++-----\n 2 files changed, 16 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex 9af1411bd423..8fb2a966d70e 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -1975,9 +1975,11 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)\n \t * budget and be more aggressive about cleaning up the Tx descriptors.\n \t */\n \ti40e_for_each_ring(ring, q_vector->tx) {\n-\t\tclean_complete = clean_complete &&\n-\t\t\t\t i40e_clean_tx_irq(ring, vsi->work_limit);\n-\t\tarm_wb = arm_wb || ring->arm_wb;\n+\t\tif (!i40e_clean_tx_irq(ring, vsi->work_limit)) {\n+\t\t\tclean_complete = false;\n+\t\t\tcontinue;\n+\t\t}\n+\t\tarm_wb |= ring->arm_wb;\n \t\tring->arm_wb = false;\n \t}\n \n@@ -1999,8 +2001,9 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)\n \t\t\tcleaned = i40e_clean_rx_irq_1buf(ring, budget_per_ring);\n \n \t\twork_done += cleaned;\n-\t\t/* if we didn't clean as many as budgeted, we must be done */\n-\t\tclean_complete = clean_complete && (budget_per_ring > cleaned);\n+\t\t/* if we clean as many as budgeted, we must not be done */\n+\t\tif (cleaned >= budget_per_ring)\n+\t\t\tclean_complete = false;\n \t}\n \n \t/* If work not completed, return budget and polling will return */\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\nindex 5f9c1bbab1fa..839a6df62f72 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c\n@@ -1411,9 +1411,11 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)\n \t * budget and be more aggressive about cleaning up the Tx descriptors.\n \t */\n \ti40e_for_each_ring(ring, q_vector->tx) {\n-\t\tclean_complete = clean_complete &&\n-\t\t\t\t i40e_clean_tx_irq(ring, vsi->work_limit);\n-\t\tarm_wb = arm_wb || ring->arm_wb;\n+\t\tif (!i40e_clean_tx_irq(ring, vsi->work_limit)) {\n+\t\t\tclean_complete = false;\n+\t\t\tcontinue;\n+\t\t}\n+\t\tarm_wb |= ring->arm_wb;\n \t\tring->arm_wb = false;\n \t}\n \n@@ -1435,8 +1437,9 @@ int i40evf_napi_poll(struct napi_struct *napi, int budget)\n \t\t\tcleaned = i40e_clean_rx_irq_1buf(ring, budget_per_ring);\n \n \t\twork_done += cleaned;\n-\t\t/* if we didn't clean as many as budgeted, we must be done */\n-\t\tclean_complete = clean_complete && (budget_per_ring > cleaned);\n+\t\t/* if we clean as many as budgeted, we must not be done */\n+\t\tif (cleaned >= budget_per_ring)\n+\t\t\tclean_complete = false;\n \t}\n \n \t/* If work not completed, return budget and polling will return */\n",
    "prefixes": [
        "1/5"
    ]
}