DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jeff Guo <jia.guo@intel.com>
To: Guinan Sun <guinanx.sun@intel.com>, dev@dpdk.org
Cc: Beilei Xing <beilei.xing@intel.com>,
	Jaroslaw Ilgiewicz <jaroslaw.ilgiewicz@intel.com>
Subject: Re: [dpdk-dev] [PATCH 7/8] net/i40e/base: replace AQ command for NVM update
Date: Mon, 27 Jul 2020 12:32:24 +0800	[thread overview]
Message-ID: <a557d058-6669-bcf1-638e-fc1ffd45cddd@intel.com> (raw)
In-Reply-To: <20200721074000.30449-8-guinanx.sun@intel.com>

Acked-by: Jeff Guo <jia.guo@intel.com>

On 7/21/2020 3:39 PM, Guinan Sun wrote:
> Add AQ command "NVM update in process"
> to replace the original AQ command "NVM progress".
>
> Signed-off-by: Jaroslaw Ilgiewicz <jaroslaw.ilgiewicz@intel.com>
> Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
> ---
>   drivers/net/i40e/base/i40e_adminq_cmd.h | 12 +++++-
>   drivers/net/i40e/base/i40e_common.c     | 53 +++++++++++++++----------
>   drivers/net/i40e/base/i40e_prototype.h  |  6 ++-
>   3 files changed, 46 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
> index c7686b0d3..0766e69a8 100644
> --- a/drivers/net/i40e/base/i40e_adminq_cmd.h
> +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
> @@ -240,7 +240,7 @@ enum i40e_admin_queue_opc {
>   	i40e_aqc_opc_nvm_update			= 0x0703,
>   	i40e_aqc_opc_nvm_config_read		= 0x0704,
>   	i40e_aqc_opc_nvm_config_write		= 0x0705,
> -	i40e_aqc_opc_nvm_progress		= 0x0706,
> +	i40e_aqc_opc_nvm_update_in_process	= 0x0706,
>   	i40e_aqc_opc_oem_post_update		= 0x0720,
>   	i40e_aqc_opc_thermal_sensor		= 0x0721,
>   
> @@ -2400,6 +2400,16 @@ struct i40e_aqc_nvm_config_data_feature {
>   
>   I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature);
>   
> +/* NVM Update in Process (direct 0x0706) */
> +struct i40e_aqc_nvm_update_in_process {
> +	u8	command;
> +#define I40E_AQ_UPDATE_FLOW_END			0x0
> +#define I40E_AQ_UPDATE_FLOW_START		0x1
> +	u8	reserved[15];
> +};
> +
> +I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_update_in_process);
> +
>   struct i40e_aqc_nvm_config_data_immediate_field {
>   	__le32 field_id;
>   	__le32 field_value;
> diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
> index 65317f6c6..6c6fb4de4 100644
> --- a/drivers/net/i40e/base/i40e_common.c
> +++ b/drivers/net/i40e/base/i40e_common.c
> @@ -3686,6 +3686,37 @@ enum i40e_status_code i40e_aq_write_nvm_config(struct i40e_hw *hw,
>   	return status;
>   }
>   
> +/**
> + * i40e_aq_nvm_update_in_process
> + * @hw: pointer to the hw struct
> + * @update_flow_state: True indicates that update flow starts, false that ends
> + * @cmd_details: pointer to command details structure or NULL
> + *
> + * Indicate NVM update in process.
> + **/
> +enum i40e_status_code
> +i40e_aq_nvm_update_in_process(struct i40e_hw *hw,
> +			      bool update_flow_state,
> +			      struct i40e_asq_cmd_details *cmd_details)
> +{
> +	struct i40e_aq_desc desc;
> +	struct i40e_aqc_nvm_update_in_process *cmd =
> +		(struct i40e_aqc_nvm_update_in_process *)&desc.params.raw;
> +	enum i40e_status_code status;
> +
> +	i40e_fill_default_direct_cmd_desc(&desc,
> +					  i40e_aqc_opc_nvm_update_in_process);
> +
> +	cmd->command = I40E_AQ_UPDATE_FLOW_END;
> +
> +	if (update_flow_state)
> +		cmd->command |= I40E_AQ_UPDATE_FLOW_START;
> +
> +	status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
> +
> +	return status;
> +}
> +
>   /**
>    * i40e_aq_oem_post_update - triggers an OEM specific flow after update
>    * @hw: pointer to the hw struct
> @@ -4257,28 +4288,6 @@ enum i40e_status_code i40e_aq_rearrange_nvm(struct i40e_hw *hw,
>   	return status;
>   }
>   
> -/**
> - * i40e_aq_nvm_progress
> - * @hw: pointer to the hw struct
> - * @progress: pointer to progress returned from AQ
> - * @cmd_details: pointer to command details structure or NULL
> - *
> - * Gets progress of flash rearrangement process
> - **/
> -enum i40e_status_code i40e_aq_nvm_progress(struct i40e_hw *hw, u8 *progress,
> -				struct i40e_asq_cmd_details *cmd_details)
> -{
> -	enum i40e_status_code status;
> -	struct i40e_aq_desc desc;
> -
> -	DEBUGFUNC("i40e_aq_nvm_progress");
> -
> -	i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_nvm_progress);
> -	status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
> -	*progress = desc.params.raw[0];
> -	return status;
> -}
> -
>   /**
>    * i40e_aq_get_lldp_mib
>    * @hw: pointer to the hw struct
> diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h
> index 91fa23491..9a89f3002 100644
> --- a/drivers/net/i40e/base/i40e_prototype.h
> +++ b/drivers/net/i40e/base/i40e_prototype.h
> @@ -254,8 +254,10 @@ enum i40e_status_code i40e_aq_update_nvm(struct i40e_hw *hw, u8 module_pointer,
>   enum i40e_status_code i40e_aq_rearrange_nvm(struct i40e_hw *hw,
>   				u8 rearrange_nvm,
>   				struct i40e_asq_cmd_details *cmd_details);
> -enum i40e_status_code i40e_aq_nvm_progress(struct i40e_hw *hw, u8 *progress,
> -				struct i40e_asq_cmd_details *cmd_details);
> +enum i40e_status_code
> +i40e_aq_nvm_update_in_process(struct i40e_hw *hw,
> +			      bool update_flow_state,
> +			      struct i40e_asq_cmd_details *cmd_details);
>   enum i40e_status_code i40e_aq_get_lldp_mib(struct i40e_hw *hw, u8 bridge_type,
>   				u8 mib_type, void *buff, u16 buff_size,
>   				u16 *local_len, u16 *remote_len,

  reply	other threads:[~2020-07-27  4:32 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21  7:39 [dpdk-dev] [PATCH 0/8] update i40e base code Guinan Sun
2020-07-21  7:39 ` [dpdk-dev] [PATCH 1/8] net/i40e/base: enable FEC on/off flag setting for X722 Guinan Sun
2020-07-27  3:38   ` Jeff Guo
2020-07-21  7:39 ` [dpdk-dev] [PATCH 2/8] net/i40e/base: add PTYPE definition Guinan Sun
2020-07-27  3:43   ` Jeff Guo
2020-07-21  7:39 ` [dpdk-dev] [PATCH 3/8] net/i40e/base: enable new custom cloud filters Guinan Sun
2020-07-27  3:53   ` Jeff Guo
2020-07-27  4:55     ` Sun, GuinanX
2020-07-21  7:39 ` [dpdk-dev] [PATCH 4/8] net/i40e/base: update FVL FW API version to 1.11 Guinan Sun
2020-07-21  7:39 ` [dpdk-dev] [PATCH 5/8] net/i40e/base: check return value of DNL admin command Guinan Sun
2020-07-27  4:07   ` Jeff Guo
2020-07-27  4:53     ` Sun, GuinanX
2020-07-27  5:19     ` Sun, GuinanX
2020-07-21  7:39 ` [dpdk-dev] [PATCH 6/8] net/i40e/base: add disable unused ports capability Guinan Sun
2020-07-27  4:24   ` Jeff Guo
2020-07-27  5:01     ` Sun, GuinanX
2020-07-21  7:39 ` [dpdk-dev] [PATCH 7/8] net/i40e/base: replace AQ command for NVM update Guinan Sun
2020-07-27  4:32   ` Jeff Guo [this message]
2020-07-21  7:40 ` [dpdk-dev] [PATCH 8/8] net/i40e/base: update version Guinan Sun
2020-07-27  4:32   ` Jeff Guo
2020-07-27  5:34 ` [dpdk-dev] [PATCH v2 0/8] update i40e base code Guinan Sun
2020-07-27  5:34   ` [dpdk-dev] [PATCH v2 1/8] net/i40e/base: enable FEC on/off flag setting for X722 Guinan Sun
2020-07-27  5:34   ` [dpdk-dev] [PATCH v2 2/8] net/i40e/base: add PTYPE definition Guinan Sun
2020-07-27  5:34   ` [dpdk-dev] [PATCH v2 3/8] net/i40e/base: add new custom cloud filter types Guinan Sun
2020-07-27  6:43     ` Jeff Guo
2020-07-27  5:34   ` [dpdk-dev] [PATCH v2 4/8] net/i40e/base: update FW API version to 1.11 Guinan Sun
2020-07-27  6:44     ` Jeff Guo
2020-07-27  5:34   ` [dpdk-dev] [PATCH v2 5/8] net/i40e/base: fix possible uninitialized variable Guinan Sun
2020-07-27  6:45     ` Jeff Guo
2020-07-27  5:34   ` [dpdk-dev] [PATCH v2 6/8] net/i40e/base: support unused ports disabling Guinan Sun
2020-07-28  1:31     ` Jeff Guo
2020-07-27  5:34   ` [dpdk-dev] [PATCH v2 7/8] net/i40e/base: replace AQ command for NVM update Guinan Sun
2020-07-27  5:34   ` [dpdk-dev] [PATCH v2 8/8] net/i40e/base: update version Guinan Sun
2020-07-28  1:32   ` [dpdk-dev] [PATCH v2 0/8] update i40e base code Jeff Guo
2020-08-31  3:58     ` Zhang, Qi Z
2020-09-03  4:48   ` [dpdk-dev] [PATCH v3 00/15] " Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 01/15] net/i40e/base: enable FEC on/off flag setting for X722 Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 02/15] net/i40e/base: add PTYPE definition Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 03/15] net/i40e/base: add new custom cloud filter types Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 04/15] net/i40e/base: update FW API version to 1.12 Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 05/15] net/i40e/base: fix possible uninitialized variable Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 06/15] net/i40e/base: support unused ports disabling Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 07/15] net/i40e/base: replace AQ command for NVM update Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 08/15] net/i40e/base: add VLAN field for input set Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 09/15] net/i40e/base: enable pipe monitor thresholds Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 10/15] net/i40e/base: fix missing function header arguments Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 11/15] net/i40e/base: add support for Minimum Rollback Revision Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 12/15] net/i40e/base: fix Rx only mode for unicast promisc on VLAN Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 13/15] net/i40e/base: add EEE LPI status check for X722 adapters Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 14/15] net/i40e/base: fix PHY config param when enabling EEE Guinan Sun
2020-09-03  4:48     ` [dpdk-dev] [PATCH v3 15/15] net/i40e/base: update version Guinan Sun
2020-09-03 14:31     ` [dpdk-dev] [PATCH v3 00/15] update i40e base code Ferruh Yigit
2020-09-04  1:24       ` Sun, GuinanX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a557d058-6669-bcf1-638e-fc1ffd45cddd@intel.com \
    --to=jia.guo@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=guinanx.sun@intel.com \
    --cc=jaroslaw.ilgiewicz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).