Since the FW build number is available in the AQ response, save it off for future use.
Signed-off-by: Helin Zhang <helin.zhang at intel.com> --- lib/librte_pmd_i40e/i40e/i40e_adminq.c | 1 + lib/librte_pmd_i40e/i40e/i40e_adminq.h | 1 + lib/librte_pmd_i40e/i40e/i40e_common.c | 4 ++++ lib/librte_pmd_i40e/i40e/i40e_prototype.h | 1 + 4 files changed, 7 insertions(+) diff --git a/lib/librte_pmd_i40e/i40e/i40e_adminq.c b/lib/librte_pmd_i40e/i40e/i40e_adminq.c index bbc6b65..860f1cd 100644 --- a/lib/librte_pmd_i40e/i40e/i40e_adminq.c +++ b/lib/librte_pmd_i40e/i40e/i40e_adminq.c @@ -602,6 +602,7 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) ret_code = i40e_aq_get_firmware_version(hw, &hw->aq.fw_maj_ver, &hw->aq.fw_min_ver, + &hw->aq.fw_build, &hw->aq.api_maj_ver, &hw->aq.api_min_ver, NULL); diff --git a/lib/librte_pmd_i40e/i40e/i40e_adminq.h b/lib/librte_pmd_i40e/i40e/i40e_adminq.h index d8c1fb6..3c88bb4 100644 --- a/lib/librte_pmd_i40e/i40e/i40e_adminq.h +++ b/lib/librte_pmd_i40e/i40e/i40e_adminq.h @@ -100,6 +100,7 @@ struct i40e_adminq_info { u16 asq_buf_size; /* send queue buffer size */ u16 fw_maj_ver; /* firmware major version */ u16 fw_min_ver; /* firmware minor version */ + u32 fw_build; /* firmware build number */ u16 api_maj_ver; /* api major version */ u16 api_min_ver; /* api minor version */ bool nvm_busy; diff --git a/lib/librte_pmd_i40e/i40e/i40e_common.c b/lib/librte_pmd_i40e/i40e/i40e_common.c index 4722614..09440db 100644 --- a/lib/librte_pmd_i40e/i40e/i40e_common.c +++ b/lib/librte_pmd_i40e/i40e/i40e_common.c @@ -1909,6 +1909,7 @@ enum i40e_status_code i40e_aq_get_switch_config(struct i40e_hw *hw, * @hw: pointer to the hw struct * @fw_major_version: firmware major version * @fw_minor_version: firmware minor version + * @fw_build: firmware build number * @api_major_version: major queue version * @api_minor_version: minor queue version * @cmd_details: pointer to command details structure or NULL @@ -1917,6 +1918,7 @@ enum i40e_status_code i40e_aq_get_switch_config(struct i40e_hw *hw, **/ enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw, u16 *fw_major_version, u16 *fw_minor_version, + u32 *fw_build, u16 *api_major_version, u16 *api_minor_version, struct i40e_asq_cmd_details *cmd_details) { @@ -1934,6 +1936,8 @@ enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw, *fw_major_version = LE16_TO_CPU(resp->fw_major); if (fw_minor_version != NULL) *fw_minor_version = LE16_TO_CPU(resp->fw_minor); + if (fw_build != NULL) + *fw_build = LE32_TO_CPU(resp->fw_build); if (api_major_version != NULL) *api_major_version = LE16_TO_CPU(resp->api_major); if (api_minor_version != NULL) diff --git a/lib/librte_pmd_i40e/i40e/i40e_prototype.h b/lib/librte_pmd_i40e/i40e/i40e_prototype.h index 2165ac8..9cf17ac 100644 --- a/lib/librte_pmd_i40e/i40e/i40e_prototype.h +++ b/lib/librte_pmd_i40e/i40e/i40e_prototype.h @@ -86,6 +86,7 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink); enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw, u16 *fw_major_version, u16 *fw_minor_version, + u32 *fw_build, u16 *api_major_version, u16 *api_minor_version, struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_debug_write_register(struct i40e_hw *hw, -- 1.8.1.4