get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54294,
    "url": "http://patches.dpdk.org/api/patches/54294/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190604054248.68510-19-leyi.rong@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20190604054248.68510-19-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190604054248.68510-19-leyi.rong@intel.com",
    "date": "2019-06-04T05:42:17",
    "name": "[18/49] net/ice/base: move and redefine ice debug cq API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "40c518f20eb49dbf0886415e527e5c16c869fe17",
    "submitter": {
        "id": 1204,
        "url": "http://patches.dpdk.org/api/people/1204/?format=api",
        "name": "Leyi Rong",
        "email": "leyi.rong@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190604054248.68510-19-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 4879,
            "url": "http://patches.dpdk.org/api/series/4879/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4879",
            "date": "2019-06-04T05:41:59",
            "name": "shared code update",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4879/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54294/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54294/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 78FA11BB3A;\n\tTue,  4 Jun 2019 07:44:39 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 2056B1B9E7\n\tfor <dev@dpdk.org>; Tue,  4 Jun 2019 07:44:13 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Jun 2019 22:44:13 -0700",
            "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby fmsmga008.fm.intel.com with ESMTP; 03 Jun 2019 22:44:12 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Leyi Rong <leyi.rong@intel.com>",
        "To": "qi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>,\n\tJacob Keller <jacob.e.keller@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Tue,  4 Jun 2019 13:42:17 +0800",
        "Message-Id": "<20190604054248.68510-19-leyi.rong@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190604054248.68510-1-leyi.rong@intel.com>",
        "References": "<20190604054248.68510-1-leyi.rong@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 18/49] net/ice/base: move and redefine ice debug\n\tcq API",
        "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 ice_debug_cq function is only called from ice_controlq.c, and has no\nother callers outside of that file. Move it and mark it static to avoid\nnamespace pollution.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Leyi Rong <leyi.rong@intel.com>\n---\n drivers/net/ice/base/ice_common.c   | 47 -------------------------\n drivers/net/ice/base/ice_common.h   |  2 --\n drivers/net/ice/base/ice_controlq.c | 54 +++++++++++++++++++++++++++--\n 3 files changed, 51 insertions(+), 52 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c\nindex 7093ee4f4..c1af24322 100644\n--- a/drivers/net/ice/base/ice_common.c\n+++ b/drivers/net/ice/base/ice_common.c\n@@ -1474,53 +1474,6 @@ ice_clear_tx_drbell_q_ctx(struct ice_hw *hw, u32 tx_drbell_q_index)\n }\n #endif /* !NO_UNUSED_CTX_CODE || AE_DRIVER */\n \n-/**\n- * ice_debug_cq\n- * @hw: pointer to the hardware structure\n- * @mask: debug mask\n- * @desc: pointer to control queue descriptor\n- * @buf: pointer to command buffer\n- * @buf_len: max length of buf\n- *\n- * Dumps debug log about control command with descriptor contents.\n- */\n-void\n-ice_debug_cq(struct ice_hw *hw, u32 mask, void *desc, void *buf, u16 buf_len)\n-{\n-\tstruct ice_aq_desc *cq_desc = (struct ice_aq_desc *)desc;\n-\tu16 len;\n-\n-\tif (!(mask & hw->debug_mask))\n-\t\treturn;\n-\n-\tif (!desc)\n-\t\treturn;\n-\n-\tlen = LE16_TO_CPU(cq_desc->datalen);\n-\n-\tice_debug(hw, mask,\n-\t\t  \"CQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\\n\",\n-\t\t  LE16_TO_CPU(cq_desc->opcode),\n-\t\t  LE16_TO_CPU(cq_desc->flags),\n-\t\t  LE16_TO_CPU(cq_desc->datalen), LE16_TO_CPU(cq_desc->retval));\n-\tice_debug(hw, mask, \"\\tcookie (h,l) 0x%08X 0x%08X\\n\",\n-\t\t  LE32_TO_CPU(cq_desc->cookie_high),\n-\t\t  LE32_TO_CPU(cq_desc->cookie_low));\n-\tice_debug(hw, mask, \"\\tparam (0,1)  0x%08X 0x%08X\\n\",\n-\t\t  LE32_TO_CPU(cq_desc->params.generic.param0),\n-\t\t  LE32_TO_CPU(cq_desc->params.generic.param1));\n-\tice_debug(hw, mask, \"\\taddr (h,l)   0x%08X 0x%08X\\n\",\n-\t\t  LE32_TO_CPU(cq_desc->params.generic.addr_high),\n-\t\t  LE32_TO_CPU(cq_desc->params.generic.addr_low));\n-\tif (buf && cq_desc->datalen != 0) {\n-\t\tice_debug(hw, mask, \"Buffer:\\n\");\n-\t\tif (buf_len < len)\n-\t\t\tlen = buf_len;\n-\n-\t\tice_debug_array(hw, mask, 16, 1, (u8 *)buf, len);\n-\t}\n-}\n-\n \n /* FW Admin Queue command wrappers */\n \ndiff --git a/drivers/net/ice/base/ice_common.h b/drivers/net/ice/base/ice_common.h\nindex cccb5f009..58f22b0d3 100644\n--- a/drivers/net/ice/base/ice_common.h\n+++ b/drivers/net/ice/base/ice_common.h\n@@ -20,8 +20,6 @@ enum ice_fw_modes {\n \n enum ice_status ice_nvm_validate_checksum(struct ice_hw *hw);\n \n-void\n-ice_debug_cq(struct ice_hw *hw, u32 mask, void *desc, void *buf, u16 buf_len);\n enum ice_status ice_init_hw(struct ice_hw *hw);\n void ice_deinit_hw(struct ice_hw *hw);\n enum ice_status ice_check_reset(struct ice_hw *hw);\ndiff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice_controlq.c\nindex f3404023a..90dec0156 100644\n--- a/drivers/net/ice/base/ice_controlq.c\n+++ b/drivers/net/ice/base/ice_controlq.c\n@@ -727,6 +727,54 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)\n \treturn ICE_CTL_Q_DESC_UNUSED(sq);\n }\n \n+/**\n+ * ice_debug_cq\n+ * @hw: pointer to the hardware structure\n+ * @desc: pointer to control queue descriptor\n+ * @buf: pointer to command buffer\n+ * @buf_len: max length of buf\n+ *\n+ * Dumps debug log about control command with descriptor contents.\n+ */\n+static void ice_debug_cq(struct ice_hw *hw, void *desc, void *buf, u16 buf_len)\n+{\n+\tstruct ice_aq_desc *cq_desc = (struct ice_aq_desc *)desc;\n+\tu16 datalen, flags;\n+\n+\tif (!((ICE_DBG_AQ_DESC | ICE_DBG_AQ_DESC_BUF) & hw->debug_mask))\n+\t\treturn;\n+\n+\tif (!desc)\n+\t\treturn;\n+\n+\tdatalen = LE16_TO_CPU(cq_desc->datalen);\n+\tflags = LE16_TO_CPU(cq_desc->flags);\n+\n+\tice_debug(hw, ICE_DBG_AQ_DESC,\n+\t\t  \"CQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\\n\",\n+\t\t  LE16_TO_CPU(cq_desc->opcode), flags, datalen,\n+\t\t  LE16_TO_CPU(cq_desc->retval));\n+\tice_debug(hw, ICE_DBG_AQ_DESC, \"\\tcookie (h,l) 0x%08X 0x%08X\\n\",\n+\t\t  LE32_TO_CPU(cq_desc->cookie_high),\n+\t\t  LE32_TO_CPU(cq_desc->cookie_low));\n+\tice_debug(hw, ICE_DBG_AQ_DESC, \"\\tparam (0,1)  0x%08X 0x%08X\\n\",\n+\t\t  LE32_TO_CPU(cq_desc->params.generic.param0),\n+\t\t  LE32_TO_CPU(cq_desc->params.generic.param1));\n+\tice_debug(hw, ICE_DBG_AQ_DESC, \"\\taddr (h,l)   0x%08X 0x%08X\\n\",\n+\t\t  LE32_TO_CPU(cq_desc->params.generic.addr_high),\n+\t\t  LE32_TO_CPU(cq_desc->params.generic.addr_low));\n+\t/* Dump buffer iff 1) one exists and 2) is either a response indicated\n+\t * by the DD and/or CMP flag set or a command with the RD flag set.\n+\t */\n+\tif (buf && cq_desc->datalen != 0 &&\n+\t    (flags & (ICE_AQ_FLAG_DD | ICE_AQ_FLAG_CMP) ||\n+\t     flags & ICE_AQ_FLAG_RD)) {\n+\t\tice_debug(hw, ICE_DBG_AQ_DESC_BUF, \"Buffer:\\n\");\n+\t\tice_debug_array(hw, ICE_DBG_AQ_DESC_BUF, 16, 1, (u8 *)buf,\n+\t\t\t\tmin(buf_len, datalen));\n+\t}\n+}\n+\n /**\n  * ice_sq_done - check if FW has processed the Admin Send Queue (ATQ)\n  * @hw: pointer to the HW struct\n@@ -886,7 +934,7 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,\n \tice_debug(hw, ICE_DBG_AQ_MSG,\n \t\t  \"ATQ: Control Send queue desc and buffer:\\n\");\n \n-\tice_debug_cq(hw, ICE_DBG_AQ_CMD, (void *)desc_on_ring, buf, buf_size);\n+\tice_debug_cq(hw, (void *)desc_on_ring, buf, buf_size);\n \n \n \t(cq->sq.next_to_use)++;\n@@ -950,7 +998,7 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,\n \tice_debug(hw, ICE_DBG_AQ_MSG,\n \t\t  \"ATQ: desc and buffer writeback:\\n\");\n \n-\tice_debug_cq(hw, ICE_DBG_AQ_CMD, (void *)desc, buf, buf_size);\n+\tice_debug_cq(hw, (void *)desc, buf, buf_size);\n \n \n \t/* save writeback AQ if requested */\n@@ -1055,7 +1103,7 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq,\n \n \tice_debug(hw, ICE_DBG_AQ_MSG, \"ARQ: desc and buffer:\\n\");\n \n-\tice_debug_cq(hw, ICE_DBG_AQ_CMD, (void *)desc, e->msg_buf,\n+\tice_debug_cq(hw, (void *)desc, e->msg_buf,\n \t\t     cq->rq_buf_size);\n \n \n",
    "prefixes": [
        "18/49"
    ]
}