get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 6986,
    "url": "https://patches.dpdk.org/api/patches/6986/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1441859917-26475-9-git-send-email-xiao.w.wang@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1441859917-26475-9-git-send-email-xiao.w.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1441859917-26475-9-git-send-email-xiao.w.wang@intel.com",
    "date": "2015-09-10T04:38:17",
    "name": "[dpdk-dev,08/28] fm10k: ensure VF restores itr_scale on stop_hw",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "500c466f194045acddf1e46b9468f24e93e6db6a",
    "submitter": {
        "id": 281,
        "url": "https://patches.dpdk.org/api/people/281/?format=api",
        "name": "Xiao Wang",
        "email": "xiao.w.wang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1441859917-26475-9-git-send-email-xiao.w.wang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/6986/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/6986/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 1BE158E88;\n\tThu, 10 Sep 2015 06:39:06 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 943568E94\n\tfor <dev@dpdk.org>; Thu, 10 Sep 2015 06:39:04 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP; 09 Sep 2015 21:39:03 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga002.jf.intel.com with ESMTP; 09 Sep 2015 21:39:02 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t8A4d0hY007370;\n\tThu, 10 Sep 2015 12:39:00 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t8A4cvC5026566; Thu, 10 Sep 2015 12:38:59 +0800",
            "(from xiaowan1@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t8A4cv89026562; \n\tThu, 10 Sep 2015 12:38:57 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,501,1437462000\"; d=\"scan'208\";a=\"801367681\"",
        "From": "Wang Xiao W <xiao.w.wang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 10 Sep 2015 12:38:17 +0800",
        "Message-Id": "<1441859917-26475-9-git-send-email-xiao.w.wang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1441859917-26475-1-git-send-email-xiao.w.wang@intel.com>",
        "References": "<1441859917-26475-1-git-send-email-xiao.w.wang@intel.com>",
        "Cc": "Wang Xiao W <xiao.w.wang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 08/28] fm10k: ensure VF restores itr_scale on\n\tstop_hw",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "In a recent change, the ITR scale was given to the VF via TDLEN\nregisters at driver initialization. This allows the VF to determine what\nthe ITR scale for PCIe link speed should be. However, a VF unload\nfollowed by a reload incorrectly left this value as 0. Thus, the driver\nreloads and uses 0 as the ITR scale instead of the correct value. If the\nVF driver blindly trusted this value it could cause a divide by zero\nfailure.\n\nFix this by having stop_hw_vf reset the ITR scale as the device goes\ndown, similar to the way we handle the MAC address.\n\nSigned-off-by: Wang Xiao W <xiao.w.wang@intel.com>\n---\n drivers/net/fm10k/base/fm10k_vf.c | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/fm10k/base/fm10k_vf.c b/drivers/net/fm10k/base/fm10k_vf.c\nindex ce42189..7981417 100644\n--- a/drivers/net/fm10k/base/fm10k_vf.c\n+++ b/drivers/net/fm10k/base/fm10k_vf.c\n@@ -41,7 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.\n STATIC s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)\n {\n \tu8 *perm_addr = hw->mac.perm_addr;\n-\tu32 bal = 0, bah = 0;\n+\tu32 bal = 0, bah = 0, tdlen;\n \ts32 err;\n \tu16 i;\n \n@@ -63,6 +63,9 @@ STATIC s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)\n \t\t       ((u32)perm_addr[2]);\n \t}\n \n+\t/* restore default itr_scale for next VF initialization */\n+\ttdlen = hw->mac.itr_scale << FM10K_TDLEN_ITR_SCALE_SHIFT;\n+\n \t/* The queues have already been disabled so we just need to\n \t * update their base address registers\n \t */\n@@ -71,6 +74,7 @@ STATIC s32 fm10k_stop_hw_vf(struct fm10k_hw *hw)\n \t\tFM10K_WRITE_REG(hw, FM10K_TDBAH(i), bah);\n \t\tFM10K_WRITE_REG(hw, FM10K_RDBAL(i), bal);\n \t\tFM10K_WRITE_REG(hw, FM10K_RDBAH(i), bah);\n+\t\tFM10K_WRITE_REG(hw, FM10K_TDLEN(i), tdlen);\n \t}\n \n \treturn FM10K_SUCCESS;\n",
    "prefixes": [
        "dpdk-dev",
        "08/28"
    ]
}