get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 541151,
    "url": "http://patchwork.ozlabs.org/api/patches/541151/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1446852372-25480-12-git-send-email-joshua.a.hay@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": "<1446852372-25480-12-git-send-email-joshua.a.hay@intel.com>",
    "list_archive_url": null,
    "date": "2015-11-06T23:26:09",
    "name": "[next,S21,11/14] i40e: Remove separate functions gathering XOFF Rx stats",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1b8ef35a93624c01a9825cd90d92a00b4b7a07e6",
    "submitter": {
        "id": 19461,
        "url": "http://patchwork.ozlabs.org/api/people/19461/?format=api",
        "name": "Joshua Hay",
        "email": "joshua.a.hay@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/1446852372-25480-12-git-send-email-joshua.a.hay@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/541151/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/541151/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\tby ozlabs.org (Postfix) with ESMTP id EBFAD14016A\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  7 Nov 2015 10:26:32 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 3E23F332BC;\n\tFri,  6 Nov 2015 23:26:32 +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 cajJ26HvXQot; Fri,  6 Nov 2015 23:26:27 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id DC9C1332C4;\n\tFri,  6 Nov 2015 23:26:23 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id BFC0E1C09CC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Nov 2015 23:26:21 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id BB875A3EBE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Nov 2015 23:26:21 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id RL6xFonymdrl for <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Nov 2015 23:26:21 +0000 (UTC)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 21126A3EDF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri,  6 Nov 2015 23:26:14 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 06 Nov 2015 15:26:13 -0800",
            "from jahay1-mobl2.amr.corp.intel.com (HELO\n\tlocalhost.localdomain.localdomain) ([134.134.176.151])\n\tby FMSMGA003.fm.intel.com with ESMTP; 06 Nov 2015 15:26:13 -0800"
        ],
        "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.20,254,1444719600\"; d=\"scan'208\";a=\"595575991\"",
        "From": "Joshua Hay <joshua.a.hay@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Fri,  6 Nov 2015 15:26:09 -0800",
        "Message-Id": "<1446852372-25480-12-git-send-email-joshua.a.hay@intel.com>",
        "X-Mailer": "git-send-email 2.1.0",
        "In-Reply-To": "<1446852372-25480-1-git-send-email-joshua.a.hay@intel.com>",
        "References": "<1446852372-25480-1-git-send-email-joshua.a.hay@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S21 11/14] i40e: Remove separate\n\tfunctions gathering XOFF Rx stats",
        "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>",
        "MIME-Version": "1.0",
        "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: Neerav Parikh <neerav.parikh@intel.com>\n\nThe separate functions to gather Flow control Rx XOFF stats was to\ndetermine if the Tx for a queue was paused due to Link Flow Control(LFC)\nor Priority Flow Control(PFC).\n\nBut, with recent change in the i40e driver the logic for checking th Tx\nhang has been removed and these functions don't do anything meaningful.\nHence, there is no need to keep these separate functions to gather Rx\nXOFF stats for LFC or PFC.\n\nThis patch removes these functions and moves the stat collection for\nXOFF Rx to the i40e_update_pf_stats() that collects all the PF stats.\n\nSigned-off-by: Neerav Parikh <neerav.parikh@intel.com>\nChange-ID: Iec1452dac3a6766f0d968e754cb407530d7c60cd\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 77 +++--------------------------\n 1 file changed, 7 insertions(+), 70 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 4db7966..af0566c 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -792,75 +792,6 @@ static void i40e_update_fcoe_stats(struct i40e_vsi *vsi)\n \n #endif\n /**\n- * i40e_update_link_xoff_rx - Update XOFF received in link flow control mode\n- * @pf: the corresponding PF\n- *\n- * Update the Rx XOFF counter (PAUSE frames) in link flow control mode\n- **/\n-static void i40e_update_link_xoff_rx(struct i40e_pf *pf)\n-{\n-\tstruct i40e_hw_port_stats *osd = &pf->stats_offsets;\n-\tstruct i40e_hw_port_stats *nsd = &pf->stats;\n-\tstruct i40e_hw *hw = &pf->hw;\n-\tu64 xoff = 0;\n-\n-\tif ((hw->fc.current_mode != I40E_FC_FULL) &&\n-\t    (hw->fc.current_mode != I40E_FC_RX_PAUSE))\n-\t\treturn;\n-\n-\txoff = nsd->link_xoff_rx;\n-\ti40e_stat_update32(hw, I40E_GLPRT_LXOFFRXC(hw->port),\n-\t\t\t   pf->stat_offsets_loaded,\n-\t\t\t   &osd->link_xoff_rx, &nsd->link_xoff_rx);\n-\n-\t/* No new LFC xoff rx */\n-\tif (!(nsd->link_xoff_rx - xoff))\n-\t\treturn;\n-\n-}\n-\n-/**\n- * i40e_update_prio_xoff_rx - Update XOFF received in PFC mode\n- * @pf: the corresponding PF\n- *\n- * Update the Rx XOFF counter (PAUSE frames) in PFC mode\n- **/\n-static void i40e_update_prio_xoff_rx(struct i40e_pf *pf)\n-{\n-\tstruct i40e_hw_port_stats *osd = &pf->stats_offsets;\n-\tstruct i40e_hw_port_stats *nsd = &pf->stats;\n-\tbool xoff[I40E_MAX_TRAFFIC_CLASS] = {false};\n-\tstruct i40e_dcbx_config *dcb_cfg;\n-\tstruct i40e_hw *hw = &pf->hw;\n-\tu16 i;\n-\tu8 tc;\n-\n-\tdcb_cfg = &hw->local_dcbx_config;\n-\n-\t/* Collect Link XOFF stats when PFC is disabled */\n-\tif (!dcb_cfg->pfc.pfcenable) {\n-\t\ti40e_update_link_xoff_rx(pf);\n-\t\treturn;\n-\t}\n-\n-\tfor (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {\n-\t\tu64 prio_xoff = nsd->priority_xoff_rx[i];\n-\n-\t\ti40e_stat_update32(hw, I40E_GLPRT_PXOFFRXC(hw->port, i),\n-\t\t\t\t   pf->stat_offsets_loaded,\n-\t\t\t\t   &osd->priority_xoff_rx[i],\n-\t\t\t\t   &nsd->priority_xoff_rx[i]);\n-\n-\t\t/* No new PFC xoff rx */\n-\t\tif (!(nsd->priority_xoff_rx[i] - prio_xoff))\n-\t\t\tcontinue;\n-\t\t/* Get the TC for given priority */\n-\t\ttc = dcb_cfg->etscfg.prioritytable[i];\n-\t\txoff[tc] = true;\n-\t}\n-}\n-\n-/**\n  * i40e_update_vsi_stats - Update the vsi statistics counters.\n  * @vsi: the VSI to be updated\n  *\n@@ -1054,12 +985,18 @@ static void i40e_update_pf_stats(struct i40e_pf *pf)\n \ti40e_stat_update32(hw, I40E_GLPRT_LXONTXC(hw->port),\n \t\t\t   pf->stat_offsets_loaded,\n \t\t\t   &osd->link_xon_tx, &nsd->link_xon_tx);\n-\ti40e_update_prio_xoff_rx(pf);  /* handles I40E_GLPRT_LXOFFRXC */\n+\ti40e_stat_update32(hw, I40E_GLPRT_LXOFFRXC(hw->port),\n+\t\t\t   pf->stat_offsets_loaded,\n+\t\t\t   &osd->link_xoff_rx, &nsd->link_xoff_rx);\n \ti40e_stat_update32(hw, I40E_GLPRT_LXOFFTXC(hw->port),\n \t\t\t   pf->stat_offsets_loaded,\n \t\t\t   &osd->link_xoff_tx, &nsd->link_xoff_tx);\n \n \tfor (i = 0; i < 8; i++) {\n+\t\ti40e_stat_update32(hw, I40E_GLPRT_PXOFFRXC(hw->port, i),\n+\t\t\t\t   pf->stat_offsets_loaded,\n+\t\t\t\t   &osd->priority_xoff_rx[i],\n+\t\t\t\t   &nsd->priority_xoff_rx[i]);\n \t\ti40e_stat_update32(hw, I40E_GLPRT_PXONRXC(hw->port, i),\n \t\t\t\t   pf->stat_offsets_loaded,\n \t\t\t\t   &osd->priority_xon_rx[i],\n",
    "prefixes": [
        "next",
        "S21",
        "11/14"
    ]
}