get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 60519,
    "url": "http://patchwork.dpdk.org/api/patches/60519/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20191004050246.90165-7-ajit.khaparde@broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20191004050246.90165-7-ajit.khaparde@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191004050246.90165-7-ajit.khaparde@broadcom.com",
    "date": "2019-10-04T05:02:42",
    "name": "[06/10] net/bnxt: get the default HWRM command timeout from firmware",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "cc7999506a9de6760989a6f1195a073af7741f68",
    "submitter": {
        "id": 501,
        "url": "http://patchwork.dpdk.org/api/people/501/?format=api",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20191004050246.90165-7-ajit.khaparde@broadcom.com/mbox/",
    "series": [
        {
            "id": 6688,
            "url": "http://patchwork.dpdk.org/api/series/6688/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=6688",
            "date": "2019-10-04T05:02:37",
            "name": "bnxt patchset with bug fixes",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/6688/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/60519/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/60519/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 864831C1D6;\n\tFri,  4 Oct 2019 07:03:08 +0200 (CEST)",
            "from rnd-relay.smtp.broadcom.com (unknown [192.19.229.170])\n\tby dpdk.org (Postfix) with ESMTP id 8B0631C1A5\n\tfor <dev@dpdk.org>; Fri,  4 Oct 2019 07:02:55 +0200 (CEST)",
            "from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net\n\t[10.75.242.48])\n\tby rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id A815E30C2CB;\n\tThu,  3 Oct 2019 22:01:34 -0700 (PDT)",
            "from localhost.localdomain (unknown [10.230.30.225])\n\tby mail-irv-17.broadcom.com (Postfix) with ESMTP id A295E140090;\n\tThu,  3 Oct 2019 22:02:50 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com A815E30C2CB",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n\ts=dkimrelay; t=1570165294;\n\tbh=L4XJVWN+NYa6P7CARQJUkJyeB/W9JU6SpgVateMEMuQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=BXbJcZ2ZfQT4hbHfsLZkvR9FcH4qjuYJlN0fiVFbBjSFwFvjjx+Mj4KYNX6a0zhpJ\n\tUZhjJuN7Acakqnw5RJy1Rb5unFCjdPF+zLUYHqf6WOrOr0TrycqWF16pJqf5ozKLv+\n\tCSW35ogFL0d6up/Pt7b0+RzN45yx1Ld27PjNAjdY=",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com,\n\tSantoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>,\n\tLance Richardson <lance.richardson@broadcom.com>",
        "Date": "Thu,  3 Oct 2019 22:02:42 -0700",
        "Message-Id": "<20191004050246.90165-7-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.20.1 (Apple Git-117)",
        "In-Reply-To": "<20191004050246.90165-1-ajit.khaparde@broadcom.com>",
        "References": "<20191004050246.90165-1-ajit.khaparde@broadcom.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 06/10] net/bnxt: get the default HWRM command\n\ttimeout from firmware",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/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 HWRM command timeout is set to a very high value.\nVER_GET command response returns the default request timeout value.\nUse this value for waiting for HWRM commands to complete.\nPoll for the valid bit every 1us instead of 600us.\n\nSigned-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>\nSigned-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\nReviewed-by: Lance Richardson <lance.richardson@broadcom.com>\n---\n drivers/net/bnxt/bnxt.h      |  5 +++++\n drivers/net/bnxt/bnxt_hwrm.c | 13 +++++++++----\n 2 files changed, 14 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h\nindex ad0b18dddd..5020cd3415 100644\n--- a/drivers/net/bnxt/bnxt.h\n+++ b/drivers/net/bnxt/bnxt.h\n@@ -525,6 +525,11 @@ struct bnxt {\n \tuint16_t\t\t\tmax_resp_len;\n \tuint16_t                        hwrm_max_ext_req_len;\n \n+\t /* default command timeout value of 50ms */\n+#define HWRM_CMD_TIMEOUT\t\t50000\n+\t/* default HWRM request timeout value */\n+\tuint32_t\t\t\thwrm_cmd_timeout;\n+\n \tstruct bnxt_link_info\tlink_info;\n \tstruct bnxt_cos_queue_info\trx_cos_queue[BNXT_COS_QUEUE_COUNT];\n \tstruct bnxt_cos_queue_info\ttx_cos_queue[BNXT_COS_QUEUE_COUNT];\ndiff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c\nindex a40197e929..5e3117fee9 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.c\n+++ b/drivers/net/bnxt/bnxt_hwrm.c\n@@ -25,8 +25,6 @@\n \n #include <rte_io.h>\n \n-#define HWRM_CMD_TIMEOUT\t\t6000000\n-#define HWRM_SHORT_CMD_TIMEOUT\t\t50000\n #define HWRM_SPEC_CODE_1_8_3\t\t0x10803\n #define HWRM_VERSION_1_9_1\t\t0x10901\n #define HWRM_VERSION_1_9_2\t\t0x10903\n@@ -105,9 +103,9 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,\n \n \t/* For VER_GET command, set timeout as 50ms */\n \tif (rte_cpu_to_le_16(req->req_type) == HWRM_VER_GET)\n-\t\ttimeout = HWRM_SHORT_CMD_TIMEOUT;\n-\telse\n \t\ttimeout = HWRM_CMD_TIMEOUT;\n+\telse\n+\t\ttimeout = bp->hwrm_cmd_timeout;\n \n \tif (bp->flags & BNXT_FLAG_SHORT_CMD ||\n \t    msg_len > bp->max_req_len) {\n@@ -969,6 +967,13 @@ int bnxt_hwrm_ver_get(struct bnxt *bp)\n \tfw_version |= resp->hwrm_intf_upd_8b;\n \tbp->hwrm_spec_code = fw_version;\n \n+\t/* def_req_timeout value is in milliseconds */\n+\tbp->hwrm_cmd_timeout = rte_le_to_cpu_16(resp->def_req_timeout);\n+\t/* convert timeout to usec */\n+\tbp->hwrm_cmd_timeout *= 1000;\n+\tif (!bp->hwrm_cmd_timeout)\n+\t\tbp->hwrm_cmd_timeout = HWRM_CMD_TIMEOUT;\n+\n \tif (resp->hwrm_intf_maj_8b != HWRM_VERSION_MAJOR) {\n \t\tPMD_DRV_LOG(ERR, \"Unsupported firmware API version\\n\");\n \t\trc = -EINVAL;\n",
    "prefixes": [
        "06/10"
    ]
}