get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 460278,
    "url": "http://patchwork.ozlabs.org/api/patches/460278/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20150411001618.24651.38935.stgit@gmw-smvitp108.amr.corp.intel.com/",
    "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": "<20150411001618.24651.38935.stgit@gmw-smvitp108.amr.corp.intel.com>",
    "list_archive_url": null,
    "date": "2015-04-11T00:20:17",
    "name": "[net-next,v2,16/25] fm10k: don't handle mailbox events in iov_event path and always process mailbox",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "708cee93b9f068bedc544d36529ee90fb44cb1c6",
    "submitter": {
        "id": 473,
        "url": "http://patchwork.ozlabs.org/api/people/473/?format=api",
        "name": "Kirsher, Jeffrey T",
        "email": "jeffrey.t.kirsher@intel.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/20150411001618.24651.38935.stgit@gmw-smvitp108.amr.corp.intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/460278/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/460278/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 (whitealder.osuosl.org\n\t[140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 7A1611402F5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 11 Apr 2015 10:20:42 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id EC4328BD64;\n\tSat, 11 Apr 2015 00:20:41 +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 eSOK2Qi3HnFg; Sat, 11 Apr 2015 00:20:40 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id C41BB8BD42;\n\tSat, 11 Apr 2015 00:20:40 +0000 (UTC)",
            "from whitealder.osuosl.org (whitealder.osuosl.org\n\t[140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 86A561C22F4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 11 Apr 2015 00:20:39 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 80B2B8BD64\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 11 Apr 2015 00:20:39 +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 OLAFtr3pWy9R for <intel-wired-lan@lists.osuosl.org>;\n\tSat, 11 Apr 2015 00:20:38 +0000 (UTC)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id C3DBA8BD32\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 11 Apr 2015 00:20:38 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga101.jf.intel.com with ESMTP; 10 Apr 2015 17:20:17 -0700",
            "from bjhicke1-mobl.amr.corp.intel.com (HELO\n\tgmw-smvitp108.amr.corp.intel.com) ([10.254.74.251])\n\tby FMSMGA003.fm.intel.com with ESMTP; 10 Apr 2015 17:20:18 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.11,559,1422950400\"; d=\"scan'208\";a=\"479553119\"",
        "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Fri, 10 Apr 2015 17:20:17 -0700",
        "Message-ID": "<20150411001618.24651.38935.stgit@gmw-smvitp108.amr.corp.intel.com>",
        "User-Agent": "StGit/0.17-dirty",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [net-next v2 16/25] fm10k: don't handle mailbox\n\tevents in iov_event path and always process mailbox",
        "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": "Since we already schedule the service task, we can just wait for this\ntask to handle the mailbox events from the VF. This reduces some complex\ncode flow, and makes it so we have a single path for handling the VF\nmessages. There is a possibility that we have a slight delay in handling\nVF messages, but it should be minimal.\n\nThe result of tx_complete and !rx_ready is insufficient to determine\nwhether we need to process the mailbox. There is a possible race\ncondition whereby the VF fills up the mbmem for us, but we have already\nrecently processed the mailboxes in the interrupt. During this time,\nthe interrupt is disabled. Thus, our Rx FIFO is empty, but the mbmem now\nhas data in it. Since we continually check whether Rx FIFO is empty, we\nthen never call process. This results in the possibility to prevent PF\nfrom handling the VF mailbox messages.\n\nInstead, just call process every time, despite the fact that we may or\nmay not have anything to process for the VF. There should be minimal\noverhead for doing this, and it resolves an issue where the VF never\ncomes up due to never getting response for its SET_LPORT_STATE message.\n\nSigned-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\nAcked-by: Matthew Vick <matthew.vick@intel.com>\n---\nv2: on review, found that additional change was needed in the patch to\n    resolve a possible race condition.\n---\n drivers/net/ethernet/intel/fm10k/fm10k_iov.c |   34 ++------------------------\n drivers/net/ethernet/intel/fm10k/fm10k_pci.c |    3 ++\n 2 files changed, 5 insertions(+), 32 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c\nindex 69cbfde..0b37e19 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c\n@@ -47,7 +47,7 @@ s32 fm10k_iov_event(struct fm10k_intfc *interface)\n {\n \tstruct fm10k_hw *hw = &interface->hw;\n \tstruct fm10k_iov_data *iov_data;\n-\ts64 mbicr, vflre;\n+\ts64 vflre;\n \tint i;\n \n \t/* if there is no iov_data then there is no mailboxes to process */\n@@ -63,7 +63,7 @@ s32 fm10k_iov_event(struct fm10k_intfc *interface)\n \t\tgoto read_unlock;\n \n \tif (!(fm10k_read_reg(hw, FM10K_EICR) & FM10K_EICR_VFLR))\n-\t\tgoto process_mbx;\n+\t\tgoto read_unlock;\n \n \t/* read VFLRE to determine if any VFs have been reset */\n \tdo {\n@@ -86,32 +86,6 @@ s32 fm10k_iov_event(struct fm10k_intfc *interface)\n \t\t}\n \t} while (i != iov_data->num_vfs);\n \n-process_mbx:\n-\t/* read MBICR to determine which VFs require attention */\n-\tmbicr = fm10k_read_reg(hw, FM10K_MBICR(1));\n-\tmbicr <<= 32;\n-\tmbicr |= fm10k_read_reg(hw, FM10K_MBICR(0));\n-\n-\ti = iov_data->next_vf_mbx ? : iov_data->num_vfs;\n-\n-\tfor (mbicr <<= 64 - i; i--; mbicr += mbicr) {\n-\t\tstruct fm10k_mbx_info *mbx = &iov_data->vf_info[i].mbx;\n-\n-\t\tif (mbicr >= 0)\n-\t\t\tcontinue;\n-\n-\t\tif (!hw->mbx.ops.tx_ready(&hw->mbx, FM10K_VFMBX_MSG_MTU))\n-\t\t\tbreak;\n-\n-\t\tmbx->ops.process(hw, mbx);\n-\t}\n-\n-\tif (i >= 0) {\n-\t\tiov_data->next_vf_mbx = i + 1;\n-\t} else if (iov_data->next_vf_mbx) {\n-\t\tiov_data->next_vf_mbx = 0;\n-\t\tgoto process_mbx;\n-\t}\n read_unlock:\n \trcu_read_unlock();\n \n@@ -155,10 +129,6 @@ process_mbx:\n \t\t\tmbx->ops.connect(hw, mbx);\n \t\t}\n \n-\t\t/* no work pending, then just continue */\n-\t\tif (mbx->ops.tx_complete(mbx) && !mbx->ops.rx_ready(mbx))\n-\t\t\tcontinue;\n-\n \t\t/* guarantee we have free space in the SM mailbox */\n \t\tif (!hw->mbx.ops.tx_ready(&hw->mbx, FM10K_VFMBX_MSG_MTU))\n \t\t\tbreak;\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\nindex 64255cd..94c602f 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n@@ -984,6 +984,7 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)\n \t/* service mailboxes */\n \tif (fm10k_mbx_trylock(interface)) {\n \t\tmbx->ops.process(hw, mbx);\n+\t\t/* handle VFLRE events */\n \t\tfm10k_iov_event(interface);\n \t\tfm10k_mbx_unlock(interface);\n \t}\n@@ -1000,6 +1001,8 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)\n \n \t/* we should validate host state after interrupt event */\n \thw->mac.get_host_state = 1;\n+\n+\t/* validate host state, and handle VF mailboxes in the service task */\n \tfm10k_service_event_schedule(interface);\n \n \t/* re-enable mailbox interrupt and indicate 20us delay */\n",
    "prefixes": [
        "net-next",
        "v2",
        "16/25"
    ]
}