i40e base driver update
cover i40e base driver update
This is the i40e base driver update, which includes bug fixes, enhancements, refactoring, and new device enabling. Below are the details.
Helin Zhang (15):
i40e/base: remove HMC AQ APIs
i40e/base: refactor NVM update status info
i40e/base: refactor NVM update event handling
i40e/base: code style fixes
i40e/base: fixup Geneve VNI for HW use
i40e/base: expose mirroring config
i40e/base: fix problematic mirror rule ID check
i40e/base: add new devices
i40e/base: fix the number of MSIX vector
i40e/base: fix debug output
i40e/base: add more device capabilities
i40e/base: increase supported AQ API version
i40e/base: add input set mask definitions
i40e/base: add RSS config to virtual channel
i40e/base: add capability of disabling all link
doc/guides/rel_notes/release_16_07.rst | 7 ++ drivers/net/i40e/Makefile | 2 +- drivers/net/i40e/base/i40e_adminq.c | 91 ++++++---------- drivers/net/i40e/base/i40e_adminq.h | 5 +- drivers/net/i40e/base/i40e_adminq_cmd.h | 54 ++++------ drivers/net/i40e/base/i40e_common.c | 132 ++++++++++-------------- drivers/net/i40e/base/i40e_devids.h | 4 + drivers/net/i40e/base/i40e_nvm.c | 87 ++++++++++++++-- drivers/net/i40e/base/i40e_osdep.h | 7 ++ drivers/net/i40e/base/i40e_prototype.h | 16 +-- drivers/net/i40e/base/i40e_type.h | 42 +++++++- drivers/net/i40e/base/i40e_virtchnl.h | 45 +++++++- drivers/net/i40e/i40e_ethdev.c | 4 +- drivers/net/i40e/i40e_pf.c | 2 +- lib/librte_eal/common/include/rte_pci_dev_ids.h | 8 ++ 15 files changed, 306 insertions(+), 200 deletions(-)
Signature · 1 line
2.5.0
PATCH 1/15 i40e/base: remove HMC AQ APIs
HMC AQ APIs were removed from the latest datasheet, and hence remove its implementations and relevant.
--- drivers/net/i40e/base/i40e_adminq.c | 4 --- drivers/net/i40e/base/i40e_adminq_cmd.h | 25 -------------- drivers/net/i40e/base/i40e_common.c | 61 --------------------------------- drivers/net/i40e/base/i40e_prototype.h | 8 ----- 4 files changed, 98 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +0 -4
@@ -683,10 +683,6 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) hw->aq.nvm_release_on_done = false; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ; - ret_code =i40e_aq_set_hmc_resource_profile (hw, -I40E_HMC_PROFILE_DEFAULT , -0 , -NULL );#endif /* PF_DRIVER */ ret_code =I40E_SUCCESS ;
drivers/net/i40e/base/i40e_adminq_cmd.h +0 -25
@@ -224,10 +224,6 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_resume_port_tx =0x041C , i40e_aqc_opc_configure_partition_bw =0x041D , -/* hmc */ - i40e_aqc_opc_query_hmc_resource_profile =0x0500 , - i40e_aqc_opc_set_hmc_resource_profile =0x0501 , -/* phy commands*/ i40e_aqc_opc_get_phy_abilities =0x0600 , i40e_aqc_opc_set_phy_config = 0x0601,
@@ -1646,27 +1642,6 @@ struct i40e_aqc_configure_partition_bw_data {I40E_CHECK_STRUCT_LEN (0x22 , i40e_aqc_configure_partition_bw_data); -/* Get and set the active HMC resource profile and status. -* (direct 0x0500) and (direct 0x0501) -*/ -struct i40e_aq_get_set_hmc_resource_profile { -u8 pm_profile; -u8 pe_vf_enabled; -u8 reserved[14 ]; -}; - -I40E_CHECK_CMD_LENGTH (i40e_aq_get_set_hmc_resource_profile); - -enum i40e_aq_hmc_profile { -/* I40E_HMC_PROFILE_NO_CHANGE = 0, reserved */ -I40E_HMC_PROFILE_DEFAULT =1 , -I40E_HMC_PROFILE_FAVOR_VF =2 , -I40E_HMC_PROFILE_EQUAL =3 , -}; - -#define I40E_AQ_GET_HMC_RESOURCE_PROFILE_PM_MASK 0xF -#define I40E_AQ_GET_HMC_RESOURCE_PROFILE_COUNT_MASK 0x3F -/* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */ /* set in param0 for get phy abilities to report qualified modules */
drivers/net/i40e/base/i40e_common.c +0 -61
67 lines not on this page · raw message
drivers/net/i40e/base/i40e_prototype.h +0 -8
@@ -345,10 +345,6 @@ enum i40e_status_code i40e_aq_config_vsi_bw_limit(struct i40e_hw *hw,enum i40e_status_code i40e_aq_dcb_ignore_pfc (struct i40e_hw *hw,u8 tcmap,bool request,u8 *tcmap_ret,struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_get_hmc_resource_profile (struct i40e_hw *hw, -enum i40e_aq_hmc_profile *profile, -u8 *pe_vf_enabled_count, -struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_config_switch_comp_ets_bw_limit( struct i40e_hw *hw, u16 seid, struct i40e_aqc_configure_switching_comp_ets_bw_limit_data *bw_data,
@@ -359,10 +355,6 @@ enum i40e_status_code i40e_aq_config_vsi_ets_sla_bw_limit(struct i40e_hw *hw, struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_dcb_updated (struct i40e_hw *hw,struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_set_hmc_resource_profile (struct i40e_hw *hw, -enum i40e_aq_hmc_profile profile, -u8 pe_vf_enabled_count, -struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_config_switch_comp_bw_limit (struct i40e_hw *hw,u16 seid,u16 credit,u8 max_bw,struct i40e_asq_cmd_details *cmd_details);
Signature · 1 line
2.5.0
Re: [PATCH 01/15] i40e/base: remove HMC AQ APIs
Quoted 4 lines · Helin Zhang
HMC AQ APIs were removed from the latest datasheet, and hence remove its implementations and relevant.
Signed-off-by Helin Zhang <[email protected]>
Hi Helin,
what is HMC? I assume AQ is short for admin queue. These abbreviations are pretty specific to i40e, so need to be expanded out in the commit message.
/Bruce
Re: [PATCH 01/15] i40e/base: remove HMC AQ APIs
Quoted 4 lines · Bruce Richardson
Quoted 3 lines · Helin Zhang
HMC AQ APIs were removed from the latest datasheet, and hence remove its implementations and relevant.
Quoted 8 lines
Quoted 1 line
Signed-off-by Helin Zhang <[email protected]>Hi Helin,
what is HMC? I assume AQ is short for admin queue. These abbreviations are pretty specific to i40e, so need to be expanded out in the commit message.
/Bruce
Also, can you provide any more details on why they were removed? Are they deprecated, or being replaced by something else?
/Bruce
PATCH 2/15 i40e/base: refactor NVM update status info
In reply to Helin ZhangIt centralizes all NVM update status info in the same structure, for better management.
--- drivers/net/i40e/base/i40e_adminq.c | 6 +++--- drivers/net/i40e/base/i40e_adminq.h | 1 - drivers/net/i40e/base/i40e_nvm.c | 12 ++++++------ drivers/net/i40e/base/i40e_type.h | 1 + 4 files changed, 10 insertions(+), 10 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +3 -3
@@ -680,7 +680,7 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)/* pre-emptive resource lock release */ i40e_aq_release_resource (hw,I40E_NVM_RESOURCE_ID ,0 ,NULL ); - hw->aq.nvm_release_on_done = false; + hw->nvm_release_on_done = false; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ;#endif /* PF_DRIVER */
@@ -1117,9 +1117,9 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw,#ifdef PF_DRIVER if (i40e_is_nvm_update_op (&e->desc)) { -if (hw->aq.nvm_release_on_done) { +if (hw->nvm_release_on_done) {i40e_release_nvm (hw); - hw->aq.nvm_release_on_done = false; + hw->nvm_release_on_done = false; }switch (hw->nvmupd_state) {
drivers/net/i40e/base/i40e_adminq.h +0 -1
@@ -104,7 +104,6 @@ struct i40e_adminq_info {u32 fw_build;/* firmware build number */ u16 api_maj_ver;/* api major version */ u16 api_min_ver;/* api minor version */ -bool nvm_release_on_done;struct i40e_spinlock asq_spinlock;/* Send queue spinlock */ struct i40e_spinlock arq_spinlock;/* Receive queue spinlock */
drivers/net/i40e/base/i40e_nvm.c +6 -6
@@ -875,7 +875,7 @@ enum i40e_status_code i40e_nvmupd_command(struct i40e_hw *hw,i40e_debug (hw,I40E_DEBUG_NVM ,"%s state %d nvm_release_on_hold %d cmd 0x%08x config 0x%08x offset 0x%08x data_size 0x%08x\n" , i40e_nvm_update_state_str[upd_cmd], hw->nvmupd_state, - hw->aq.nvm_release_on_done, + hw->nvm_release_on_done, cmd->command, cmd->config, cmd->offset, cmd->data_size);if (upd_cmd ==I40E_NVMUPD_INVALID ) {
@@ -980,7 +980,7 @@ STATIC enum i40e_status_code i40e_nvmupd_state_init(struct i40e_hw *hw,if (status) {i40e_release_nvm (hw); }else { - hw->aq.nvm_release_on_done = true; + hw->nvm_release_on_done = true; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; } }
@@ -996,7 +996,7 @@ STATIC enum i40e_status_code i40e_nvmupd_state_init(struct i40e_hw *hw,if (status) {i40e_release_nvm (hw); }else { - hw->aq.nvm_release_on_done = true; + hw->nvm_release_on_done = true; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; } }
@@ -1030,7 +1030,7 @@ STATIC enum i40e_status_code i40e_nvmupd_state_init(struct i40e_hw *hw, -EIO ;i40e_release_nvm (hw); }else { - hw->aq.nvm_release_on_done = true; + hw->nvm_release_on_done = true; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; } }
@@ -1138,7 +1138,7 @@ retry: -EIO ; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ; }else { - hw->aq.nvm_release_on_done = true; + hw->nvm_release_on_done = true; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; }break ;
@@ -1167,7 +1167,7 @@ retry: -EIO ; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ; }else { - hw->aq.nvm_release_on_done = true; + hw->nvm_release_on_done = true; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; }break ;
drivers/net/i40e/base/i40e_type.h +1 -0
@@ -655,6 +655,7 @@ struct i40e_hw {enum i40e_nvmupd_state nvmupd_state;struct i40e_aq_desc nvm_wb_desc;struct i40e_virt_mem nvm_buff; +bool nvm_release_on_done;/* HMC info */ struct i40e_hmc_info hmc;/* HMC info struct */
Signature · 1 line
2.5.0
PATCH 3/15 i40e/base: refactor NVM update event handling
In reply to Helin ZhangIt refactors the NVM update event handling, with specifying the AQ event opcode to wait on.
--- drivers/net/i40e/base/i40e_adminq.c | 33 +-------------- drivers/net/i40e/base/i40e_nvm.c | 77 +++++++++++++++++++++++++++++++--- drivers/net/i40e/base/i40e_prototype.h | 1 + drivers/net/i40e/base/i40e_type.h | 1 + 4 files changed, 75 insertions(+), 37 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +1 -32
@@ -37,18 +37,6 @@ POSSIBILITY OF SUCH DAMAGE.#include "i40e_adminq.h" #include "i40e_prototype.h" -#ifdef PF_DRIVER -/** -* i40e_is_nvm_update_op - return true if this is an NVM update operation -* @desc: API request descriptor -**/ -STATIC INLINE bool i40e_is_nvm_update_op(struct i40e_aq_desc *desc) -{ -return (desc->opcode ==CPU_TO_LE16 (i40e_aqc_opc_nvm_erase) || - desc->opcode ==CPU_TO_LE16 (i40e_aqc_opc_nvm_update)); -} - -#endif /* PF_DRIVER */ /** * i40e_adminq_init_regs - Initialize AdminQ registers * @hw: pointer to the hardware structure
@@ -1116,26 +1104,7 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw, hw->aq.arq.next_to_use = ntu;#ifdef PF_DRIVER -if (i40e_is_nvm_update_op (&e->desc)) { -if (hw->nvm_release_on_done) { -i40e_release_nvm (hw); - hw->nvm_release_on_done = false; - } - -switch (hw->nvmupd_state) { -case I40E_NVMUPD_STATE_INIT_WAIT : - hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ; -break ; - -case I40E_NVMUPD_STATE_WRITE_WAIT : - hw->nvmupd_state =I40E_NVMUPD_STATE_WRITING ; -break ; - -default : -break ; - } - } - +i40e_nvmupd_check_wait_event (hw,LE16_TO_CPU (e->desc.opcode));#endif clean_arq_element_out:/* Set pending if needed, unlock and return */
drivers/net/i40e/base/i40e_nvm.c +72 -5
161 lines not on this page · raw message
drivers/net/i40e/base/i40e_prototype.h +1 -0
@@ -465,6 +465,7 @@ enum i40e_status_code i40e_validate_nvm_checksum(struct i40e_hw *hw,enum i40e_status_code i40e_nvmupd_command (struct i40e_hw *hw,struct i40e_nvm_access *cmd,u8 *bytes,int *); +void i40e_nvmupd_check_wait_event (struct i40e_hw *hw,u16 opcode);void i40e_set_pci_config_data (struct i40e_hw *hw,u16 link_status);#endif /* PF_DRIVER */
drivers/net/i40e/base/i40e_type.h +1 -0
@@ -656,6 +656,7 @@ struct i40e_hw {struct i40e_aq_desc nvm_wb_desc;struct i40e_virt_mem nvm_buff;bool nvm_release_on_done; +u16 nvm_wait_opcode;/* HMC info */ struct i40e_hmc_info hmc;/* HMC info struct */
Signature · 1 line
2.5.0
PATCH 4/15 i40e/base: code style fixes
In reply to Helin ZhangIt adds code style fixes.
--- drivers/net/i40e/base/i40e_adminq.c | 52 +++++++++++++++++++-------------- drivers/net/i40e/base/i40e_adminq.h | 4 +-- drivers/net/i40e/base/i40e_adminq_cmd.h | 21 +++++++------ drivers/net/i40e/base/i40e_common.c | 5 ++-- drivers/net/i40e/base/i40e_prototype.h | 3 +- 5 files changed, 48 insertions(+), 37 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +30 -22
@@ -572,6 +572,26 @@ shutdown_arq_out:i40e_release_spinlock (&hw->aq.arq_spinlock);return ret_code; } +#ifdef PF_DRIVER + +/** +* i40e_resume_aq - resume AQ processing from 0 +* @hw: pointer to the hardware structure +**/ +STATIC void i40e_resume_aq(struct i40e_hw *hw) +{ +/* Registers are reset after PF reset */ + hw->aq.asq.next_to_use =0 ; + hw->aq.asq.next_to_clean =0 ; + +i40e_config_asq_regs (hw); + + hw->aq.arq.next_to_use =0 ; + hw->aq.arq.next_to_clean =0 ; + +i40e_config_arq_regs (hw); +} +#endif /* PF_DRIVER */ /** * i40e_init_adminq - main initialization routine for Admin Queue
@@ -586,12 +606,15 @@ shutdown_arq_out:**/ enum i40e_status_code i40e_init_adminq (struct i40e_hw *hw) { -enum i40e_status_code ret_code;#ifdef PF_DRIVER -u16 eetrack_lo, eetrack_hi;u16 cfg_ptr, oem_hi, oem_lo; +u16 eetrack_lo, eetrack_hi; +#endif +enum i40e_status_code ret_code; +#ifdef PF_DRIVER int retry =0 ;#endif +/* verify input for valid configuration */ if ((hw->aq.num_arq_entries == 0) || (hw->aq.num_asq_entries == 0) ||
@@ -600,8 +623,6 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) ret_code =I40E_ERR_CONFIG ; goto init_adminq_exit; } - -/* initialize spin locks */ i40e_init_spinlock (&hw->aq.asq_spinlock);i40e_init_spinlock (&hw->aq.arq_spinlock);
@@ -704,8 +725,6 @@ enum i40e_status_code i40e_shutdown_adminq(struct i40e_hw *hw)i40e_shutdown_asq (hw);i40e_shutdown_arq (hw); - -/* destroy the spinlocks */ i40e_destroy_spinlock (&hw->aq.asq_spinlock);i40e_destroy_spinlock (&hw->aq.arq_spinlock);
@@ -731,7 +750,6 @@ u16 i40e_clean_asq(struct i40e_hw *hw) desc =I40E_ADMINQ_DESC (*asq, ntc); details =I40E_ADMINQ_DETAILS (*asq, ntc); -while (rd32 (hw, hw->aq.asq.head) != ntc) {i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"ntc %d head %d.\n" , ntc,rd32 (hw, hw->aq.asq.head));
@@ -764,7 +782,11 @@ u16 i40e_clean_asq(struct i40e_hw *hw)* Returns true if the firmware has processed all descriptors on the * admin send queue. Returns false if there are still requests pending. **/ +#ifdef VF_DRIVER bool i40e_asq_done (struct i40e_hw *hw) +#else +STATIC bool i40e_asq_done(struct i40e_hw *hw) +#endif {/* AQ designers suggest use of head for better * timing reliability than DD bit
@@ -922,7 +944,6 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw,*/ if (i40e_asq_done (hw))break ; -/* ugh! delay while spin_lock */ i40e_msec_delay (1 ); total_delay++; }while (total_delay < hw->aq.asq_cmd_timeout);
@@ -1105,7 +1126,7 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw,#ifdef PF_DRIVER i40e_nvmupd_check_wait_event (hw,LE16_TO_CPU (e->desc.opcode)); -#endif +#endif /* PF_DRIVER */ clean_arq_element_out:/* Set pending if needed, unlock and return */ if (pending !=NULL )
@@ -1116,16 +1137,3 @@ clean_arq_element_err:return ret_code; } -void i40e_resume_aq (struct i40e_hw *hw) -{ -/* Registers are reset after PF reset */ - hw->aq.asq.next_to_use =0 ; - hw->aq.asq.next_to_clean =0 ; - -i40e_config_asq_regs (hw); - - hw->aq.arq.next_to_use =0 ; - hw->aq.arq.next_to_clean =0 ; - -i40e_config_arq_regs (hw); -}
drivers/net/i40e/base/i40e_adminq.h +2 -2
@@ -157,8 +157,8 @@ STATIC INLINE int i40e_aq_rc_to_posix(int aq_ret, int aq_rc) }/* general information */ -#define I40E_AQ_LARGE_BUF 512 -#define I40E_ASQ_CMD_TIMEOUT 250/* msecs */ +#define I40E_AQ_LARGE_BUF 512 +#define I40E_ASQ_CMD_TIMEOUT 250/* msecs */ #ifdef I40E_ESS_SUPPORT #define I40E_ASQ_CMD_TIMEOUT_ESS 50000/* msecs */ #endif
drivers/net/i40e/base/i40e_adminq_cmd.h +12 -9
@@ -927,7 +927,7 @@ struct i40e_aqc_vsi_properties_data {u8 up_enable_bits;u8 sched_reserved;/* outer up section */ -__le32 outer_up_table;/* same structure and defines as ingress table */ +__le32 outer_up_table;/* same structure and defines as ingress tbl */ u8 cmd_reserved[8 ];/* last 32 bytes are written by FW */ __le16 qs_handle[8 ];
@@ -1567,7 +1567,8 @@ struct i40e_aqc_configure_switching_comp_ets_bw_limit_data {u8 reserved1[28 ]; }; -I40E_CHECK_STRUCT_LEN (0x40 , i40e_aqc_configure_switching_comp_ets_bw_limit_data); +I40E_CHECK_STRUCT_LEN (0x40 , + i40e_aqc_configure_switching_comp_ets_bw_limit_data);/* Configure Switching Component Bandwidth Allocation per Tc * (indirect 0x0417)
@@ -1941,7 +1942,7 @@ struct i40e_aqc_nvm_config_read {#define I40E_AQ_ANVM_READ_SINGLE_FEATURE 0#define I40E_AQ_ANVM_READ_MULTIPLE_FEATURES 1__le16 element_count; -__le16 element_id;/* Feature/field ID */ +__le16 element_id;/* Feature/field ID */ __le16 element_id_msw;/* MSWord of field ID */ __le32 address_high;__le32 address_low;
@@ -1962,9 +1963,10 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_config_write);/* Used for 0x0704 as well as for 0x0705 commands */ #define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT 1 -#define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_MASK (1 << I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT) -#define I40E_AQ_ANVM_FEATURE 0 -#define I40E_AQ_ANVM_IMMEDIATE_FIELD (1 << FEATURE_OR_IMMEDIATE_SHIFT) +#define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_MASK \ + (1 << I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT) +#define I40E_AQ_ANVM_FEATURE 0 +#define I40E_AQ_ANVM_IMMEDIATE_FIELD (1 << FEATURE_OR_IMMEDIATE_SHIFT)struct i40e_aqc_nvm_config_data_feature {__le16 feature_id;#define I40E_AQ_ANVM_FEATURE_OPTION_OEM_ONLY 0x01
@@ -1988,7 +1990,7 @@ I40E_CHECK_STRUCT_LEN(0xc, i40e_aqc_nvm_config_data_immediate_field);/* OEM Post Update (indirect 0x0720) * no command data struct used */ -struct i40e_aqc_nvm_oem_post_update { +struct i40e_aqc_nvm_oem_post_update {#define I40E_AQ_NVM_OEM_POST_UPDATE_EXTERNAL_DATA 0x01u8 sel_data;u8 reserved[7 ];
@@ -2278,7 +2280,8 @@ I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_lldp_set_local_mib_resp);*/ struct i40e_aqc_lldp_stop_start_specific_agent {#define I40E_AQC_START_SPECIFIC_AGENT_SHIFT 0 -#define I40E_AQC_START_SPECIFIC_AGENT_MASK (1 << I40E_AQC_START_SPECIFIC_AGENT_SHIFT) +#define I40E_AQC_START_SPECIFIC_AGENT_MASK \ + (1 << I40E_AQC_START_SPECIFIC_AGENT_SHIFT)u8 command;u8 reserved[15 ]; };
@@ -2300,7 +2303,7 @@ struct i40e_aqc_add_udp_tunnel {I40E_CHECK_CMD_LENGTH (i40e_aqc_add_udp_tunnel);struct i40e_aqc_add_udp_tunnel_completion { -__le16 udp_port; +__le16 udp_port;u8 filter_entry_index;u8 multiple_pfs;#define I40E_AQC_SINGLE_PF 0x0
drivers/net/i40e/base/i40e_common.c +2 -3
@@ -1317,8 +1317,7 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw) I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >>I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT ; -/* It can take upto 15 secs for GRST steady state */ - grst_del = grst_del *20 ;/* bump it to 16 secs max to be safe */ + grst_del = grst_del *20 ;for (cnt =0 ; cnt < grst_del; cnt++) { reg =rd32 (hw,I40E_GLGEN_RSTAT );
@@ -4425,7 +4424,7 @@ enum i40e_status_code i40e_aq_delete_element(struct i40e_hw *hw, u16 seid, }/** -* i40_aq_add_pvirt - Instantiate a Port Virtualizer on a port +* i40e_aq_add_pvirt - Instantiate a Port Virtualizer on a port * @hw: pointer to the hw struct * @flags: component flags * @mac_seid: uplink seid (MAC SEID)
drivers/net/i40e/base/i40e_prototype.h +2 -1
@@ -67,14 +67,15 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw,void *buff,/* can be NULL */ u16 buff_size, struct i40e_asq_cmd_details *cmd_details); +#ifdef VF_DRIVER bool i40e_asq_done (struct i40e_hw *hw); +#endif /* debug function for adminq */ void i40e_debug_aq (struct i40e_hw *hw,enum i40e_debug_mask mask,void *desc,void *buffer,u16 buf_len);void i40e_idle_aq (struct i40e_hw *hw); -void i40e_resume_aq (struct i40e_hw *hw);bool i40e_check_asq_alive (struct i40e_hw *hw);enum i40e_status_code i40e_aq_queue_shutdown (struct i40e_hw *hw,bool unloading);#ifdef X722_SUPPORT
Signature · 1 line
2.5.0
PATCH 5/15 i40e/base: fixup Geneve VNI for HW use
In reply to Helin ZhangThe hardware doesn't layout the Geneve VNI quite the same as the VxLAN VNI, so it needs to adjust it before sending through the AQ commands as the workaround.
--- drivers/net/i40e/base/i40e_common.c | 35 ++++++++++++++++++++++++++++++++++- drivers/net/i40e/base/i40e_osdep.h | 7 +++++++ 2 files changed, 41 insertions(+), 1 deletion(-)
drivers/net/i40e/base/i40e_common.c +34 -1
@@ -5422,6 +5422,35 @@ void i40e_add_filter_to_drop_tx_flow_control_frames(struct i40e_hw *hw, }/** +* i40e_fix_up_geneve_vni - adjust Geneve VNI for HW issue +* @filters: list of cloud filters +* @filter_count: length of list +* +* There's an issue in the device where the Geneve VNI layout needs +* to be shifted 1 byte over from the VxLAN VNI +**/ +STATIC void i40e_fix_up_geneve_vni( +struct i40e_aqc_add_remove_cloud_filters_element_data *filters, +u8 filter_count) +{ +struct i40e_aqc_add_remove_cloud_filters_element_data *f = filters; +int i; + +for (i =0 ; i < filter_count; i++) { +u16 tnl_type; +u32 ti; + + tnl_type = (le16_to_cpu (f[i].flags) & +I40E_AQC_ADD_CLOUD_TNL_TYPE_MASK ) >> +I40E_AQC_ADD_CLOUD_TNL_TYPE_SHIFT ; +if (tnl_type ==I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE ) { + ti =le32_to_cpu (f[i].tenant_id); + f[i].tenant_id =cpu_to_le32 (ti <<8 ); + } + } +} + +/** * i40e_aq_add_cloud_filters * @hw: pointer to the hardware structure * @seid: VSI seid to add cloud filters from
@@ -5441,8 +5470,8 @@ enum i40e_status_code i40e_aq_add_cloud_filters(struct i40e_hw *hw,struct i40e_aq_desc desc;struct i40e_aqc_add_remove_cloud_filters *cmd = (struct i40e_aqc_add_remove_cloud_filters *)&desc.params.raw; -u16 buff_len;enum i40e_status_code status; +u16 buff_len;i40e_fill_default_direct_cmd_desc (&desc, i40e_aqc_opc_add_cloud_filters);
@@ -5453,6 +5482,8 @@ enum i40e_status_code i40e_aq_add_cloud_filters(struct i40e_hw *hw, cmd->num_filters = filter_count; cmd->seid =CPU_TO_LE16 (seid); +i40e_fix_up_geneve_vni (filters, filter_count); + status =i40e_asq_send_command (hw, &desc, filters, buff_len,NULL );return status;
@@ -5490,6 +5521,8 @@ enum i40e_status_code i40e_aq_remove_cloud_filters(struct i40e_hw *hw, cmd->num_filters = filter_count; cmd->seid =CPU_TO_LE16 (seid); +i40e_fix_up_geneve_vni (filters, filter_count); + status =i40e_asq_send_command (hw, &desc, filters, buff_len,NULL );return status;
drivers/net/i40e/base/i40e_osdep.h +7 -0
@@ -204,6 +204,13 @@ struct i40e_virt_mem {#define LE32_TO_CPU (c) rte_le_to_cpu_32(c)#define LE64_TO_CPU (k) rte_le_to_cpu_64(k) +#define cpu_to_le16 (o) rte_cpu_to_le_16(o) +#define cpu_to_le32 (s) rte_cpu_to_le_32(s) +#define cpu_to_le64 (h) rte_cpu_to_le_64(h) +#define le16_to_cpu (a) rte_le_to_cpu_16(a) +#define le32_to_cpu (c) rte_le_to_cpu_32(c) +#define le64_to_cpu (k) rte_le_to_cpu_64(k) +/* SW spinlock */ struct i40e_spinlock {rte_spinlock_t spinlock;
Signature · 1 line
2.5.0
Re: [PATCH 05/15] i40e/base: fixup Geneve VNI for HW use
Quoted 5 lines · Helin Zhang
The hardware doesn't layout the Geneve VNI quite the same as the VxLAN VNI, so it needs to adjust it before sending through the AQ commands as the workaround.
Signed-off-by Helin Zhang <[email protected]>
Please expand out acronyms like VNI in the commit message.
/Bruce
PATCH 6/15 i40e/base: expose mirroring config
In reply to Helin ZhangIt exposes the configuration of mirroring or not egress traffic to VSIs in promiscuous mode, as latest firmware supports that from API version 1.5.
--- drivers/net/i40e/base/i40e_common.c | 9 ++++++--- drivers/net/i40e/base/i40e_prototype.h | 4 ++-- drivers/net/i40e/i40e_ethdev.c | 4 ++-- drivers/net/i40e/i40e_pf.c | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-)
drivers/net/i40e/base/i40e_common.c +6 -3
@@ -2214,10 +2214,12 @@ enum i40e_status_code i40e_aq_set_default_vsi(struct i40e_hw *hw,* @seid: vsi number * @set: set unicast promiscuous enable/disable * @cmd_details: pointer to command details structure or NULL +* @rx_only_promisc: flag to decide if egress traffic gets mirrored in promisc **/ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous (struct i40e_hw *hw,u16 seid,bool set, -struct i40e_asq_cmd_details *cmd_details) +struct i40e_asq_cmd_details *cmd_details, +bool rx_only_promisc) {struct i40e_aq_desc desc; struct i40e_aqc_set_vsi_promiscuous_modes *cmd =
@@ -2230,8 +2232,9 @@ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,if (set) { flags |=I40E_AQC_SET_VSI_PROMISC_UNICAST ; -if (((hw->aq.api_maj_ver ==1 ) && (hw->aq.api_min_ver >=5 )) || - (hw->aq.api_maj_ver >1 )) +if (rx_only_promisc && + (((hw->aq.api_maj_ver ==1 ) && (hw->aq.api_min_ver >=5 )) || + (hw->aq.api_maj_ver >1 ))) flags |=I40E_AQC_SET_VSI_PROMISC_TX ; }
drivers/net/i40e/base/i40e_prototype.h +2 -2
@@ -166,7 +166,8 @@ enum i40e_status_code i40e_aq_set_vsi_broadcast(struct i40e_hw *hw, u16 vsi_id, bool set_filter, struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous (struct i40e_hw *hw, -u16 vsi_id,bool set,struct i40e_asq_cmd_details *cmd_details); +u16 vsi_id,bool set,struct i40e_asq_cmd_details *cmd_details, +bool rx_only_promisc);enum i40e_status_code i40e_aq_set_vsi_multicast_promiscuous (struct i40e_hw *hw,u16 vsi_id,bool set,struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw *hw,
@@ -404,7 +405,6 @@ enum i40e_status_code i40e_aq_remove_cloud_filters(struct i40e_hw *hw,u16 vsi, struct i40e_aqc_add_remove_cloud_filters_element_data *filters, u8 filter_count); -enum i40e_status_code i40e_aq_alternate_read (struct i40e_hw *hw,u32 reg_addr0,u32 *reg_val0,u32 reg_addr1,u32 *reg_val1);
drivers/net/i40e/i40e_ethdev.c +2 -2
@@ -1661,7 +1661,7 @@ i40e_dev_promiscuous_enable(struct rte_eth_dev *dev)int status; status =i40e_aq_set_vsi_unicast_promiscuous (hw, vsi->seid, - true,NULL ); + true,NULL , true);if (status !=I40E_SUCCESS )PMD_DRV_LOG (ERR ,"Failed to enable unicast promiscuous" );
@@ -1681,7 +1681,7 @@ i40e_dev_promiscuous_disable(struct rte_eth_dev *dev)int status; status =i40e_aq_set_vsi_unicast_promiscuous (hw, vsi->seid, - false,NULL ); + false,NULL , true);if (status !=I40E_SUCCESS )PMD_DRV_LOG (ERR ,"Failed to disable unicast promiscuous" );
drivers/net/i40e/i40e_pf.c +1 -1
@@ -810,7 +810,7 @@ i40e_pf_host_process_cmd_config_promisc_mode(if (promisc->flags &I40E_FLAG_VF_UNICAST_PROMISC ) unicast = TRUE; ret =i40e_aq_set_vsi_unicast_promiscuous (hw, - vf->vsi->seid, unicast,NULL ); + vf->vsi->seid, unicast,NULL , true);if (ret !=I40E_SUCCESS ) goto send_msg;
Signature · 1 line
2.5.0
PATCH 7/15 i40e/base: fix problematic mirror rule ID check
In reply to Helin ZhangIt removes the problematic mirror rule ID check. It returns an error if the mirror rule ID is 0, which is a valid value.
--- drivers/net/i40e/base/i40e_common.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/i40e/base/i40e_common.c +1 -4
@@ -3042,10 +3042,7 @@ enum i40e_status_code i40e_aq_delete_mirrorrule(struct i40e_hw *hw, u16 sw_seid, u16 *rules_used, u16 *rules_free) {/* Rule ID has to be valid except rule_type: INGRESS VLAN mirroring */ -if (rule_type !=I40E_AQC_MIRROR_RULE_TYPE_VLAN ) { -if (!rule_id) -return I40E_ERR_PARAM ; - }else { +if (rule_type ==I40E_AQC_MIRROR_RULE_TYPE_VLAN ) {/* count and mr_list shall be valid for rule_type INGRESS VLAN * mirroring. For other rule_type, count and rule_type should * not matter.
Signature · 1 line
2.5.0
PATCH 8/15 i40e/base: add new devices
In reply to Helin ZhangIt adds new device IDs of both X722 and XXV710, and new PHY types.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 4 ++++ drivers/net/i40e/base/i40e_common.c | 4 ++++ drivers/net/i40e/base/i40e_devids.h | 4 ++++ lib/librte_eal/common/include/rte_pci_dev_ids.h | 8 ++++++++ 4 files changed, 20 insertions(+)
drivers/net/i40e/base/i40e_adminq_cmd.h +4 -0
@@ -1678,6 +1678,10 @@ enum i40e_aq_phy_type {I40E_PHY_TYPE_1000BASE_LX =0x1C ,I40E_PHY_TYPE_1000BASE_T_OPTICAL =0x1D ,I40E_PHY_TYPE_20GBASE_KR2 =0x1E , +I40E_PHY_TYPE_25GBASE_KR =0x1F , +I40E_PHY_TYPE_25GBASE_CR =0x20 , +I40E_PHY_TYPE_25GBASE_SR =0x21 , +I40E_PHY_TYPE_25GBASE_LR =0x22 , I40E_PHY_TYPE_MAX };
drivers/net/i40e/base/i40e_common.c +4 -0
@@ -67,6 +67,8 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)case I40E_DEV_ID_10G_BASE_T4 :case I40E_DEV_ID_20G_KR2 :case I40E_DEV_ID_20G_KR2_A : +case I40E_DEV_ID_25G_B : +case I40E_DEV_ID_25G_SFP28 : hw->mac.type =I40E_MAC_XL710 ;break ;#ifdef X722_SUPPORT
@@ -78,6 +80,8 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)case I40E_DEV_ID_SFP_X722 :case I40E_DEV_ID_1G_BASE_T_X722 :case I40E_DEV_ID_10G_BASE_T_X722 : +case I40E_DEV_ID_SFP_I_X722 : +case I40E_DEV_ID_QSFP_I_X722 : hw->mac.type =I40E_MAC_X722 ;break ;#endif
drivers/net/i40e/base/i40e_devids.h +4 -0
@@ -49,6 +49,8 @@ POSSIBILITY OF SUCH DAMAGE.#define I40E_DEV_ID_20G_KR2 0x1587#define I40E_DEV_ID_20G_KR2_A 0x1588#define I40E_DEV_ID_10G_BASE_T4 0x1589 +#define I40E_DEV_ID_25G_B 0x158A +#define I40E_DEV_ID_25G_SFP28 0x158B#if defined(INTEGRATED_VF ) || defined(VF_DRIVER ) || defined(I40E_NDIS_SUPPORT )#define I40E_DEV_ID_VF 0x154C#define I40E_DEV_ID_VF_HV 0x1571
@@ -65,6 +67,8 @@ POSSIBILITY OF SUCH DAMAGE.#define I40E_DEV_ID_SFP_X722 0x37D0#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 +#define I40E_DEV_ID_SFP_I_X722 0x37D3 +#define I40E_DEV_ID_QSFP_I_X722 0x37D4#if defined(INTEGRATED_VF ) || defined(VF_DRIVER ) || defined(I40E_NDIS_SUPPORT )#define I40E_DEV_ID_X722_VF 0x37CD#define I40E_DEV_ID_X722_VF_HV 0x37D9
lib/librte_eal/common/include/rte_pci_dev_ids.h +8 -0
@@ -532,12 +532,16 @@ RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS)#define I40E_DEV_ID_20G_KR2 0x1587#define I40E_DEV_ID_20G_KR2_A 0x1588#define I40E_DEV_ID_10G_BASE_T4 0x1589 +#define I40E_DEV_ID_25G_B 0x158A +#define I40E_DEV_ID_25G_SFP28 0x158B#define I40E_DEV_ID_X722_A0 0x374C#define I40E_DEV_ID_KX_X722 0x37CE#define I40E_DEV_ID_QSFP_X722 0x37CF#define I40E_DEV_ID_SFP_X722 0x37D0#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 +#define I40E_DEV_ID_SFP_I_X722 0x37D3 +#define I40E_DEV_ID_QSFP_I_X722 0x37D4 RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_XL710)RTE_PCI_DEV_ID_DECL_I40E (PCI_VENDOR_ID_INTEL ,I40E_DEV_ID_QEMU )
@@ -550,12 +554,16 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_20G_KR2) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_20G_KR2_A) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T4) +RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_25G_B) +RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_25G_SFP28) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_A0) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_X722) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_X722) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_X722) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_1G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) +RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_I_X722) +RTE_PCI_DEV_ID_DECL_I40E (PCI_VENDOR_ID_INTEL ,I40E_DEV_ID_QSFP_I_X722 )/*************** Physical FM10K devices from fm10k_type.h ***************/
Signature · 1 line
2.5.0
PATCH 9/15 i40e/base: fix the number of MSIX vector
In reply to Helin ZhangIt corrects the number of MSIX vector in a debug info.
--- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/base/i40e_common.c +1 -1
@@ -3670,7 +3670,7 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff, p->num_msix_vectors = number;i40e_debug (hw,I40E_DEBUG_INIT ,"HW Capability: MSIX vector count = %d\n" , - p->num_msix_vectors_vf); + p->num_msix_vectors);break ;case I40E_AQ_CAP_ID_VF_MSIX : p->num_msix_vectors_vf = number;
Signature · 1 line
2.5.0
PATCH 10/15 i40e/base: fix debug output
In reply to Helin ZhangIt fixes the debug output messages.
--- drivers/net/i40e/base/i40e_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/i40e/base/i40e_common.c +3 -2
@@ -375,14 +375,15 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,/* the most we could have left is 16 bytes, pad with zeros */ if (i < len) {char d_buf[16 ]; -int j; +int j, i_sav; + i_sav = i;memset (d_buf,0 ,sizeof (d_buf));for (j =0 ; i < len; j++, i++) d_buf[j] = buf[i];i40e_debug (hw, mask,"\t0x%04X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n" , - i, d_buf[0 ], d_buf[1 ], d_buf[2 ], d_buf[3 ], + i_sav, d_buf[0 ], d_buf[1 ], d_buf[2 ], d_buf[3 ], d_buf[4 ], d_buf[5 ], d_buf[6 ], d_buf[7 ], d_buf[8 ], d_buf[9 ], d_buf[10 ], d_buf[11 ], d_buf[12 ], d_buf[13 ], d_buf[14 ], d_buf[15 ]);
Signature · 1 line
2.5.0
PATCH 11/15 i40e/base: add more device capabilities
In reply to Helin ZhangIt adds more device capabilities for NVM management.
- if update is available
- if security check is needed
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 1 + drivers/net/i40e/base/i40e_common.c | 6 ++++++ drivers/net/i40e/base/i40e_type.h | 5 +++++ 3 files changed, 12 insertions(+)
drivers/net/i40e/base/i40e_adminq_cmd.h +1 -0
@@ -446,6 +446,7 @@ struct i40e_aqc_list_capabilities_element_resp {#define I40E_AQ_CAP_ID_SDP 0x0062#define I40E_AQ_CAP_ID_MDIO 0x0063#define I40E_AQ_CAP_ID_WSR_PROT 0x0064 +#define I40E_AQ_CAP_ID_NVM_MGMT 0x0080#define I40E_AQ_CAP_ID_FLEX10 0x00F1#define I40E_AQ_CAP_ID_CEM 0x00F2
drivers/net/i40e/base/i40e_common.c +6 -0
@@ -3761,6 +3761,12 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,"HW Capability: wr_csr_prot = 0x%llX\n\n" , (p->wr_csr_prot & 0xffff));break ; +case I40E_AQ_CAP_ID_NVM_MGMT : +if (number &I40E_NVM_MGMT_SEC_REV_DISABLED ) + p->sec_rev_disabled = true; +if (number &I40E_NVM_MGMT_UPDATE_DISABLED ) + p->update_disabled = true; +break ;#ifdef X722_SUPPORT case I40E_AQ_CAP_ID_WOL_AND_PROXY : hw->num_wol_proxy_filters = (u16 )number;
drivers/net/i40e/base/i40e_type.h +5 -0
@@ -376,6 +376,11 @@ struct i40e_hw_capabilities {#define I40E_FLEX10_STATUS_DCC_ERROR 0x1#define I40E_FLEX10_STATUS_VC_MODE 0x2 +bool sec_rev_disabled; +bool update_disabled; +#define I40E_NVM_MGMT_SEC_REV_DISABLED 0x1 +#define I40E_NVM_MGMT_UPDATE_DISABLED 0x2 +bool mgmt_cem;bool ieee_1588;bool iwarp;
Signature · 1 line
2.5.0
PATCH 12/15 i40e/base: increase supported AQ API version
In reply to Helin ZhangIt increases the supported AQ API version to 1.5
for X722.
--- drivers/net/i40e/base/i40e_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/base/i40e_type.h +1 -1
@@ -188,7 +188,7 @@ enum i40e_memcpy_type { };#ifdef X722_SUPPORT -#define I40E_FW_API_VERSION_MINOR_X722 0x0004 +#define I40E_FW_API_VERSION_MINOR_X722 0x0005#endif #define I40E_FW_API_VERSION_MINOR_X710 0x0005
Signature · 1 line
2.5.0
PATCH 13/15 i40e/base: add input set mask definitions
In reply to Helin ZhangIt adds input set mask definitions for RSS, flow director and flex bytes.
--- drivers/net/i40e/base/i40e_type.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
drivers/net/i40e/base/i40e_type.h +33 -0
@@ -1638,4 +1638,37 @@ struct i40e_lldp_variables {/* RSS Hash Table Size */ #define I40E_PFQF_CTL_0_HASHLUTSIZE_512 0x00010000 + +/* INPUT SET MASK for RSS, flow director, and flexible payload */ +#define I40E_L3_SRC_SHIFT 47 +#define I40E_L3_SRC_MASK (0x3ULL << I40E_L3_SRC_SHIFT) +#define I40E_L3_V6_SRC_SHIFT 43 +#define I40E_L3_V6_SRC_MASK (0xFFULL << I40E_L3_V6_SRC_SHIFT) +#define I40E_L3_DST_SHIFT 35 +#define I40E_L3_DST_MASK (0x3ULL << I40E_L3_DST_SHIFT) +#define I40E_L3_V6_DST_SHIFT 35 +#define I40E_L3_V6_DST_MASK (0xFFULL << I40E_L3_V6_DST_SHIFT) +#define I40E_L4_SRC_SHIFT 34 +#define I40E_L4_SRC_MASK (0x1ULL << I40E_L4_SRC_SHIFT) +#define I40E_L4_DST_SHIFT 33 +#define I40E_L4_DST_MASK (0x1ULL << I40E_L4_DST_SHIFT) +#define I40E_VERIFY_TAG_SHIFT 31 +#define I40E_VERIFY_TAG_MASK (0x3ULL << I40E_VERIFY_TAG_SHIFT) + +#define I40E_FLEX_50_SHIFT 13 +#define I40E_FLEX_50_MASK (0x1ULL << I40E_FLEX_50_SHIFT) +#define I40E_FLEX_51_SHIFT 12 +#define I40E_FLEX_51_MASK (0x1ULL << I40E_FLEX_51_SHIFT) +#define I40E_FLEX_52_SHIFT 11 +#define I40E_FLEX_52_MASK (0x1ULL << I40E_FLEX_52_SHIFT) +#define I40E_FLEX_53_SHIFT 10 +#define I40E_FLEX_53_MASK (0x1ULL << I40E_FLEX_53_SHIFT) +#define I40E_FLEX_54_SHIFT 9 +#define I40E_FLEX_54_MASK (0x1ULL << I40E_FLEX_54_SHIFT) +#define I40E_FLEX_55_SHIFT 8 +#define I40E_FLEX_55_MASK (0x1ULL << I40E_FLEX_55_SHIFT) +#define I40E_FLEX_56_SHIFT 7 +#define I40E_FLEX_56_MASK (0x1ULL << I40E_FLEX_56_SHIFT) +#define I40E_FLEX_57_SHIFT 6 +#define I40E_FLEX_57_MASK (0x1ULL << I40E_FLEX_57_SHIFT)#endif /* _I40E_TYPE_H_ */
Signature · 1 line
2.5.0
PATCH 14/15 i40e/base: add RSS config to virtual channel
In reply to Helin ZhangIt add opcodes and structures to support RSS configuration by PF driver on behalf of the VF drivers.
--- drivers/net/i40e/base/i40e_virtchnl.h | 45 ++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-)
drivers/net/i40e/base/i40e_virtchnl.h +42 -3
@@ -87,10 +87,15 @@ enum i40e_virtchnl_ops {I40E_VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE =14 ,I40E_VIRTCHNL_OP_GET_STATS =15 ,I40E_VIRTCHNL_OP_FCOE =16 , -I40E_VIRTCHNL_OP_EVENT =17 , +I40E_VIRTCHNL_OP_EVENT =17 ,/* must ALWAYS be 17 */ #ifdef I40E_SOL_VF_SUPPORTI40E_VIRTCHNL_OP_GET_ADDNL_SOL_CONFIG =19 , #endif +I40E_VIRTCHNL_OP_CONFIG_RSS_KEY =23 , +I40E_VIRTCHNL_OP_CONFIG_RSS_LUT =24 , +I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS =25 , + I40E_VIRTCHNL_OP_SET_RSS_HENA = 26, + };/* Virtual channel message descriptor. This overlays the admin queue
@@ -164,6 +169,7 @@ struct i40e_virtchnl_vsi_resource {#define I40E_VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000#define I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 0x00040000 +#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF 0X00080000struct i40e_virtchnl_vf_resource {u16 num_vsis;
@@ -172,8 +178,8 @@ struct i40e_virtchnl_vf_resource {u16 max_mtu;u32 vf_offload_flags; -u32 max_fcoe_contexts; -u32 max_fcoe_filters; +u32 rss_key_size; +u32 rss_lut_size;struct i40e_virtchnl_vsi_resource vsi_res[1 ]; };
@@ -349,6 +355,39 @@ struct i40e_virtchnl_promisc_info {* PF replies with struct i40e_eth_stats in an external buffer. */ +/* I40E_VIRTCHNL_OP_CONFIG_RSS_KEY +* I40E_VIRTCHNL_OP_CONFIG_RSS_LUT +* VF sends these messages to configure RSS. Only supported if both PF +* and VF drivers set the I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF bit during +* configuration negotiation. If this is the case, then the rss fields in +* the vf resource struct are valid. +* Both the key and LUT are initialized to 0 by the PF, meaning that +* RSS is effectively disabled until set up by the VF. +*/ +struct i40e_virtchnl_rss_key { +u16 vsi_id; +u16 key_len; +u8 key[1 ];/* RSS hash key, packed bytes */ +}; + +struct i40e_virtchnl_rss_lut { +u16 vsi_id; +u16 lut_entries; +u8 lut[1 ];/* RSS lookup table*/ +}; + +/* I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS +* I40E_VIRTCHNL_OP_SET_RSS_HENA +* VF sends these messages to get and set the hash filter enable bits for RSS. +* By default, the PF sets these to all possible traffic types that the +* hardware supports. The VF can query this value if it wants to change the +* traffic types that are hashed by the hardware. +* Traffic types are defined in the i40e_filter_pctype enum in i40e_type.h +*/ +struct i40e_virtchnl_rss_hena { +u64 hena; +}; +/* I40E_VIRTCHNL_OP_EVENT * PF sends this message to inform the VF driver of events that may affect it. * No direct response is expected from the VF, though it may generate other
Signature · 1 line
2.5.0
PATCH 15/15 i40e/base: add capability of disabling all link
In reply to Helin ZhangIt adds a flag, which can be used to tell the firmware to disable the link on all ports.
--- doc/guides/rel_notes/release_16_07.rst | 7 +++++++ drivers/net/i40e/Makefile | 2 +- drivers/net/i40e/base/i40e_adminq_cmd.h | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-)
doc/guides/rel_notes/release_16_07.rst +7 -0
@@ -34,6 +34,13 @@ This section should contain new features added in this release. Sample format: Refer to the previous release notes for examples. +* **Updated the i40e base driver.** + + The i40e base driver was updated with changes which includes the + following: + + * Add new X722 and XXV710 device IDs + Resolved Issues ---------------
drivers/net/i40e/Makefile +1 -1
@@ -85,7 +85,7 @@ VPATH += $(SRCDIR)/base # # all source are stored in SRCS-y -# base driver is based on the package of dpdk-i40e.2016.01.07.14.tar.gz. +# base driver is based on the package of dpdk-i40e.2016.04.18.12.tar.gz. # SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_adminq.c SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_common.c
drivers/net/i40e/base/i40e_adminq_cmd.h +3 -0
@@ -1899,7 +1899,10 @@ struct i40e_aqc_set_phy_debug {#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_NONE 0x00#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_HARD 0x01#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_SOFT 0x02 +/* Disable link manageability on a single port */ #define I40E_AQ_PHY_DEBUG_DISABLE_LINK_FW 0x10 +/* Disable link manageability on all ports needs both bits 4 and 5 */ +#define I40E_AQ_PHY_DEBUG_DISABLE_ALL_LINK_FW 0x20u8 reserved[15 ]; };
Signature · 1 line
2.5.0
v2 cover i40e base driver update
In reply to Helin ZhangThis is the i40e base driver update, which includes bug fixes, enhancements, refactoring, and new device enabling. Below are the details.
v2:
- reworded commit titles and logs.
Helin Zhang (15):
i40e/base: remove HMC AQ APIs
i40e/base: move field of NVM update status info i40e/base: refactor NVM update command processing i40e/base: trim the code
i40e/base: fixup Geneve VNI for HW use i40e/base: expose mirroring config i40e/base: fix problematic mirror rule ID check i40e/base: add new devices
i40e/base: fix the number of MSIX vector i40e/base: fix debug output
i40e/base: add more device capabilities i40e/base: increase supported AQ API version i40e/base: add input set mask definitions i40e/base: add RSS config to virtual channel i40e/base: add capability of disabling all link
doc/guides/rel_notes/release_16_07.rst | 4 + drivers/net/i40e/Makefile | 2 +- drivers/net/i40e/base/i40e_adminq.c | 91 ++++++---------- drivers/net/i40e/base/i40e_adminq.h | 5 +- drivers/net/i40e/base/i40e_adminq_cmd.h | 54 ++++------ drivers/net/i40e/base/i40e_common.c | 133 +++++++++++------------- drivers/net/i40e/base/i40e_devids.h | 4 + drivers/net/i40e/base/i40e_nvm.c | 86 +++++++++++++-- drivers/net/i40e/base/i40e_osdep.h | 7 ++ drivers/net/i40e/base/i40e_prototype.h | 16 +-- drivers/net/i40e/base/i40e_type.h | 42 +++++++- drivers/net/i40e/base/i40e_virtchnl.h | 45 +++++++- drivers/net/i40e/i40e_ethdev.c | 4 +- drivers/net/i40e/i40e_pf.c | 2 +- lib/librte_eal/common/include/rte_pci_dev_ids.h | 8 ++ 15 files changed, 303 insertions(+), 200 deletions(-)
Signature · 1 line
2.5.0
PATCH v2 1/15 i40e/base: remove HMC AQ APIs
HMC AQ APIs were removed from the latest datasheet, and hence remove its implementations and relevant.
--- drivers/net/i40e/base/i40e_adminq.c | 4 --- drivers/net/i40e/base/i40e_adminq_cmd.h | 25 -------------- drivers/net/i40e/base/i40e_common.c | 61 --------------------------------- drivers/net/i40e/base/i40e_prototype.h | 8 ----- 4 files changed, 98 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +0 -4
@@ -683,10 +683,6 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) hw->aq.nvm_release_on_done = false; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ; - ret_code =i40e_aq_set_hmc_resource_profile (hw, -I40E_HMC_PROFILE_DEFAULT , -0 , -NULL );#endif /* PF_DRIVER */ ret_code =I40E_SUCCESS ;
drivers/net/i40e/base/i40e_adminq_cmd.h +0 -25
@@ -224,10 +224,6 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_resume_port_tx =0x041C , i40e_aqc_opc_configure_partition_bw =0x041D , -/* hmc */ - i40e_aqc_opc_query_hmc_resource_profile =0x0500 , - i40e_aqc_opc_set_hmc_resource_profile =0x0501 , -/* phy commands*/ i40e_aqc_opc_get_phy_abilities =0x0600 , i40e_aqc_opc_set_phy_config = 0x0601,
@@ -1646,27 +1642,6 @@ struct i40e_aqc_configure_partition_bw_data {I40E_CHECK_STRUCT_LEN (0x22 , i40e_aqc_configure_partition_bw_data); -/* Get and set the active HMC resource profile and status. -* (direct 0x0500) and (direct 0x0501) -*/ -struct i40e_aq_get_set_hmc_resource_profile { -u8 pm_profile; -u8 pe_vf_enabled; -u8 reserved[14 ]; -}; - -I40E_CHECK_CMD_LENGTH (i40e_aq_get_set_hmc_resource_profile); - -enum i40e_aq_hmc_profile { -/* I40E_HMC_PROFILE_NO_CHANGE = 0, reserved */ -I40E_HMC_PROFILE_DEFAULT =1 , -I40E_HMC_PROFILE_FAVOR_VF =2 , -I40E_HMC_PROFILE_EQUAL =3 , -}; - -#define I40E_AQ_GET_HMC_RESOURCE_PROFILE_PM_MASK 0xF -#define I40E_AQ_GET_HMC_RESOURCE_PROFILE_COUNT_MASK 0x3F -/* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */ /* set in param0 for get phy abilities to report qualified modules */
drivers/net/i40e/base/i40e_common.c +0 -61
67 lines not on this page · raw message
drivers/net/i40e/base/i40e_prototype.h +0 -8
@@ -345,10 +345,6 @@ enum i40e_status_code i40e_aq_config_vsi_bw_limit(struct i40e_hw *hw,enum i40e_status_code i40e_aq_dcb_ignore_pfc (struct i40e_hw *hw,u8 tcmap,bool request,u8 *tcmap_ret,struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_get_hmc_resource_profile (struct i40e_hw *hw, -enum i40e_aq_hmc_profile *profile, -u8 *pe_vf_enabled_count, -struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_config_switch_comp_ets_bw_limit( struct i40e_hw *hw, u16 seid, struct i40e_aqc_configure_switching_comp_ets_bw_limit_data *bw_data,
@@ -359,10 +355,6 @@ enum i40e_status_code i40e_aq_config_vsi_ets_sla_bw_limit(struct i40e_hw *hw, struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_dcb_updated (struct i40e_hw *hw,struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_set_hmc_resource_profile (struct i40e_hw *hw, -enum i40e_aq_hmc_profile profile, -u8 pe_vf_enabled_count, -struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_config_switch_comp_bw_limit (struct i40e_hw *hw,u16 seid,u16 credit,u8 max_bw,struct i40e_asq_cmd_details *cmd_details);
Signature · 1 line
2.5.0
Re: [PATCH v2 01/15] i40e/base: remove HMC AQ APIs
- Check patch: success
- Apply patch: success
- compilation: success
OS: fedora20
GCC: gcc_x86-64, 4.8.3
ICC: 16.0.2
Commit: 587d684d70f9d7f74e77a886c58103b40409caea
i686-native-linuxapp-icc: compile pass x86_64-native-linuxapp-gcc-combined: compile pass
i686-native-linuxapp-gcc: compile pass x86_64-native-linuxapp-gcc: compile pass x86_64-native-linuxapp-icc: compile pass x86_64-native-linuxapp-gcc-debug: compile pass x86_64-native-linuxapp-gcc-shared: compile pass x86_64-native-linuxapp-clang: compile pass
- dts validation:
-- Test Commit: c8c33ad7f94c59d1c0676af0cfd61207b3e808db
-- OS/Kernel: Fedora22/4.2.8-200.fc22.x86_64
-- GCC: gcc version 5.1.1
-- CPU: Intel(R) Xeon(R) CPU E5-2658 v2 @ 2.40GHz
-- NIC: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ [8086:1584]
-- total 106,failed 10(Detailed case list see in the attachment,10 failed cases also exist in daily regression test)
Thanks
Yongjie
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Helin Zhang
Sent: Tuesday, May 24, 2016 2:23 PM
To: [email protected]
Cc: Zhang, Helin
Subject: [dpdk-dev] [PATCH v2 01/15] i40e/base: remove HMC AQ APIs
HMC AQ APIs were removed from the latest datasheet, and hence remove its implementations and relevant.
--- drivers/net/i40e/base/i40e_adminq.c | 4 --- drivers/net/i40e/base/i40e_adminq_cmd.h | 25 -------------- drivers/net/i40e/base/i40e_common.c | 61 --------------------------------- drivers/net/i40e/base/i40e_prototype.h | 8 ----- 4 files changed, 98 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +0 -4
@@ -683,10 +683,6 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) hw->aq.nvm_release_on_done = false; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ; - ret_code =i40e_aq_set_hmc_resource_profile (hw, -I40E_HMC_PROFILE_DEFAULT , -0 , -NULL );#endif /* PF_DRIVER */ ret_code =I40E_SUCCESS ;
drivers/net/i40e/base/i40e_adminq_cmd.h +0 -25
@@ -224,10 +224,6 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_resume_port_tx =0x041C , i40e_aqc_opc_configure_partition_bw =0x041D , -/* hmc */ - i40e_aqc_opc_query_hmc_resource_profile =0x0500 , - i40e_aqc_opc_set_hmc_resource_profile =0x0501 , -/* phy commands*/ i40e_aqc_opc_get_phy_abilities =0x0600 , i40e_aqc_opc_set_phy_config = 0x0601,
@@ -1646,27 +1642,6 @@ struct i40e_aqc_configure_partition_bw_data {I40E_CHECK_STRUCT_LEN (0x22 , i40e_aqc_configure_partition_bw_data); -/* Get and set the active HMC resource profile and status. -* (direct 0x0500) and (direct 0x0501) -*/ -struct i40e_aq_get_set_hmc_resource_profile { -u8 pm_profile; -u8 pe_vf_enabled; -u8 reserved[14 ]; -}; - -I40E_CHECK_CMD_LENGTH (i40e_aq_get_set_hmc_resource_profile); - -enum i40e_aq_hmc_profile { -/* I40E_HMC_PROFILE_NO_CHANGE = 0, reserved */ -I40E_HMC_PROFILE_DEFAULT =1 , -I40E_HMC_PROFILE_FAVOR_VF =2 , -I40E_HMC_PROFILE_EQUAL =3 , -}; - -#define I40E_AQ_GET_HMC_RESOURCE_PROFILE_PM_MASK 0xF -#define I40E_AQ_GET_HMC_RESOURCE_PROFILE_COUNT_MASK 0x3F -/* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */ /* set in param0 for get phy abilities to report qualified modules */ diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ef3425e..7a5f754 100644
drivers/net/i40e/base/i40e_common.c +0 -61
66 lines not on this page · raw message
drivers/net/i40e/base/i40e_prototype.h +0 -3
@@ -345,10 +345,6 @@ enum i40e_status_code i40e_aq_config_vsi_bw_limit(struct i40e_hw *hw, enum i40e_status_code i40e_aq_dcb_ignore_pfc(struct i40e_hw *hw, u8 tcmap, bool request, u8 *tcmap_ret, struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_get_hmc_resource_profile(struct i40e_hw *hw, -enum i40e_aq_hmc_profile *profile, -u8 *pe_vf_enabled_count, -struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_config_switch_comp_ets_bw_limit( struct i40e_hw *hw, u16 seid, struct i40e_aqc_configure_switching_comp_ets_bw_limit_data *bw_data, @@ -359,10 +355,6 @@ enum i40e_status_code i40e_aq_config_vsi_ets_sla_bw_limit(struct i40e_hw *hw, struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_dcb_updated(struct i40e_hw *hw,
struct i40e_asq_cmd_details *cmd_details); -enum i40e_status_code i40e_aq_set_hmc_resource_profile(struct i40e_hw *hw,
- enum i40e_aq_hmc_profile profile,
- u8 pe_vf_enabled_count,
- struct i40e_asq_cmd_details *cmd_details);
enum i40e_status_code i40e_aq_config_switch_comp_bw_limit(struct i40e_hw *hw,
u16 seid, u16 credit, u8 max_bw,
struct i40e_asq_cmd_details *cmd_details);
--
2.5.0
Re: [PATCH v2 01/15] i40e/base: remove HMC AQ APIs
In reply to Helin ZhangQuoted 4 lines · Helin Zhang
HMC AQ APIs were removed from the latest datasheet, and hence remove its implementations and relevant.
Signed-off-by Helin Zhang <[email protected]>
Still haven't clarified what HMC stands for.... :-)
Looking up an old data sheet, I guess it stands for "Host Memory Cache", is that correct?
Please expand out all acronyms in the commit message unless they are really common ones.
Regards,
/Bruce
PS: Suggested rule of thumb - unless it's called out for a capitalization check in scripts/check-git-log.sh, the acronym is not common enough, and you need to expand it out.
PATCH v2 2/15 i40e/base: move field of NVM update status info
In reply to Helin ZhangIt centralizes all NVM update status info into a single structure, by moving nvm_release_on_done from struct i40e_adminq_info to struct i40e_hw, for better management.
--- drivers/net/i40e/base/i40e_adminq.c | 6 +++--- drivers/net/i40e/base/i40e_adminq.h | 1 - drivers/net/i40e/base/i40e_nvm.c | 12 ++++++------ drivers/net/i40e/base/i40e_type.h | 1 + 4 files changed, 10 insertions(+), 10 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +3 -3
@@ -680,7 +680,7 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)/* pre-emptive resource lock release */ i40e_aq_release_resource (hw,I40E_NVM_RESOURCE_ID ,0 ,NULL ); - hw->aq.nvm_release_on_done = false; + hw->nvm_release_on_done = false; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ;#endif /* PF_DRIVER */
@@ -1117,9 +1117,9 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw,#ifdef PF_DRIVER if (i40e_is_nvm_update_op (&e->desc)) { -if (hw->aq.nvm_release_on_done) { +if (hw->nvm_release_on_done) {i40e_release_nvm (hw); - hw->aq.nvm_release_on_done = false; + hw->nvm_release_on_done = false; }switch (hw->nvmupd_state) {
drivers/net/i40e/base/i40e_adminq.h +0 -1
@@ -104,7 +104,6 @@ struct i40e_adminq_info {u32 fw_build;/* firmware build number */ u16 api_maj_ver;/* api major version */ u16 api_min_ver;/* api minor version */ -bool nvm_release_on_done;struct i40e_spinlock asq_spinlock;/* Send queue spinlock */ struct i40e_spinlock arq_spinlock;/* Receive queue spinlock */
drivers/net/i40e/base/i40e_nvm.c +6 -6
@@ -875,7 +875,7 @@ enum i40e_status_code i40e_nvmupd_command(struct i40e_hw *hw,i40e_debug (hw,I40E_DEBUG_NVM ,"%s state %d nvm_release_on_hold %d cmd 0x%08x config 0x%08x offset 0x%08x data_size 0x%08x\n" , i40e_nvm_update_state_str[upd_cmd], hw->nvmupd_state, - hw->aq.nvm_release_on_done, + hw->nvm_release_on_done, cmd->command, cmd->config, cmd->offset, cmd->data_size);if (upd_cmd ==I40E_NVMUPD_INVALID ) {
@@ -980,7 +980,7 @@ STATIC enum i40e_status_code i40e_nvmupd_state_init(struct i40e_hw *hw,if (status) {i40e_release_nvm (hw); }else { - hw->aq.nvm_release_on_done = true; + hw->nvm_release_on_done = true; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; } }
@@ -996,7 +996,7 @@ STATIC enum i40e_status_code i40e_nvmupd_state_init(struct i40e_hw *hw,if (status) {i40e_release_nvm (hw); }else { - hw->aq.nvm_release_on_done = true; + hw->nvm_release_on_done = true; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; } }
@@ -1030,7 +1030,7 @@ STATIC enum i40e_status_code i40e_nvmupd_state_init(struct i40e_hw *hw, -EIO ;i40e_release_nvm (hw); }else { - hw->aq.nvm_release_on_done = true; + hw->nvm_release_on_done = true; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; } }
@@ -1138,7 +1138,7 @@ retry: -EIO ; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ; }else { - hw->aq.nvm_release_on_done = true; + hw->nvm_release_on_done = true; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; }break ;
@@ -1167,7 +1167,7 @@ retry: -EIO ; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ; }else { - hw->aq.nvm_release_on_done = true; + hw->nvm_release_on_done = true; hw->nvmupd_state =I40E_NVMUPD_STATE_INIT_WAIT ; }break ;
drivers/net/i40e/base/i40e_type.h +1 -0
@@ -655,6 +655,7 @@ struct i40e_hw {enum i40e_nvmupd_state nvmupd_state;struct i40e_aq_desc nvm_wb_desc;struct i40e_virt_mem nvm_buff; +bool nvm_release_on_done;/* HMC info */ struct i40e_hmc_info hmc;/* HMC info struct */
Signature · 1 line
2.5.0
PATCH v2 3/15 i40e/base: refactor NVM update command processing
In reply to Helin ZhangIt refactors the NVM update command processing, with adding a new element of nvm_wait_opcode in struct i40e_hw to indicate the opcode it waits on, and putting the wait event check into a function. In addition, that element needs to be initialized or updated properly.
--- drivers/net/i40e/base/i40e_adminq.c | 33 +-------------- drivers/net/i40e/base/i40e_nvm.c | 76 +++++++++++++++++++++++++++++++--- drivers/net/i40e/base/i40e_prototype.h | 1 + drivers/net/i40e/base/i40e_type.h | 1 + 4 files changed, 74 insertions(+), 37 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +1 -32
@@ -37,18 +37,6 @@ POSSIBILITY OF SUCH DAMAGE.#include "i40e_adminq.h" #include "i40e_prototype.h" -#ifdef PF_DRIVER -/** -* i40e_is_nvm_update_op - return true if this is an NVM update operation -* @desc: API request descriptor -**/ -STATIC INLINE bool i40e_is_nvm_update_op(struct i40e_aq_desc *desc) -{ -return (desc->opcode ==CPU_TO_LE16 (i40e_aqc_opc_nvm_erase) || - desc->opcode ==CPU_TO_LE16 (i40e_aqc_opc_nvm_update)); -} - -#endif /* PF_DRIVER */ /** * i40e_adminq_init_regs - Initialize AdminQ registers * @hw: pointer to the hardware structure
@@ -1116,26 +1104,7 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw, hw->aq.arq.next_to_use = ntu;#ifdef PF_DRIVER -if (i40e_is_nvm_update_op (&e->desc)) { -if (hw->nvm_release_on_done) { -i40e_release_nvm (hw); - hw->nvm_release_on_done = false; - } - -switch (hw->nvmupd_state) { -case I40E_NVMUPD_STATE_INIT_WAIT : - hw->nvmupd_state =I40E_NVMUPD_STATE_INIT ; -break ; - -case I40E_NVMUPD_STATE_WRITE_WAIT : - hw->nvmupd_state =I40E_NVMUPD_STATE_WRITING ; -break ; - -default : -break ; - } - } - +i40e_nvmupd_check_wait_event (hw,LE16_TO_CPU (e->desc.opcode));#endif clean_arq_element_out:/* Set pending if needed, unlock and return */
drivers/net/i40e/base/i40e_nvm.c +71 -5
160 lines not on this page · raw message
drivers/net/i40e/base/i40e_prototype.h +1 -0
@@ -465,6 +465,7 @@ enum i40e_status_code i40e_validate_nvm_checksum(struct i40e_hw *hw,enum i40e_status_code i40e_nvmupd_command (struct i40e_hw *hw,struct i40e_nvm_access *cmd,u8 *bytes,int *); +void i40e_nvmupd_check_wait_event (struct i40e_hw *hw,u16 opcode);void i40e_set_pci_config_data (struct i40e_hw *hw,u16 link_status);#endif /* PF_DRIVER */
drivers/net/i40e/base/i40e_type.h +1 -0
@@ -656,6 +656,7 @@ struct i40e_hw {struct i40e_aq_desc nvm_wb_desc;struct i40e_virt_mem nvm_buff;bool nvm_release_on_done; +u16 nvm_wait_opcode;/* HMC info */ struct i40e_hmc_info hmc;/* HMC info struct */
Signature · 1 line
2.5.0
PATCH v2 4/15 i40e/base: trim the code
In reply to Helin ZhangIt trim the source code, with limiting pieces of code for PF or VF driver only, code style fixes, and annotation rewording.
--- drivers/net/i40e/base/i40e_adminq.c | 52 +++++++++++++++++++-------------- drivers/net/i40e/base/i40e_adminq.h | 4 +-- drivers/net/i40e/base/i40e_adminq_cmd.h | 21 +++++++------ drivers/net/i40e/base/i40e_common.c | 5 ++-- drivers/net/i40e/base/i40e_prototype.h | 3 +- 5 files changed, 48 insertions(+), 37 deletions(-)
drivers/net/i40e/base/i40e_adminq.c +30 -22
@@ -572,6 +572,26 @@ shutdown_arq_out:i40e_release_spinlock (&hw->aq.arq_spinlock);return ret_code; } +#ifdef PF_DRIVER + +/** +* i40e_resume_aq - resume AQ processing from 0 +* @hw: pointer to the hardware structure +**/ +STATIC void i40e_resume_aq(struct i40e_hw *hw) +{ +/* Registers are reset after PF reset */ + hw->aq.asq.next_to_use =0 ; + hw->aq.asq.next_to_clean =0 ; + +i40e_config_asq_regs (hw); + + hw->aq.arq.next_to_use =0 ; + hw->aq.arq.next_to_clean =0 ; + +i40e_config_arq_regs (hw); +} +#endif /* PF_DRIVER */ /** * i40e_init_adminq - main initialization routine for Admin Queue
@@ -586,12 +606,15 @@ shutdown_arq_out:**/ enum i40e_status_code i40e_init_adminq (struct i40e_hw *hw) { -enum i40e_status_code ret_code;#ifdef PF_DRIVER -u16 eetrack_lo, eetrack_hi;u16 cfg_ptr, oem_hi, oem_lo; +u16 eetrack_lo, eetrack_hi; +#endif +enum i40e_status_code ret_code; +#ifdef PF_DRIVER int retry =0 ;#endif +/* verify input for valid configuration */ if ((hw->aq.num_arq_entries == 0) || (hw->aq.num_asq_entries == 0) ||
@@ -600,8 +623,6 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) ret_code =I40E_ERR_CONFIG ; goto init_adminq_exit; } - -/* initialize spin locks */ i40e_init_spinlock (&hw->aq.asq_spinlock);i40e_init_spinlock (&hw->aq.arq_spinlock);
@@ -704,8 +725,6 @@ enum i40e_status_code i40e_shutdown_adminq(struct i40e_hw *hw)i40e_shutdown_asq (hw);i40e_shutdown_arq (hw); - -/* destroy the spinlocks */ i40e_destroy_spinlock (&hw->aq.asq_spinlock);i40e_destroy_spinlock (&hw->aq.arq_spinlock);
@@ -731,7 +750,6 @@ u16 i40e_clean_asq(struct i40e_hw *hw) desc =I40E_ADMINQ_DESC (*asq, ntc); details =I40E_ADMINQ_DETAILS (*asq, ntc); -while (rd32 (hw, hw->aq.asq.head) != ntc) {i40e_debug (hw,I40E_DEBUG_AQ_MESSAGE ,"ntc %d head %d.\n" , ntc,rd32 (hw, hw->aq.asq.head));
@@ -764,7 +782,11 @@ u16 i40e_clean_asq(struct i40e_hw *hw)* Returns true if the firmware has processed all descriptors on the * admin send queue. Returns false if there are still requests pending. **/ +#ifdef VF_DRIVER bool i40e_asq_done (struct i40e_hw *hw) +#else +STATIC bool i40e_asq_done(struct i40e_hw *hw) +#endif {/* AQ designers suggest use of head for better * timing reliability than DD bit
@@ -922,7 +944,6 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw,*/ if (i40e_asq_done (hw))break ; -/* ugh! delay while spin_lock */ i40e_msec_delay (1 ); total_delay++; }while (total_delay < hw->aq.asq_cmd_timeout);
@@ -1105,7 +1126,7 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw,#ifdef PF_DRIVER i40e_nvmupd_check_wait_event (hw,LE16_TO_CPU (e->desc.opcode)); -#endif +#endif /* PF_DRIVER */ clean_arq_element_out:/* Set pending if needed, unlock and return */ if (pending !=NULL )
@@ -1116,16 +1137,3 @@ clean_arq_element_err:return ret_code; } -void i40e_resume_aq (struct i40e_hw *hw) -{ -/* Registers are reset after PF reset */ - hw->aq.asq.next_to_use =0 ; - hw->aq.asq.next_to_clean =0 ; - -i40e_config_asq_regs (hw); - - hw->aq.arq.next_to_use =0 ; - hw->aq.arq.next_to_clean =0 ; - -i40e_config_arq_regs (hw); -}
drivers/net/i40e/base/i40e_adminq.h +2 -2
@@ -157,8 +157,8 @@ STATIC INLINE int i40e_aq_rc_to_posix(int aq_ret, int aq_rc) }/* general information */ -#define I40E_AQ_LARGE_BUF 512 -#define I40E_ASQ_CMD_TIMEOUT 250/* msecs */ +#define I40E_AQ_LARGE_BUF 512 +#define I40E_ASQ_CMD_TIMEOUT 250/* msecs */ #ifdef I40E_ESS_SUPPORT #define I40E_ASQ_CMD_TIMEOUT_ESS 50000/* msecs */ #endif
drivers/net/i40e/base/i40e_adminq_cmd.h +12 -9
@@ -927,7 +927,7 @@ struct i40e_aqc_vsi_properties_data {u8 up_enable_bits;u8 sched_reserved;/* outer up section */ -__le32 outer_up_table;/* same structure and defines as ingress table */ +__le32 outer_up_table;/* same structure and defines as ingress tbl */ u8 cmd_reserved[8 ];/* last 32 bytes are written by FW */ __le16 qs_handle[8 ];
@@ -1567,7 +1567,8 @@ struct i40e_aqc_configure_switching_comp_ets_bw_limit_data {u8 reserved1[28 ]; }; -I40E_CHECK_STRUCT_LEN (0x40 , i40e_aqc_configure_switching_comp_ets_bw_limit_data); +I40E_CHECK_STRUCT_LEN (0x40 , + i40e_aqc_configure_switching_comp_ets_bw_limit_data);/* Configure Switching Component Bandwidth Allocation per Tc * (indirect 0x0417)
@@ -1941,7 +1942,7 @@ struct i40e_aqc_nvm_config_read {#define I40E_AQ_ANVM_READ_SINGLE_FEATURE 0#define I40E_AQ_ANVM_READ_MULTIPLE_FEATURES 1__le16 element_count; -__le16 element_id;/* Feature/field ID */ +__le16 element_id;/* Feature/field ID */ __le16 element_id_msw;/* MSWord of field ID */ __le32 address_high;__le32 address_low;
@@ -1962,9 +1963,10 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_config_write);/* Used for 0x0704 as well as for 0x0705 commands */ #define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT 1 -#define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_MASK (1 << I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT) -#define I40E_AQ_ANVM_FEATURE 0 -#define I40E_AQ_ANVM_IMMEDIATE_FIELD (1 << FEATURE_OR_IMMEDIATE_SHIFT) +#define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_MASK \ + (1 << I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT) +#define I40E_AQ_ANVM_FEATURE 0 +#define I40E_AQ_ANVM_IMMEDIATE_FIELD (1 << FEATURE_OR_IMMEDIATE_SHIFT)struct i40e_aqc_nvm_config_data_feature {__le16 feature_id;#define I40E_AQ_ANVM_FEATURE_OPTION_OEM_ONLY 0x01
@@ -1988,7 +1990,7 @@ I40E_CHECK_STRUCT_LEN(0xc, i40e_aqc_nvm_config_data_immediate_field);/* OEM Post Update (indirect 0x0720) * no command data struct used */ -struct i40e_aqc_nvm_oem_post_update { +struct i40e_aqc_nvm_oem_post_update {#define I40E_AQ_NVM_OEM_POST_UPDATE_EXTERNAL_DATA 0x01u8 sel_data;u8 reserved[7 ];
@@ -2278,7 +2280,8 @@ I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_lldp_set_local_mib_resp);*/ struct i40e_aqc_lldp_stop_start_specific_agent {#define I40E_AQC_START_SPECIFIC_AGENT_SHIFT 0 -#define I40E_AQC_START_SPECIFIC_AGENT_MASK (1 << I40E_AQC_START_SPECIFIC_AGENT_SHIFT) +#define I40E_AQC_START_SPECIFIC_AGENT_MASK \ + (1 << I40E_AQC_START_SPECIFIC_AGENT_SHIFT)u8 command;u8 reserved[15 ]; };
@@ -2300,7 +2303,7 @@ struct i40e_aqc_add_udp_tunnel {I40E_CHECK_CMD_LENGTH (i40e_aqc_add_udp_tunnel);struct i40e_aqc_add_udp_tunnel_completion { -__le16 udp_port; +__le16 udp_port;u8 filter_entry_index;u8 multiple_pfs;#define I40E_AQC_SINGLE_PF 0x0
drivers/net/i40e/base/i40e_common.c +2 -3
@@ -1317,8 +1317,7 @@ enum i40e_status_code i40e_pf_reset(struct i40e_hw *hw) I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >>I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT ; -/* It can take upto 15 secs for GRST steady state */ - grst_del = grst_del *20 ;/* bump it to 16 secs max to be safe */ + grst_del = grst_del *20 ;for (cnt =0 ; cnt < grst_del; cnt++) { reg =rd32 (hw,I40E_GLGEN_RSTAT );
@@ -4425,7 +4424,7 @@ enum i40e_status_code i40e_aq_delete_element(struct i40e_hw *hw, u16 seid, }/** -* i40_aq_add_pvirt - Instantiate a Port Virtualizer on a port +* i40e_aq_add_pvirt - Instantiate a Port Virtualizer on a port * @hw: pointer to the hw struct * @flags: component flags * @mac_seid: uplink seid (MAC SEID)
drivers/net/i40e/base/i40e_prototype.h +2 -1
@@ -67,14 +67,15 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw,void *buff,/* can be NULL */ u16 buff_size, struct i40e_asq_cmd_details *cmd_details); +#ifdef VF_DRIVER bool i40e_asq_done (struct i40e_hw *hw); +#endif /* debug function for adminq */ void i40e_debug_aq (struct i40e_hw *hw,enum i40e_debug_mask mask,void *desc,void *buffer,u16 buf_len);void i40e_idle_aq (struct i40e_hw *hw); -void i40e_resume_aq (struct i40e_hw *hw);bool i40e_check_asq_alive (struct i40e_hw *hw);enum i40e_status_code i40e_aq_queue_shutdown (struct i40e_hw *hw,bool unloading);#ifdef X722_SUPPORT
Signature · 1 line
2.5.0
Re: [PATCH v2 04/15] i40e/base: trim the code
Quoted 4 lines · Helin Zhang
It trim the source code, with limiting pieces of code for PF or VF driver only, code style fixes, and annotation rewording.
Quoted 9 lines
Signed-off-by Helin Zhang <[email protected]>--- drivers/net/i40e/base/i40e_adminq.c | 52 +++++++++++++++++++-------------- drivers/net/i40e/base/i40e_adminq.h | 4 +-- drivers/net/i40e/base/i40e_adminq_cmd.h | 21 +++++++------ drivers/net/i40e/base/i40e_common.c | 5 ++-- drivers/net/i40e/base/i40e_prototype.h | 3 +- 5 files changed, 48 insertions(+), 37 deletions(-)
The word "trim" generally implies making things shorter, but in this case more lines are added to the code than deleted. The title should therefore be something more like "limit PF/VF specific source code to that driver only".
/Bruce
PATCH v2 5/15 i40e/base: fixup Geneve VNI for HW use
In reply to Helin ZhangThe hardware doesn't layout the Geneve VNI (Virtual Network Identifier) quite the same as the VxLAN VNI, so it needs to adjust it before sending through the AQ commands as the workaround.
--- drivers/net/i40e/base/i40e_common.c | 35 ++++++++++++++++++++++++++++++++++- drivers/net/i40e/base/i40e_osdep.h | 7 +++++++ 2 files changed, 41 insertions(+), 1 deletion(-)
drivers/net/i40e/base/i40e_common.c +34 -1
@@ -5422,6 +5422,35 @@ void i40e_add_filter_to_drop_tx_flow_control_frames(struct i40e_hw *hw, }/** +* i40e_fix_up_geneve_vni - adjust Geneve VNI for HW issue +* @filters: list of cloud filters +* @filter_count: length of list +* +* There's an issue in the device where the Geneve VNI layout needs +* to be shifted 1 byte over from the VxLAN VNI +**/ +STATIC void i40e_fix_up_geneve_vni( +struct i40e_aqc_add_remove_cloud_filters_element_data *filters, +u8 filter_count) +{ +struct i40e_aqc_add_remove_cloud_filters_element_data *f = filters; +int i; + +for (i =0 ; i < filter_count; i++) { +u16 tnl_type; +u32 ti; + + tnl_type = (le16_to_cpu (f[i].flags) & +I40E_AQC_ADD_CLOUD_TNL_TYPE_MASK ) >> +I40E_AQC_ADD_CLOUD_TNL_TYPE_SHIFT ; +if (tnl_type ==I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE ) { + ti =le32_to_cpu (f[i].tenant_id); + f[i].tenant_id =cpu_to_le32 (ti <<8 ); + } + } +} + +/** * i40e_aq_add_cloud_filters * @hw: pointer to the hardware structure * @seid: VSI seid to add cloud filters from
@@ -5441,8 +5470,8 @@ enum i40e_status_code i40e_aq_add_cloud_filters(struct i40e_hw *hw,struct i40e_aq_desc desc;struct i40e_aqc_add_remove_cloud_filters *cmd = (struct i40e_aqc_add_remove_cloud_filters *)&desc.params.raw; -u16 buff_len;enum i40e_status_code status; +u16 buff_len;i40e_fill_default_direct_cmd_desc (&desc, i40e_aqc_opc_add_cloud_filters);
@@ -5453,6 +5482,8 @@ enum i40e_status_code i40e_aq_add_cloud_filters(struct i40e_hw *hw, cmd->num_filters = filter_count; cmd->seid =CPU_TO_LE16 (seid); +i40e_fix_up_geneve_vni (filters, filter_count); + status =i40e_asq_send_command (hw, &desc, filters, buff_len,NULL );return status;
@@ -5490,6 +5521,8 @@ enum i40e_status_code i40e_aq_remove_cloud_filters(struct i40e_hw *hw, cmd->num_filters = filter_count; cmd->seid =CPU_TO_LE16 (seid); +i40e_fix_up_geneve_vni (filters, filter_count); + status =i40e_asq_send_command (hw, &desc, filters, buff_len,NULL );return status;
drivers/net/i40e/base/i40e_osdep.h +7 -0
@@ -204,6 +204,13 @@ struct i40e_virt_mem {#define LE32_TO_CPU (c) rte_le_to_cpu_32(c)#define LE64_TO_CPU (k) rte_le_to_cpu_64(k) +#define cpu_to_le16 (o) rte_cpu_to_le_16(o) +#define cpu_to_le32 (s) rte_cpu_to_le_32(s) +#define cpu_to_le64 (h) rte_cpu_to_le_64(h) +#define le16_to_cpu (a) rte_le_to_cpu_16(a) +#define le32_to_cpu (c) rte_le_to_cpu_32(c) +#define le64_to_cpu (k) rte_le_to_cpu_64(k) +/* SW spinlock */ struct i40e_spinlock {rte_spinlock_t spinlock;
Signature · 1 line
2.5.0
Re: [PATCH v2 05/15] i40e/base: fixup Geneve VNI for HW use
Quoted 6 lines · Helin Zhang
The hardware doesn't layout the Geneve VNI (Virtual Network Identifier) quite the same as the VxLAN VNI, so it needs to adjust it before sending through the AQ commands as the workaround.
Signed-off-by Helin Zhang <[email protected]>
Missing fixline:
Fixes: 8db9e2a1b232 ("i40e: base driver")PATCH v2 6/15 i40e/base: expose mirroring config
In reply to Helin ZhangIt exposes the configuration of mirroring or not egress traffic to VSIs in promiscuous mode, as latest firmware supports that from API version 1.5.
--- drivers/net/i40e/base/i40e_common.c | 9 ++++++--- drivers/net/i40e/base/i40e_prototype.h | 4 ++-- drivers/net/i40e/i40e_ethdev.c | 4 ++-- drivers/net/i40e/i40e_pf.c | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-)
drivers/net/i40e/base/i40e_common.c +6 -3
@@ -2214,10 +2214,12 @@ enum i40e_status_code i40e_aq_set_default_vsi(struct i40e_hw *hw,* @seid: vsi number * @set: set unicast promiscuous enable/disable * @cmd_details: pointer to command details structure or NULL +* @rx_only_promisc: flag to decide if egress traffic gets mirrored in promisc **/ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous (struct i40e_hw *hw,u16 seid,bool set, -struct i40e_asq_cmd_details *cmd_details) +struct i40e_asq_cmd_details *cmd_details, +bool rx_only_promisc) {struct i40e_aq_desc desc; struct i40e_aqc_set_vsi_promiscuous_modes *cmd =
@@ -2230,8 +2232,9 @@ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,if (set) { flags |=I40E_AQC_SET_VSI_PROMISC_UNICAST ; -if (((hw->aq.api_maj_ver ==1 ) && (hw->aq.api_min_ver >=5 )) || - (hw->aq.api_maj_ver >1 )) +if (rx_only_promisc && + (((hw->aq.api_maj_ver ==1 ) && (hw->aq.api_min_ver >=5 )) || + (hw->aq.api_maj_ver >1 ))) flags |=I40E_AQC_SET_VSI_PROMISC_TX ; }
drivers/net/i40e/base/i40e_prototype.h +2 -2
@@ -166,7 +166,8 @@ enum i40e_status_code i40e_aq_set_vsi_broadcast(struct i40e_hw *hw, u16 vsi_id, bool set_filter, struct i40e_asq_cmd_details *cmd_details);enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous (struct i40e_hw *hw, -u16 vsi_id,bool set,struct i40e_asq_cmd_details *cmd_details); +u16 vsi_id,bool set,struct i40e_asq_cmd_details *cmd_details, +bool rx_only_promisc);enum i40e_status_code i40e_aq_set_vsi_multicast_promiscuous (struct i40e_hw *hw,u16 vsi_id,bool set,struct i40e_asq_cmd_details *cmd_details); enum i40e_status_code i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw *hw,
@@ -404,7 +405,6 @@ enum i40e_status_code i40e_aq_remove_cloud_filters(struct i40e_hw *hw,u16 vsi, struct i40e_aqc_add_remove_cloud_filters_element_data *filters, u8 filter_count); -enum i40e_status_code i40e_aq_alternate_read (struct i40e_hw *hw,u32 reg_addr0,u32 *reg_val0,u32 reg_addr1,u32 *reg_val1);
drivers/net/i40e/i40e_ethdev.c +2 -2
@@ -1664,7 +1664,7 @@ i40e_dev_promiscuous_enable(struct rte_eth_dev *dev)int status; status =i40e_aq_set_vsi_unicast_promiscuous (hw, vsi->seid, - true,NULL ); + true,NULL , true);if (status !=I40E_SUCCESS )PMD_DRV_LOG (ERR ,"Failed to enable unicast promiscuous" );
@@ -1684,7 +1684,7 @@ i40e_dev_promiscuous_disable(struct rte_eth_dev *dev)int status; status =i40e_aq_set_vsi_unicast_promiscuous (hw, vsi->seid, - false,NULL ); + false,NULL , true);if (status !=I40E_SUCCESS )PMD_DRV_LOG (ERR ,"Failed to disable unicast promiscuous" );
drivers/net/i40e/i40e_pf.c +1 -1
@@ -810,7 +810,7 @@ i40e_pf_host_process_cmd_config_promisc_mode(if (promisc->flags &I40E_FLAG_VF_UNICAST_PROMISC ) unicast = TRUE; ret =i40e_aq_set_vsi_unicast_promiscuous (hw, - vf->vsi->seid, unicast,NULL ); + vf->vsi->seid, unicast,NULL , true);if (ret !=I40E_SUCCESS ) goto send_msg;
Signature · 1 line
2.5.0
PATCH v2 7/15 i40e/base: fix problematic mirror rule ID check
In reply to Helin ZhangIt removes the problematic mirror rule ID check. It returns an error if the mirror rule ID is 0, which is a valid value.
--- drivers/net/i40e/base/i40e_common.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/i40e/base/i40e_common.c +1 -4
@@ -3042,10 +3042,7 @@ enum i40e_status_code i40e_aq_delete_mirrorrule(struct i40e_hw *hw, u16 sw_seid, u16 *rules_used, u16 *rules_free) {/* Rule ID has to be valid except rule_type: INGRESS VLAN mirroring */ -if (rule_type !=I40E_AQC_MIRROR_RULE_TYPE_VLAN ) { -if (!rule_id) -return I40E_ERR_PARAM ; - }else { +if (rule_type ==I40E_AQC_MIRROR_RULE_TYPE_VLAN ) {/* count and mr_list shall be valid for rule_type INGRESS VLAN * mirroring. For other rule_type, count and rule_type should * not matter.
Signature · 1 line
2.5.0
PATCH v2 8/15 i40e/base: add new devices
In reply to Helin ZhangIt adds new device IDs and PHY types.
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 4 ++++ drivers/net/i40e/base/i40e_common.c | 4 ++++ drivers/net/i40e/base/i40e_devids.h | 4 ++++ lib/librte_eal/common/include/rte_pci_dev_ids.h | 8 ++++++++ 4 files changed, 20 insertions(+)
drivers/net/i40e/base/i40e_adminq_cmd.h +4 -0
@@ -1678,6 +1678,10 @@ enum i40e_aq_phy_type {I40E_PHY_TYPE_1000BASE_LX =0x1C ,I40E_PHY_TYPE_1000BASE_T_OPTICAL =0x1D ,I40E_PHY_TYPE_20GBASE_KR2 =0x1E , +I40E_PHY_TYPE_25GBASE_KR =0x1F , +I40E_PHY_TYPE_25GBASE_CR =0x20 , +I40E_PHY_TYPE_25GBASE_SR =0x21 , +I40E_PHY_TYPE_25GBASE_LR =0x22 , I40E_PHY_TYPE_MAX };
drivers/net/i40e/base/i40e_common.c +4 -0
@@ -67,6 +67,8 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)case I40E_DEV_ID_10G_BASE_T4 :case I40E_DEV_ID_20G_KR2 :case I40E_DEV_ID_20G_KR2_A : +case I40E_DEV_ID_25G_B : +case I40E_DEV_ID_25G_SFP28 : hw->mac.type =I40E_MAC_XL710 ;break ;#ifdef X722_SUPPORT
@@ -78,6 +80,8 @@ STATIC enum i40e_status_code i40e_set_mac_type(struct i40e_hw *hw)case I40E_DEV_ID_SFP_X722 :case I40E_DEV_ID_1G_BASE_T_X722 :case I40E_DEV_ID_10G_BASE_T_X722 : +case I40E_DEV_ID_SFP_I_X722 : +case I40E_DEV_ID_QSFP_I_X722 : hw->mac.type =I40E_MAC_X722 ;break ;#endif
drivers/net/i40e/base/i40e_devids.h +4 -0
@@ -49,6 +49,8 @@ POSSIBILITY OF SUCH DAMAGE.#define I40E_DEV_ID_20G_KR2 0x1587#define I40E_DEV_ID_20G_KR2_A 0x1588#define I40E_DEV_ID_10G_BASE_T4 0x1589 +#define I40E_DEV_ID_25G_B 0x158A +#define I40E_DEV_ID_25G_SFP28 0x158B#if defined(INTEGRATED_VF ) || defined(VF_DRIVER ) || defined(I40E_NDIS_SUPPORT )#define I40E_DEV_ID_VF 0x154C#define I40E_DEV_ID_VF_HV 0x1571
@@ -65,6 +67,8 @@ POSSIBILITY OF SUCH DAMAGE.#define I40E_DEV_ID_SFP_X722 0x37D0#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 +#define I40E_DEV_ID_SFP_I_X722 0x37D3 +#define I40E_DEV_ID_QSFP_I_X722 0x37D4#if defined(INTEGRATED_VF ) || defined(VF_DRIVER ) || defined(I40E_NDIS_SUPPORT )#define I40E_DEV_ID_X722_VF 0x37CD#define I40E_DEV_ID_X722_VF_HV 0x37D9
lib/librte_eal/common/include/rte_pci_dev_ids.h +8 -0
@@ -532,12 +532,16 @@ RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS)#define I40E_DEV_ID_20G_KR2 0x1587#define I40E_DEV_ID_20G_KR2_A 0x1588#define I40E_DEV_ID_10G_BASE_T4 0x1589 +#define I40E_DEV_ID_25G_B 0x158A +#define I40E_DEV_ID_25G_SFP28 0x158B#define I40E_DEV_ID_X722_A0 0x374C#define I40E_DEV_ID_KX_X722 0x37CE#define I40E_DEV_ID_QSFP_X722 0x37CF#define I40E_DEV_ID_SFP_X722 0x37D0#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2 +#define I40E_DEV_ID_SFP_I_X722 0x37D3 +#define I40E_DEV_ID_QSFP_I_X722 0x37D4 RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_XL710)RTE_PCI_DEV_ID_DECL_I40E (PCI_VENDOR_ID_INTEL ,I40E_DEV_ID_QEMU )
@@ -550,12 +554,16 @@ RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_20G_KR2) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_20G_KR2_A) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T4) +RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_25G_B) +RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_25G_SFP28) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_A0) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_X722) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_X722) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_X722) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_1G_BASE_T_X722) RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722) +RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_I_X722) +RTE_PCI_DEV_ID_DECL_I40E (PCI_VENDOR_ID_INTEL ,I40E_DEV_ID_QSFP_I_X722 )/*************** Physical FM10K devices from fm10k_type.h ***************/
Signature · 1 line
2.5.0
PATCH v2 9/15 i40e/base: fix the number of MSIX vector
In reply to Helin ZhangIt corrects the number of MSIX vector in a debug info.
--- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/base/i40e_common.c +1 -1
@@ -3670,7 +3670,7 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff, p->num_msix_vectors = number;i40e_debug (hw,I40E_DEBUG_INIT ,"HW Capability: MSIX vector count = %d\n" , - p->num_msix_vectors_vf); + p->num_msix_vectors);break ;case I40E_AQ_CAP_ID_VF_MSIX : p->num_msix_vectors_vf = number;
Signature · 1 line
2.5.0
PATCH v2 10/15 i40e/base: fix debug output
In reply to Helin ZhangIt fixes the debug output messages.
--- drivers/net/i40e/base/i40e_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/i40e/base/i40e_common.c +4 -2
@@ -375,14 +375,16 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,/* the most we could have left is 16 bytes, pad with zeros */ if (i < len) {char d_buf[16 ]; -int j; +int j, i_sav; + i_sav = i;memset (d_buf,0 ,sizeof (d_buf));for (j =0 ; i < len; j++, i++) d_buf[j] = buf[i];i40e_debug (hw, mask,"\t0x%04X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n" , - i, d_buf[0 ], d_buf[1 ], d_buf[2 ], d_buf[3 ], + i_sav, d_buf[0 ], d_buf[1 ], + d_buf[2 ], d_buf[3 ], d_buf[4 ], d_buf[5 ], d_buf[6 ], d_buf[7 ], d_buf[8 ], d_buf[9 ], d_buf[10 ], d_buf[11 ], d_buf[12 ], d_buf[13 ], d_buf[14 ], d_buf[15 ]);
Signature · 1 line
2.5.0
PATCH v2 11/15 i40e/base: add more device capabilities
In reply to Helin ZhangIt adds more device capabilities for NVM management.
- if update is available
- if security check is needed
--- drivers/net/i40e/base/i40e_adminq_cmd.h | 1 + drivers/net/i40e/base/i40e_common.c | 6 ++++++ drivers/net/i40e/base/i40e_type.h | 5 +++++ 3 files changed, 12 insertions(+)
drivers/net/i40e/base/i40e_adminq_cmd.h +1 -0
@@ -446,6 +446,7 @@ struct i40e_aqc_list_capabilities_element_resp {#define I40E_AQ_CAP_ID_SDP 0x0062#define I40E_AQ_CAP_ID_MDIO 0x0063#define I40E_AQ_CAP_ID_WSR_PROT 0x0064 +#define I40E_AQ_CAP_ID_NVM_MGMT 0x0080#define I40E_AQ_CAP_ID_FLEX10 0x00F1#define I40E_AQ_CAP_ID_CEM 0x00F2
drivers/net/i40e/base/i40e_common.c +6 -0
@@ -3762,6 +3762,12 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,"HW Capability: wr_csr_prot = 0x%llX\n\n" , (p->wr_csr_prot & 0xffff));break ; +case I40E_AQ_CAP_ID_NVM_MGMT : +if (number &I40E_NVM_MGMT_SEC_REV_DISABLED ) + p->sec_rev_disabled = true; +if (number &I40E_NVM_MGMT_UPDATE_DISABLED ) + p->update_disabled = true; +break ;#ifdef X722_SUPPORT case I40E_AQ_CAP_ID_WOL_AND_PROXY : hw->num_wol_proxy_filters = (u16 )number;
drivers/net/i40e/base/i40e_type.h +5 -0
@@ -376,6 +376,11 @@ struct i40e_hw_capabilities {#define I40E_FLEX10_STATUS_DCC_ERROR 0x1#define I40E_FLEX10_STATUS_VC_MODE 0x2 +bool sec_rev_disabled; +bool update_disabled; +#define I40E_NVM_MGMT_SEC_REV_DISABLED 0x1 +#define I40E_NVM_MGMT_UPDATE_DISABLED 0x2 +bool mgmt_cem;bool ieee_1588;bool iwarp;
Signature · 1 line
2.5.0
PATCH v2 12/15 i40e/base: increase supported AQ API version
In reply to Helin ZhangIt increases the supported AQ API version to 1.5
for X722.
--- drivers/net/i40e/base/i40e_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/i40e/base/i40e_type.h +1 -1
@@ -188,7 +188,7 @@ enum i40e_memcpy_type { };#ifdef X722_SUPPORT -#define I40E_FW_API_VERSION_MINOR_X722 0x0004 +#define I40E_FW_API_VERSION_MINOR_X722 0x0005#endif #define I40E_FW_API_VERSION_MINOR_X710 0x0005
Signature · 1 line
2.5.0
PATCH v2 13/15 i40e/base: add input set mask definitions
In reply to Helin ZhangIt adds input set mask definitions for RSS, flow director and flex bytes.
--- drivers/net/i40e/base/i40e_type.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
drivers/net/i40e/base/i40e_type.h +33 -0
@@ -1638,4 +1638,37 @@ struct i40e_lldp_variables {/* RSS Hash Table Size */ #define I40E_PFQF_CTL_0_HASHLUTSIZE_512 0x00010000 + +/* INPUT SET MASK for RSS, flow director, and flexible payload */ +#define I40E_L3_SRC_SHIFT 47 +#define I40E_L3_SRC_MASK (0x3ULL << I40E_L3_SRC_SHIFT) +#define I40E_L3_V6_SRC_SHIFT 43 +#define I40E_L3_V6_SRC_MASK (0xFFULL << I40E_L3_V6_SRC_SHIFT) +#define I40E_L3_DST_SHIFT 35 +#define I40E_L3_DST_MASK (0x3ULL << I40E_L3_DST_SHIFT) +#define I40E_L3_V6_DST_SHIFT 35 +#define I40E_L3_V6_DST_MASK (0xFFULL << I40E_L3_V6_DST_SHIFT) +#define I40E_L4_SRC_SHIFT 34 +#define I40E_L4_SRC_MASK (0x1ULL << I40E_L4_SRC_SHIFT) +#define I40E_L4_DST_SHIFT 33 +#define I40E_L4_DST_MASK (0x1ULL << I40E_L4_DST_SHIFT) +#define I40E_VERIFY_TAG_SHIFT 31 +#define I40E_VERIFY_TAG_MASK (0x3ULL << I40E_VERIFY_TAG_SHIFT) + +#define I40E_FLEX_50_SHIFT 13 +#define I40E_FLEX_50_MASK (0x1ULL << I40E_FLEX_50_SHIFT) +#define I40E_FLEX_51_SHIFT 12 +#define I40E_FLEX_51_MASK (0x1ULL << I40E_FLEX_51_SHIFT) +#define I40E_FLEX_52_SHIFT 11 +#define I40E_FLEX_52_MASK (0x1ULL << I40E_FLEX_52_SHIFT) +#define I40E_FLEX_53_SHIFT 10 +#define I40E_FLEX_53_MASK (0x1ULL << I40E_FLEX_53_SHIFT) +#define I40E_FLEX_54_SHIFT 9 +#define I40E_FLEX_54_MASK (0x1ULL << I40E_FLEX_54_SHIFT) +#define I40E_FLEX_55_SHIFT 8 +#define I40E_FLEX_55_MASK (0x1ULL << I40E_FLEX_55_SHIFT) +#define I40E_FLEX_56_SHIFT 7 +#define I40E_FLEX_56_MASK (0x1ULL << I40E_FLEX_56_SHIFT) +#define I40E_FLEX_57_SHIFT 6 +#define I40E_FLEX_57_MASK (0x1ULL << I40E_FLEX_57_SHIFT)#endif /* _I40E_TYPE_H_ */
Signature · 1 line
2.5.0
PATCH v2 14/15 i40e/base: add RSS config to virtual channel
In reply to Helin ZhangIt add opcodes and structures to support RSS configuration by PF driver on behalf of the VF drivers.
--- drivers/net/i40e/base/i40e_virtchnl.h | 45 ++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-)
drivers/net/i40e/base/i40e_virtchnl.h +42 -3
@@ -87,10 +87,15 @@ enum i40e_virtchnl_ops {I40E_VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE =14 ,I40E_VIRTCHNL_OP_GET_STATS =15 ,I40E_VIRTCHNL_OP_FCOE =16 , -I40E_VIRTCHNL_OP_EVENT =17 , +I40E_VIRTCHNL_OP_EVENT =17 ,/* must ALWAYS be 17 */ #ifdef I40E_SOL_VF_SUPPORTI40E_VIRTCHNL_OP_GET_ADDNL_SOL_CONFIG =19 , #endif +I40E_VIRTCHNL_OP_CONFIG_RSS_KEY =23 , +I40E_VIRTCHNL_OP_CONFIG_RSS_LUT =24 , +I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS =25 , + I40E_VIRTCHNL_OP_SET_RSS_HENA = 26, + };/* Virtual channel message descriptor. This overlays the admin queue
@@ -164,6 +169,7 @@ struct i40e_virtchnl_vsi_resource {#define I40E_VIRTCHNL_VF_OFFLOAD_VLAN 0x00010000#define I40E_VIRTCHNL_VF_OFFLOAD_RX_POLLING 0x00020000#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2 0x00040000 +#define I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF 0X00080000struct i40e_virtchnl_vf_resource {u16 num_vsis;
@@ -172,8 +178,8 @@ struct i40e_virtchnl_vf_resource {u16 max_mtu;u32 vf_offload_flags; -u32 max_fcoe_contexts; -u32 max_fcoe_filters; +u32 rss_key_size; +u32 rss_lut_size;struct i40e_virtchnl_vsi_resource vsi_res[1 ]; };
@@ -349,6 +355,39 @@ struct i40e_virtchnl_promisc_info {* PF replies with struct i40e_eth_stats in an external buffer. */ +/* I40E_VIRTCHNL_OP_CONFIG_RSS_KEY +* I40E_VIRTCHNL_OP_CONFIG_RSS_LUT +* VF sends these messages to configure RSS. Only supported if both PF +* and VF drivers set the I40E_VIRTCHNL_VF_OFFLOAD_RSS_PF bit during +* configuration negotiation. If this is the case, then the rss fields in +* the vf resource struct are valid. +* Both the key and LUT are initialized to 0 by the PF, meaning that +* RSS is effectively disabled until set up by the VF. +*/ +struct i40e_virtchnl_rss_key { +u16 vsi_id; +u16 key_len; +u8 key[1 ];/* RSS hash key, packed bytes */ +}; + +struct i40e_virtchnl_rss_lut { +u16 vsi_id; +u16 lut_entries; +u8 lut[1 ];/* RSS lookup table*/ +}; + +/* I40E_VIRTCHNL_OP_GET_RSS_HENA_CAPS +* I40E_VIRTCHNL_OP_SET_RSS_HENA +* VF sends these messages to get and set the hash filter enable bits for RSS. +* By default, the PF sets these to all possible traffic types that the +* hardware supports. The VF can query this value if it wants to change the +* traffic types that are hashed by the hardware. +* Traffic types are defined in the i40e_filter_pctype enum in i40e_type.h +*/ +struct i40e_virtchnl_rss_hena { +u64 hena; +}; +/* I40E_VIRTCHNL_OP_EVENT * PF sends this message to inform the VF driver of events that may affect it. * No direct response is expected from the VF, though it may generate other
Signature · 1 line
2.5.0
PATCH v2 15/15 i40e/base: add capability of disabling all link
In reply to Helin ZhangIt adds a flag, which can be used to tell the firmware to disable the link on all ports.
--- doc/guides/rel_notes/release_16_07.rst | 4 ++++ drivers/net/i40e/Makefile | 2 +- drivers/net/i40e/base/i40e_adminq_cmd.h | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-)
doc/guides/rel_notes/release_16_07.rst +4 -0
@@ -47,6 +47,10 @@ New Features * Dropped specific Xen Dom0 code. * Dropped specific anonymous mempool code in testpmd. +* **Updated the i40e base driver.** + + It updated the i40e base driver, which includes supporting new devices IDs. + Resolved Issues ---------------
drivers/net/i40e/Makefile +1 -1
@@ -85,7 +85,7 @@ VPATH += $(SRCDIR)/base # # all source are stored in SRCS-y -# base driver is based on the package of dpdk-i40e.2016.01.07.14.tar.gz. +# base driver is based on the package of dpdk-i40e.2016.04.18.12.tar.gz. # SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_adminq.c SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_common.c
drivers/net/i40e/base/i40e_adminq_cmd.h +3 -0
@@ -1899,7 +1899,10 @@ struct i40e_aqc_set_phy_debug {#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_NONE 0x00#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_HARD 0x01#define I40E_AQ_PHY_DEBUG_RESET_EXTERNAL_SOFT 0x02 +/* Disable link manageability on a single port */ #define I40E_AQ_PHY_DEBUG_DISABLE_LINK_FW 0x10 +/* Disable link manageability on all ports needs both bits 4 and 5 */ +#define I40E_AQ_PHY_DEBUG_DISABLE_ALL_LINK_FW 0x20u8 reserved[15 ]; };
Signature · 1 line
2.5.0
Re: [PATCH v2 15/15] i40e/base: add capability of disabling all link
Quoted 15 lines · Helin Zhang
It adds a flag, which can be used to tell the firmware to disable the link on all ports.
Signed-off-by Helin Zhang <[email protected]>--- doc/guides/rel_notes/release_16_07.rst | 4 ++++ drivers/net/i40e/Makefile | 2 +- drivers/net/i40e/base/i40e_adminq_cmd.h | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-)doc/guides/rel_notes/release_16_07.rst +0
-0
doc/guides/rel_notes/release_16_07.rst New Features · line 54
Quoted 8 lines
doc/guides/rel_notes/release_16_07.rst +4
-0@@ -47,6 +47,10 @@ New Features * Dropped specific Xen Dom0 code. * Dropped specific anonymous mempool code in testpmd. +* **Updated the i40e base driver.** + + It updated the i40e base driver, which includes supporting new devices IDs. +
While it's good to see the documentation updates included in with code changes, this is not correct for this set. The documentation update does not belong with the change to "firmware to disable the link on all ports". The documentation update is for the patch, not the last patch, so it needs to go as a separate patch.
Therefore this patch needs to be split in two - one patch for the base code change, and a second to update the docs for the base code update as a whole
/Bruce
Hi,
Quoted 4 lines · Wenzhuo
Hi,
Acked-by Wenzhuo Lu <[email protected]>
Patchset applied to dpdk-next-net/rel_16_07 with some commit log changes, and patch 15 split into 2.
/Bruce