get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 328,
    "url": "http://patches.dpdk.org/api/patches/328/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1410247299-4365-7-git-send-email-helin.zhang@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": "<1410247299-4365-7-git-send-email-helin.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1410247299-4365-7-git-send-email-helin.zhang@intel.com",
    "date": "2014-09-09T07:21:30",
    "name": "[dpdk-dev,06/15] i40e: remove useless code for pre-boot support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "91b4073af2f699769346b139c6f883d7aebffabb",
    "submitter": {
        "id": 14,
        "url": "http://patches.dpdk.org/api/people/14/?format=api",
        "name": "Zhang, Helin",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1410247299-4365-7-git-send-email-helin.zhang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/328/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/328/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 6A1FBB3B9;\n\tTue,  9 Sep 2014 09:17:39 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 391F7B3DF\n\tfor <dev@dpdk.org>; Tue,  9 Sep 2014 09:17:37 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga102.jf.intel.com with ESMTP; 09 Sep 2014 00:16:34 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga002.jf.intel.com with ESMTP; 09 Sep 2014 00:22:04 -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 s897M26t008707;\n\tTue, 9 Sep 2014 15:22:02 +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 s897M0YJ004467; Tue, 9 Sep 2014 15:22:02 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s897M0jG004463; \n\tTue, 9 Sep 2014 15:22:00 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,491,1406617200\"; d=\"scan'208\";a=\"600087273\"",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  9 Sep 2014 15:21:30 +0800",
        "Message-Id": "<1410247299-4365-7-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1410247299-4365-1-git-send-email-helin.zhang@intel.com>",
        "References": "<1410247299-4365-1-git-send-email-helin.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 06/15] i40e: remove useless code for pre-boot\n\tsupport",
        "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 code wrapped in '#ifdef PREBOOT_SUPPORT' was added for\nqueue context initialization specifically for A0 silicon.\nAs A0 silicon has gone for a long time, the code should be\nremoved at all. In addition, the checks of 'QV_RELEASE'\nand 'PREBOOT_SUPPORT' are also not needed anymore and can\nbe removed.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\nReviewed-by: Chen Jing <jing.d.chen@intel.com>\n---\n lib/librte_pmd_i40e/i40e/i40e_common.c  |   3 -\n lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c | 203 --------------------------------\n lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h |  13 --\n 3 files changed, 219 deletions(-)",
    "diff": "diff --git a/lib/librte_pmd_i40e/i40e/i40e_common.c b/lib/librte_pmd_i40e/i40e/i40e_common.c\nindex 6cdc0ff..4254aad 100644\n--- a/lib/librte_pmd_i40e/i40e/i40e_common.c\n+++ b/lib/librte_pmd_i40e/i40e/i40e_common.c\n@@ -922,11 +922,8 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw)\n \t\t}\n \t}\n \n-#if !defined(QV_RELEASE) && !defined(PREBOOT_SUPPORT)\n \ti40e_clear_pxe_mode(hw);\n \n-#endif\n-\n \treturn I40E_SUCCESS;\n }\n \ndiff --git a/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c b/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c\nindex d5e7d44..9f98d6d 100644\n--- a/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c\n+++ b/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c\n@@ -1411,206 +1411,3 @@ enum i40e_status_code i40e_set_lan_rx_queue_context(struct i40e_hw *hw,\n \treturn i40e_set_hmc_context(context_bytes,\n \t\t\t\t    i40e_hmc_rxq_ce_info, (u8 *)s);\n }\n-#ifdef PREBOOT_SUPPORT\n-\n-/* Definitions for PFM bypass registers */\n-\n-/* Each context sub-line consists of 128 bits (16 bytes) of data*/\n-#define SUB_LINE_LENGTH          0x10\n-\n-#define LANCTXCTL_WR             0x1\n-#define LANCTXCTL_INVALIDATE     0x2\n-#define LANCTXCTL_QUEUE_TYPE_TX  0x1\n-#define LANCTXCTL_QUEUE_TYPE_RX  0x0\n-\n-#define LANCTXSTAT_DELAY         100\n-\n-/**\n- * i40e_write_queue_context_directly\n- * @hw: the hardware struct\n- * @queue: the absolute queue number\n- * @context_bytes: data to write as a queue context\n- * @hmc_type: queue type\n- *\n- * Write the HMC context for the queue using direct queue context programming\n- **/\n-static enum i40e_status_code i40e_write_queue_context_directly(struct i40e_hw *hw,\n-\t\t\t\t\tu16 queue, u8 *context_bytes,\n-\t\t\t\t\tenum i40e_hmc_lan_rsrc_type hmc_type)\n-{\n-\tu32 length = 0;\n-\tu32 queue_type = 0;\n-\tu32 sub_line = 0;\n-\tu32 i = 0;\n-\tu32 cnt = 0;\n-\tu32 *ptr = NULL;\n-\tenum i40e_status_code ret_code = I40E_SUCCESS;\n-\n-\tswitch (hmc_type) {\n-\tcase I40E_HMC_LAN_RX:\n-\t\tlength = I40E_HMC_OBJ_SIZE_RXQ;\n-\t\tqueue_type = LANCTXCTL_QUEUE_TYPE_RX;\n-\t\tbreak;\n-\tcase I40E_HMC_LAN_TX:\n-\t\tlength = I40E_HMC_OBJ_SIZE_TXQ;\n-\t\tqueue_type = LANCTXCTL_QUEUE_TYPE_TX;\n-\t\tbreak;\n-\tdefault:\n-\t\treturn I40E_NOT_SUPPORTED;\n-\t}\n-\n-\tptr = (u32 *)context_bytes;\n-\n-\tfor (sub_line = 0; sub_line < (length / SUB_LINE_LENGTH); sub_line++) {\n-\t\tu32 reg;\n-\n-\t\tfor (i = 0; i < 4; i++)\n-\t\t\twr32(hw, I40E_PFCM_LANCTXDATA(i), *ptr++);\n-\t\treg = (LANCTXCTL_WR << I40E_PFCM_LANCTXCTL_OP_CODE_SHIFT) |\n-\t\t      (queue_type << I40E_PFCM_LANCTXCTL_QUEUE_TYPE_SHIFT) |\n-\t\t      (sub_line << I40E_PFCM_LANCTXCTL_SUB_LINE_SHIFT) |\n-\t\t      (queue << I40E_PFCM_LANCTXCTL_QUEUE_NUM_SHIFT);\n-\t\twr32(hw, I40E_PFCM_LANCTXCTL, reg);\n-\n-\t\tcnt = 0;\n-\t\twhile (cnt++ <= LANCTXSTAT_DELAY) {\n-\t\t\treg = rd32(hw, I40E_PFCM_LANCTXSTAT);\n-\t\t\tif (reg)\n-\t\t\t\tbreak;\n-\t\t\ti40e_usec_delay(1);\n-\t\t};\n-\n-\t\tif ((reg & I40E_PFCM_LANCTXSTAT_CTX_DONE_MASK) == 0) {\n-\t\t\tret_code = I40E_ERR_CONFIG;\n-\t\t\tbreak;\n-\t\t}\n-\t}\n-\treturn ret_code;\n-}\n-\n-/**\n- * i40e_invalidate_queue_context_directly\n- * @hw: the hardware struct\n- * @queue: the absolute queue number\n- * @hmc_type: queue type\n- *\n- * Clear the HMC context for the queue using direct queue context programming\n- **/\n-static enum i40e_status_code i40e_invalidate_queue_context_directly(struct i40e_hw *hw,\n-\t\t\t\t\tu16 queue,\n-\t\t\t\t\tenum i40e_hmc_lan_rsrc_type hmc_type)\n-{\n-\tu8 queue_type = 0;\n-\tu32 reg = 0;\n-\tu32 cnt = 0;\n-\tenum i40e_status_code ret_code = I40E_SUCCESS;\n-\n-\tswitch (hmc_type) {\n-\tcase I40E_HMC_LAN_RX:\n-\t\tqueue_type = LANCTXCTL_QUEUE_TYPE_RX;\n-\t\tbreak;\n-\tcase I40E_HMC_LAN_TX:\n-\t\tqueue_type = LANCTXCTL_QUEUE_TYPE_TX;\n-\t\tbreak;\n-\tdefault:\n-\t\treturn I40E_NOT_SUPPORTED;\n-\t}\n-\treg = (LANCTXCTL_INVALIDATE << I40E_PFCM_LANCTXCTL_OP_CODE_SHIFT) |\n-\t      (queue_type << I40E_PFCM_LANCTXCTL_QUEUE_TYPE_SHIFT) |\n-\t      (queue << I40E_PFCM_LANCTXCTL_QUEUE_NUM_SHIFT);\n-\twr32(hw, I40E_PFCM_LANCTXCTL, reg);\n-\twhile (cnt++ <= LANCTXSTAT_DELAY) {\n-\t\treg = rd32(hw, I40E_PFCM_LANCTXSTAT);\n-\t\tif (reg)\n-\t\t\tbreak;\n-\t\ti40e_usec_delay(1);\n-\t};\n-\n-\tif (reg != I40E_PFCM_LANCTXSTAT_CTX_DONE_MASK)\n-\t\tret_code = I40E_ERR_CONFIG;\n-\n-\treturn ret_code;\n-}\n-\n-/**\n- * i40e_clear_lan_tx_queue_context_directly\n- * @hw: the hardware struct\n- * @queue: the absolute queue number\n- *\n- * Clear the HMC context for the Tx queue using direct queue context programming\n- **/\n-enum i40e_status_code i40e_clear_lan_tx_queue_context_directly(\n-\t\t\t\tstruct i40e_hw *hw, u16 queue)\n-{\n-\treturn i40e_invalidate_queue_context_directly(hw, queue,\n-\t\t\t\t\t\t      I40E_HMC_LAN_TX);\n-}\n-\n-/**\n- * i40e_set_lan_tx_queue_context_directly\n- * @hw: the hardware struct\n- * @queue: the absolute queue number\n- * @s: the struct to be filled\n- *\n- * Prepare and set the HMC context for the Tx queue\n- * using direct queue context programming\n- **/\n-enum i40e_status_code i40e_set_lan_tx_queue_context_directly(struct i40e_hw *hw,\n-\t\t\t\tu16 queue, struct i40e_hmc_obj_txq *s)\n-{\n-\tenum i40e_status_code status;\n-\tu8 context_bytes[I40E_HMC_OBJ_SIZE_TXQ];\n-\n-\t/* Zero out context bytes */\n-\ti40e_memset(context_bytes, 0, I40E_HMC_OBJ_SIZE_TXQ, I40E_DMA_MEM);\n-\n-\tstatus = i40e_set_hmc_context(context_bytes, i40e_hmc_txq_ce_info,\n-\t\t\t\t      (u8 *)s);\n-\tif (status)\n-\t\treturn status;\n-\n-\treturn i40e_write_queue_context_directly(hw, queue, context_bytes,\n-\t\t\t\t\t\t I40E_HMC_LAN_TX);\n-}\n-\n-/**\n- * i40e_clear_lan_rx_queue_context_directly\n- * @hw: the hardware struct\n- * @queue: the absolute queue number\n- *\n- * Clear the HMC context for the Rx queue using direct queue context programming\n- **/\n-enum i40e_status_code i40e_clear_lan_rx_queue_context_directly(struct i40e_hw *hw,\n-\t\t\t\tu16 queue)\n-{\n-\treturn i40e_invalidate_queue_context_directly(hw, queue,\n-\t\t\t\t\t\t      I40E_HMC_LAN_RX);\n-}\n-\n-/**\n- * i40e_set_lan_rx_queue_context_directly\n- * @hw: the hardware struct\n- * @queue: the queue we care about\n- * @s: the struct to be filled\n- *\n- * Prepare and set the HMC context for the Rx queue\n- * using direct queue context programming\n- **/\n-enum i40e_status_code i40e_set_lan_rx_queue_context_directly(struct i40e_hw *hw,\n-\t\t\t\tu16 queue, struct i40e_hmc_obj_rxq *s)\n-{\n-\tenum i40e_status_code status;\n-\tu8 context_bytes[I40E_HMC_OBJ_SIZE_RXQ];\n-\n-\t/* Zero out context bytes */\n-\ti40e_memset(context_bytes, 0, I40E_HMC_OBJ_SIZE_RXQ, I40E_DMA_MEM);\n-\n-\tstatus = i40e_set_hmc_context(context_bytes, i40e_hmc_rxq_ce_info,\n-\t\t\t\t     (u8 *)s);\n-\tif (status)\n-\t\treturn status;\n-\n-\treturn i40e_write_queue_context_directly(hw, queue, context_bytes,\n-\t\t\t\t\t\t I40E_HMC_LAN_RX);\n-}\n-#endif /* PREBOOT_SUPPORT */\ndiff --git a/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h b/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h\nindex f4fa23a..f0f0f89 100644\n--- a/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h\n+++ b/lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h\n@@ -193,19 +193,6 @@ enum i40e_status_code i40e_clear_lan_rx_queue_context(struct i40e_hw *hw,\n enum i40e_status_code i40e_set_lan_rx_queue_context(struct i40e_hw *hw,\n \t\t\t\t\t\t    u16 queue,\n \t\t\t\t\t\t    struct i40e_hmc_obj_rxq *s);\n-#ifdef PREBOOT_SUPPORT\n-\n-enum i40e_status_code i40e_clear_lan_tx_queue_context_directly(struct i40e_hw *hw,\n-\t\t\t\t\t\t    u16 queue);\n-enum i40e_status_code i40e_set_lan_tx_queue_context_directly(struct i40e_hw *hw,\n-\t\t\t\t\t\t    u16 queue,\n-\t\t\t\t\t\t    struct i40e_hmc_obj_txq *s);\n-enum i40e_status_code i40e_clear_lan_rx_queue_context_directly(struct i40e_hw *hw,\n-\t\t\t\t\t\t    u16 queue);\n-enum i40e_status_code i40e_set_lan_rx_queue_context_directly(struct i40e_hw *hw,\n-\t\t\t\t\t\t    u16 queue,\n-\t\t\t\t\t\t    struct i40e_hmc_obj_rxq *s);\n-#endif\n enum i40e_status_code i40e_create_lan_hmc_object(struct i40e_hw *hw,\n \t\t\t\tstruct i40e_hmc_lan_create_obj_info *info);\n enum i40e_status_code i40e_delete_lan_hmc_object(struct i40e_hw *hw,\n",
    "prefixes": [
        "dpdk-dev",
        "06/15"
    ]
}