Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/45276/?format=api
http://patches.dpdk.org/api/patches/45276/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180925023442.134705-15-qi.z.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": "<20180925023442.134705-15-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180925023442.134705-15-qi.z.zhang@intel.com", "date": "2018-09-25T02:34:36", "name": "[14/20] net/i40e/base: add AQ command for rearrange NVM structure", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "891066e93e8fb8332d89e85edb01b89df9f55021", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@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/20180925023442.134705-15-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 1477, "url": "http://patches.dpdk.org/api/series/1477/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1477", "date": "2018-09-25T02:34:22", "name": "base code update", "version": 1, "mbox": "http://patches.dpdk.org/series/1477/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/45276/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/45276/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 CCD551B39E;\n\tTue, 25 Sep 2018 04:34:44 +0200 (CEST)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 831181B1CC\n\tfor <dev@dpdk.org>; Tue, 25 Sep 2018 04:34:27 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Sep 2018 19:34:25 -0700", "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby orsmga005.jf.intel.com with ESMTP; 24 Sep 2018 19:34:01 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.54,300,1534834800\"; d=\"scan'208\";a=\"259958543\"", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "beilei.xing@intel.com", "Cc": "dev@dpdk.org, ferruh.yigit@intel.com, helin.zhang@intel.com,\n\tQi Zhang <qi.z.zhang@intel.com>", "Date": "Tue, 25 Sep 2018 10:34:36 +0800", "Message-Id": "<20180925023442.134705-15-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20180925023442.134705-1-qi.z.zhang@intel.com>", "References": "<20180925023442.134705-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH 14/20] net/i40e/base: add AQ command for\n\trearrange NVM structure", "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": "During switching between old NVM structure approach (called\nstructured NVM) to new one (called flat NVM) or backward flash\nneeds to be rearranged to required NVM structure.\nThis is a part of transition from one NVM structure to another.\nThe function is introduced to command firmware to start\nrearrangement process.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++\n drivers/net/i40e/base/i40e_common.c | 37 +++++++++++++++++++++++++++++++++\n drivers/net/i40e/base/i40e_prototype.h | 3 +++\n 3 files changed, 42 insertions(+)", "diff": "diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h\nindex 1e6932120..17026ebbf 100644\n--- a/drivers/net/i40e/base/i40e_adminq_cmd.h\n+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h\n@@ -2293,6 +2293,8 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_phy_register_access);\n struct i40e_aqc_nvm_update {\n \tu8\tcommand_flags;\n #define I40E_AQ_NVM_LAST_CMD\t\t\t0x01\n+#define I40E_AQ_NVM_REARRANGE_TO_FLAT\t\t0x20\n+#define I40E_AQ_NVM_REARRANGE_TO_STRUCT\t\t0x40\n #define I40E_AQ_NVM_FLASH_ONLY\t\t\t0x80\n #define I40E_AQ_NVM_PRESERVATION_FLAGS_SHIFT\t1\n #define I40E_AQ_NVM_PRESERVATION_FLAGS_MASK\t0x03\ndiff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c\nindex e0b7f4086..764a14353 100644\n--- a/drivers/net/i40e/base/i40e_common.c\n+++ b/drivers/net/i40e/base/i40e_common.c\n@@ -4148,6 +4148,43 @@ enum i40e_status_code i40e_aq_update_nvm(struct i40e_hw *hw, u8 module_pointer,\n }\n \n /**\n+ * i40e_aq_rearrange_nvm\n+ * @hw: pointer to the hw struct\n+ * @rearrange_nvm: defines direction of rearrangement\n+ * @cmd_details: pointer to command details structure or NULL\n+ *\n+ * Rearrange NVM structure, available only for transition FW\n+ **/\n+enum i40e_status_code i40e_aq_rearrange_nvm(struct i40e_hw *hw,\n+\t\t\t\tu8 rearrange_nvm,\n+\t\t\t\tstruct i40e_asq_cmd_details *cmd_details)\n+{\n+\tstruct i40e_aqc_nvm_update *cmd;\n+\tenum i40e_status_code status;\n+\tstruct i40e_aq_desc desc;\n+\n+\tDEBUGFUNC(\"i40e_aq_rearrange_nvm\");\n+\n+\tcmd = (struct i40e_aqc_nvm_update *)&desc.params.raw;\n+\n+\ti40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_nvm_update);\n+\n+\trearrange_nvm &= (I40E_AQ_NVM_REARRANGE_TO_FLAT |\n+\t\t\t I40E_AQ_NVM_REARRANGE_TO_STRUCT);\n+\n+\tif (!rearrange_nvm) {\n+\t\tstatus = I40E_ERR_PARAM;\n+\t\tgoto i40e_aq_rearrange_nvm_exit;\n+\t}\n+\n+\tcmd->command_flags |= rearrange_nvm;\n+\tstatus = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);\n+\n+i40e_aq_rearrange_nvm_exit:\n+\treturn status;\n+}\n+\n+/**\n * i40e_aq_nvm_progress\n * @hw: pointer to the hw struct\n * @progress: pointer to progress returned from AQ\ndiff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h\nindex f325924ee..0cf006dad 100644\n--- a/drivers/net/i40e/base/i40e_prototype.h\n+++ b/drivers/net/i40e/base/i40e_prototype.h\n@@ -236,6 +236,9 @@ enum i40e_status_code i40e_aq_update_nvm(struct i40e_hw *hw, u8 module_pointer,\n \t\t\t\tu32 offset, u16 length, void *data,\n \t\t\t\tbool last_command, u8 preservation_flags,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details);\n+enum i40e_status_code i40e_aq_rearrange_nvm(struct i40e_hw *hw,\n+\t\t\t\tu8 rearrange_nvm,\n+\t\t\t\tstruct i40e_asq_cmd_details *cmd_details);\n enum i40e_status_code i40e_aq_nvm_progress(struct i40e_hw *hw, u8 *progress,\n \t\t\t\tstruct i40e_asq_cmd_details *cmd_details);\n enum i40e_status_code i40e_aq_get_lldp_mib(struct i40e_hw *hw, u8 bridge_type,\n", "prefixes": [ "14/20" ] }{ "id": 45276, "url": "