get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 17211,
    "url": "https://patches.dpdk.org/api/patches/17211/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1479921780-9813-4-git-send-email-wenzhuo.lu@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": "<1479921780-9813-4-git-send-email-wenzhuo.lu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1479921780-9813-4-git-send-email-wenzhuo.lu@intel.com",
    "date": "2016-11-23T17:22:47",
    "name": "[dpdk-dev,03/16] e1000/base: try more times to get HW mailbox lock",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0c3416287f197e0d47428062b7a41fe0c6da8132",
    "submitter": {
        "id": 258,
        "url": "https://patches.dpdk.org/api/people/258/?format=api",
        "name": "Wenzhuo Lu",
        "email": "wenzhuo.lu@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1479921780-9813-4-git-send-email-wenzhuo.lu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/17211/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/17211/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 EA9965681;\n\tThu, 24 Nov 2016 02:32:58 +0100 (CET)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id D892847CD\n\tfor <dev@dpdk.org>; Thu, 24 Nov 2016 02:32:08 +0100 (CET)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga105.jf.intel.com with ESMTP; 23 Nov 2016 17:32:08 -0800",
            "from dpdk26.sh.intel.com ([10.239.128.228])\n\tby fmsmga006.fm.intel.com with ESMTP; 23 Nov 2016 17:32:07 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.31,689,1473145200\"; d=\"scan'208\";a=\"35041863\"",
        "From": "Wenzhuo Lu <wenzhuo.lu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Wenzhuo Lu <wenzhuo.lu@intel.com>",
        "Date": "Wed, 23 Nov 2016 12:22:47 -0500",
        "Message-Id": "<1479921780-9813-4-git-send-email-wenzhuo.lu@intel.com>",
        "X-Mailer": "git-send-email 1.9.3",
        "In-Reply-To": "<1479921780-9813-1-git-send-email-wenzhuo.lu@intel.com>",
        "References": "<1479921780-9813-1-git-send-email-wenzhuo.lu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 03/16] e1000/base: try more times to get HW\n\tmailbox lock",
        "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": "The driver shouldn't just give up if it fails to get the\nhardware mailbox lock. This can happen in a situation\nwhere the PF-VF communication channel is heavily loaded\nand causes complete communications failure between the PF\nand VF drivers.\n\nAdd a counter and a delay. The driver will now retry ten\ntimes, waiting one millsecond between retries.\n\nSigned-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>\n---\n drivers/net/e1000/base/e1000_mbx.c | 36 +++++++++++++++++++++++++-----------\n 1 file changed, 25 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/e1000/base/e1000_mbx.c b/drivers/net/e1000/base/e1000_mbx.c\nindex 6daf16b..a92fd22 100644\n--- a/drivers/net/e1000/base/e1000_mbx.c\n+++ b/drivers/net/e1000/base/e1000_mbx.c\n@@ -430,15 +430,21 @@ STATIC s32 e1000_check_for_rst_vf(struct e1000_hw *hw,\n STATIC s32 e1000_obtain_mbx_lock_vf(struct e1000_hw *hw)\n {\n \ts32 ret_val = -E1000_ERR_MBX;\n+\tint count = 10;\n \n \tDEBUGFUNC(\"e1000_obtain_mbx_lock_vf\");\n \n-\t/* Take ownership of the buffer */\n-\tE1000_WRITE_REG(hw, E1000_V2PMAILBOX(0), E1000_V2PMAILBOX_VFU);\n+\tdo {\n+\t\t/* Take ownership of the buffer */\n+\t\tE1000_WRITE_REG(hw, E1000_V2PMAILBOX(0), E1000_V2PMAILBOX_VFU);\n \n-\t/* reserve mailbox for vf use */\n-\tif (e1000_read_v2p_mailbox(hw) & E1000_V2PMAILBOX_VFU)\n-\t\tret_val = E1000_SUCCESS;\n+\t\t/* reserve mailbox for vf use */\n+\t\tif (e1000_read_v2p_mailbox(hw) & E1000_V2PMAILBOX_VFU) {\n+\t\t\tret_val = E1000_SUCCESS;\n+\t\t\tbreak;\n+\t\t}\n+\t\tusec_delay(1000);\n+\t} while (count-- > 0);\n \n \treturn ret_val;\n }\n@@ -645,18 +651,26 @@ STATIC s32 e1000_obtain_mbx_lock_pf(struct e1000_hw *hw, u16 vf_number)\n {\n \ts32 ret_val = -E1000_ERR_MBX;\n \tu32 p2v_mailbox;\n+\tint count = 10;\n \n \tDEBUGFUNC(\"e1000_obtain_mbx_lock_pf\");\n \n-\t/* Take ownership of the buffer */\n-\tE1000_WRITE_REG(hw, E1000_P2VMAILBOX(vf_number), E1000_P2VMAILBOX_PFU);\n+\tdo {\n+\t\t/* Take ownership of the buffer */\n+\t\tE1000_WRITE_REG(hw, E1000_P2VMAILBOX(vf_number),\n+\t\t\t\tE1000_P2VMAILBOX_PFU);\n \n-\t/* reserve mailbox for vf use */\n-\tp2v_mailbox = E1000_READ_REG(hw, E1000_P2VMAILBOX(vf_number));\n-\tif (p2v_mailbox & E1000_P2VMAILBOX_PFU)\n-\t\tret_val = E1000_SUCCESS;\n+\t\t/* reserve mailbox for pf use */\n+\t\tp2v_mailbox = E1000_READ_REG(hw, E1000_P2VMAILBOX(vf_number));\n+\t\tif (p2v_mailbox & E1000_P2VMAILBOX_PFU) {\n+\t\t\tret_val = E1000_SUCCESS;\n+\t\t\tbreak;\n+\t\t}\n+\t\tusec_delay(1000);\n+\t} while (count-- > 0);\n \n \treturn ret_val;\n+\n }\n \n /**\n",
    "prefixes": [
        "dpdk-dev",
        "03/16"
    ]
}