* [dpdk-dev] [PATCH 00/14] i40e base code update @ 2021-06-18 6:38 Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 01/14] net/i40e/base: add new versions of send ASQ command functions Robin Zhang ` (18 more replies) 0 siblings, 19 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev; +Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang update i40e base code. source code of i40e driver: cid-i40e.2021.04.29.tar.gz changelog in ND share repo: From 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") To bedcbea1063 ("i40e-shared: Fix potentially uninitialized variables in NVM code") The following commits are ignored: cb9139e3bce8 ("i40e-shared: Fix not blinking X722 with x557 PHY via ‘ethtool -p'") c09d4f9cf390 ("i40e-shared: i40e-shared: Fix build warning -Wformat related to integer size") ff8a1abc6c17 ("i40e-shared: Fix build warning with __packed") 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") Robin Zhang (14): net/i40e/base: add new versions of send ASQ command functions net/i40e/base: update FVL FW API version to 1.14 net/i40e/base: add support for Min Rollback Revision for 4 more FPK modules net/i40e/base: set TSA table values when parsing CEE configuration net/i40e/base: define new Shadow RAM pointers net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters net/i40e/base: fix PF reset failed net/i40e/base: fix update link data for X722 net/i40e/base: fix AOC media type reported by ethtool net/i40e/base: add flags and fields for double vlan processing net/i40e/base: 10GBASE-ER Optical modules recognition net/i40e/base: fix headers to match functions net/i40e/base: fix potentially uninitialized variables in NVM code net/i40e/base: update version in readme drivers/net/i40e/base/README | 2 +- drivers/net/i40e/base/i40e_adminq.c | 79 +++++++++-- drivers/net/i40e/base/i40e_adminq_cmd.h | 48 +++++-- drivers/net/i40e/base/i40e_common.c | 176 +++++++++++++++++++----- drivers/net/i40e/base/i40e_dcb.c | 10 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 7 +- drivers/net/i40e/base/i40e_prototype.h | 17 +++ drivers/net/i40e/base/i40e_type.h | 12 +- 9 files changed, 288 insertions(+), 65 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 01/14] net/i40e/base: add new versions of send ASQ command functions 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 02/14] net/i40e/base: update FVL FW API version to 1.14 Robin Zhang ` (17 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Sylwester Dziedziuch ASQ send command functions are returning only i40e status codes yet some calling functions also need Admin Queue status that is stored in hw->aq.asq_last_status. Since hw object is stored on a heap it introduces a possibility for a race condition in access to hw if calling function is not fast enough to read hw->aq.asq_last_status before next send ASQ command is executed. Added new versions of send ASQ command functions that return Admin Queue status on the stack to avoid race conditions in access to hw->aq.asq_last_status. Added new _v2 version of i40e_aq_remove_macvlan and i40e_aq_add_macvlan that is using new _v2 versions of ASQ send command functions and returns the Admin Queue status on the stack. Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 73 +++++++++++-- drivers/net/i40e/base/i40e_common.c | 139 ++++++++++++++++++++++--- drivers/net/i40e/base/i40e_prototype.h | 17 +++ 3 files changed, 205 insertions(+), 24 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 0da45f03e4..eafacbdbec 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -834,7 +834,7 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) } /** - * i40e_asq_send_command - send command to Admin Queue + * i40e_asq_send_command_exec - send command to Admin Queue * @hw: pointer to the hw struct * @desc: prefilled descriptor describing the command (non DMA mem) * @buff: buffer to use for indirect commands @@ -844,11 +844,12 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) * This is the main send command driver routine for the Admin Queue send * queue. It runs the queue, cleans the queue, etc **/ -enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, - struct i40e_aq_desc *desc, - void *buff, /* can be NULL */ - u16 buff_size, - struct i40e_asq_cmd_details *cmd_details) +STATIC enum i40e_status_code +i40e_asq_send_command_exec(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) { enum i40e_status_code status = I40E_SUCCESS; struct i40e_dma_mem *dma_buff = NULL; @@ -858,8 +859,6 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, u16 retval = 0; u32 val = 0; - i40e_acquire_spinlock(&hw->aq.asq_spinlock); - hw->aq.asq_last_status = I40E_AQ_RC_OK; if (hw->aq.asq.count == 0) { @@ -1042,6 +1041,64 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, } asq_send_command_error: + return status; +} + +/** + * i40e_asq_send_command - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * + * Acquires the lock and calls the main send command execution + * routine. + **/ +enum i40e_status_code +i40e_asq_send_command(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + i40e_release_spinlock(&hw->aq.asq_spinlock); + return status; +} + +/** + * i40e_asq_send_command_v2 - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * @aq_status: pointer to Admin Queue status return value + * + * Acquires the lock and calls the main send command execution + * routine. Returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + **/ +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + if (aq_status) + *aq_status = hw->aq.asq_last_status; i40e_release_spinlock(&hw->aq.asq_spinlock); return status; } diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index e20bb9ac35..32642f3e2b 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -3114,6 +3114,46 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, return status; } +/** + * i40e_prepare_add_macvlan + * @mv_list: list of macvlans to be added + * @desc: pointer to AQ descriptor structure + * @count: length of the list + * @seid: VSI for the mac address + * + * Internal helper function that prepares the add macvlan request + * and returns the buffer size. + **/ +static u16 +i40e_prepare_add_macvlan(struct i40e_aqc_add_macvlan_element_data *mv_list, + struct i40e_aq_desc *desc, u16 count, u16 seid) +{ + struct i40e_aqc_macvlan *cmd = + (struct i40e_aqc_macvlan *)&desc->params.raw; + u16 buf_size; + int i; + + buf_size = count * sizeof(*mv_list); + + /* prep the rest of the request */ + i40e_fill_default_direct_cmd_desc(desc, i40e_aqc_opc_add_macvlan); + cmd->num_addresses = CPU_TO_LE16(count); + cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); + cmd->seid[1] = 0; + cmd->seid[2] = 0; + + for (i = 0; i < count; i++) + if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) + mv_list[i].flags |= + CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); + + desc->flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); + if (buf_size > I40E_AQ_LARGE_BUF) + desc->flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); + + return buf_size; +} + /** * i40e_aq_add_macvlan * @hw: pointer to the hw struct @@ -3124,8 +3164,74 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, * * Add MAC/VLAN addresses to the HW filtering **/ -enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_add_macvlan_element_data *mv_list, +enum i40e_status_code +i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, + cmd_details); + + return status; +} + +/** + * i40e_aq_add_macvlan_v2 + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be added + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value + * + * Add MAC/VLAN addresses to the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. + **/ +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); + + return status; +} + +/** + * i40e_aq_remove_macvlan + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be removed + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * + * Remove MAC/VLAN addresses from the HW filtering + **/ +enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details) { struct i40e_aq_desc desc; @@ -3133,7 +3239,6 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, (struct i40e_aqc_macvlan *)&desc.params.raw; enum i40e_status_code status; u16 buf_size; - int i; if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; @@ -3141,17 +3246,12 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_macvlan); + i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan); cmd->num_addresses = CPU_TO_LE16(count); cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); cmd->seid[1] = 0; cmd->seid[2] = 0; - for (i = 0; i < count; i++) - if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) - mv_list[i].flags |= - CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); - desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); @@ -3163,18 +3263,25 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, } /** - * i40e_aq_remove_macvlan + * i40e_aq_remove_macvlan_v2 * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be removed * @count: length of the list * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value * - * Remove MAC/VLAN addresses from the HW filtering + * Remove MAC/VLAN addresses from the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. **/ -enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_remove_macvlan_element_data *mv_list, - u16 count, struct i40e_asq_cmd_details *cmd_details) +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) { struct i40e_aq_desc desc; struct i40e_aqc_macvlan *cmd = @@ -3198,8 +3305,8 @@ enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, - cmd_details); + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); return status; } diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h index 124222e476..29c86c7fe8 100644 --- a/drivers/net/i40e/base/i40e_prototype.h +++ b/drivers/net/i40e/base/i40e_prototype.h @@ -38,6 +38,13 @@ 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); +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); #ifdef VF_DRIVER bool i40e_asq_done(struct i40e_hw *hw); #endif @@ -188,9 +195,19 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_add_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_add_mirrorrule(struct i40e_hw *hw, u16 sw_seid, u16 rule_type, u16 dest_vsi, u16 count, __le16 *mr_list, struct i40e_asq_cmd_details *cmd_details, -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 02/14] net/i40e/base: update FVL FW API version to 1.14 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 01/14] net/i40e/base: add new versions of send ASQ command functions Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 03/14] net/i40e/base: add support for Min Rollback Revision for 4 more FPK modules Robin Zhang ` (16 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Sylwester Dziedziuch Update FVL FW increment API version to 1.14 Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 2ca41db5d3..b5ac74787b 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -13,7 +13,7 @@ #define I40E_FW_API_VERSION_MAJOR 0x0001 #define I40E_FW_API_VERSION_MINOR_X722 0x000B -#define I40E_FW_API_VERSION_MINOR_X710 0x000C +#define I40E_FW_API_VERSION_MINOR_X710 0x000E #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ I40E_FW_API_VERSION_MINOR_X710 : \ -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 03/14] net/i40e/base: add support for Min Rollback Revision for 4 more FPK modules 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 01/14] net/i40e/base: add new versions of send ASQ command functions Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 02/14] net/i40e/base: update FVL FW API version to 1.14 Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 04/14] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang ` (15 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak This change increments FPK API version and adds new constants related to the extended implementation of Security Version Opt-In. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index b5ac74787b..a73a08aae6 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -12,7 +12,7 @@ */ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR_X722 0x000B +#define I40E_FW_API_VERSION_MINOR_X722 0x000C #define I40E_FW_API_VERSION_MINOR_X710 0x000E #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ @@ -2425,11 +2425,15 @@ struct i40e_aqc_rollback_revision_update { u8 optin_mode; /* bool */ #define I40E_AQ_RREV_OPTION_MODE 0x01 u8 module_selected; -#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 -#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 -#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 -#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 -#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 +#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 +#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 +#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 +#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PHY_PLL_O_CONFIGURATION 5 +#define I40E_AQ_RREV_MODULE_PHY_0_CONFIGURATION 6 +#define I40E_AQ_RREV_MODULE_PHY_PLL_1_CONFIGURATION 7 +#define I40E_AQ_RREV_MODULE_PHY_1_CONFIGURATION 8 u8 reserved1[2]; u32 min_rrev; u8 reserved2[8]; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 04/14] net/i40e/base: set TSA table values when parsing CEE configuration 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (2 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 03/14] net/i40e/base: add support for Min Rollback Revision for 4 more FPK modules Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 05/14] net/i40e/base: define new Shadow RAM pointers Robin Zhang ` (14 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev; +Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Pawel Malinowski Driver did not Set TSA table values when parsing CEE configuration obtained from FW. Signed-off-by: Pawel Malinowski <pawel.malinowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_dcb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 388af3d64d..27b52bc365 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -315,9 +315,15 @@ static void i40e_parse_cee_pgcfg_tlv(struct i40e_cee_feat_tlv *tlv, * |pg0|pg1|pg2|pg3|pg4|pg5|pg6|pg7| * --------------------------------- */ - for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) + for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) { etscfg->tcbwtable[i] = buf[offset++]; + if (etscfg->prioritytable[i] == I40E_CEE_PGID_STRICT) + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_STRICT; + else + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_ETS; + } + /* Number of TCs supported (1 octet) */ etscfg->maxtcs = buf[offset]; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 05/14] net/i40e/base: define new Shadow RAM pointers 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (3 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 04/14] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang ` (13 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak Add definitions for Shadow RAM pointers: 6th FPA module, 5th FPA module in FortPark and Preservation Rules Module. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index cf41345834..007484f227 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -1555,6 +1555,9 @@ struct i40e_hw_port_stats { #define I40E_SR_FEATURE_CONFIGURATION_PTR 0x49 #define I40E_SR_CONFIGURATION_METADATA_PTR 0x4D #define I40E_SR_IMMEDIATE_VALUES_PTR 0x4E +#define I40E_SR_PRESERVATION_RULES_PTR 0x70 +#define I40E_FPK_SR_5TH_FREE_PROVISION_AREA_PTR 0x71 +#define I40E_SR_6TH_FREE_PROVISION_AREA_PTR 0x71 /* Auxiliary field, mask and shift definition for Shadow RAM and NVM Flash */ #define I40E_SR_VPD_MODULE_MAX_SIZE 1024 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (4 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 05/14] net/i40e/base: define new Shadow RAM pointers Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 07/14] net/i40e/base: fix PF reset failed Robin Zhang ` (12 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski Unlike other supported adapters, 2.5G and 5G use different PHY type identifiers for reading/writing PHY settings and for reading link status. This commit intruduces separate PHY identifiers for these two operation types. Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++-- drivers/net/i40e/base/i40e_common.c | 4 ++-- drivers/net/i40e/base/i40e_type.h | 8 ++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index a73a08aae6..1aafe1de38 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_25GBASE_LR = 0x22, I40E_PHY_TYPE_25GBASE_AOC = 0x23, I40E_PHY_TYPE_25GBASE_ACC = 0x24, - I40E_PHY_TYPE_2_5GBASE_T = 0x30, - I40E_PHY_TYPE_5GBASE_T = 0x31, + I40E_PHY_TYPE_2_5GBASE_T = 0x26, + I40E_PHY_TYPE_5GBASE_T = 0x27, + I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS = 0x30, + I40E_PHY_TYPE_5GBASE_T_LINK_STATUS = 0x31, I40E_PHY_TYPE_MAX, I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD, I40E_PHY_TYPE_EMPTY = 0xFE, diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 32642f3e2b..ceedec68bf 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) break; case I40E_PHY_TYPE_100BASE_TX: case I40E_PHY_TYPE_1000BASE_T: - case I40E_PHY_TYPE_2_5GBASE_T: - case I40E_PHY_TYPE_5GBASE_T: + case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS: + case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS: case I40E_PHY_TYPE_10GBASE_T: media = I40E_MEDIA_TYPE_BASET; break; diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 007484f227..a9e019d101 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -329,12 +329,8 @@ struct i40e_phy_info { I40E_PHY_TYPE_OFFSET) #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \ I40E_PHY_TYPE_OFFSET) -/* Offset for 2.5G/5G PHY Types value to bit number conversion */ -#define I40E_PHY_TYPE_OFFSET2 (-10) -#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) -#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) +#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T) +#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T) #define I40E_HW_CAP_MAX_GPIO 30 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 07/14] net/i40e/base: fix PF reset failed 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (5 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 08/14] net/i40e/base: fix update link data for X722 Robin Zhang ` (11 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Sylwester Dziedziuch PF has to delete all the filters during reset. If it is fully loaded with filters then it is possible that it will take more than 200 ms to finish the reset resulting in timeout during pf_reset and PF reset failed, -15 error indication. Increasing the timeout value for PF reset from 200 to 1000 to give PF more time to finish reset if it is loaded with filters. Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit") Cc: stable@dpdk.org Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ceedec68bf..aa424e6010 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw, return I40E_ERR_RESET_FAILED; } -#define I40E_PF_RESET_WAIT_COUNT 200 +#define I40E_PF_RESET_WAIT_COUNT 1000 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 08/14] net/i40e/base: fix update link data for X722 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (6 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 07/14] net/i40e/base: fix PF reset failed Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang ` (10 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Jaroslaw Gawin The X722 card has 'Link Type' information elsewhere than the X710. Previously, for all cards, the 'Link Type' information was retrieved by opcode 0x0607 and this value was wrong for all X722 cards. Now this information for X722 only is taken by opcode 0x0600 (function: i40e_aq_get_phy_capabilities) instead of an opcode 0x0607 (function: i40e_aq_get_link_info). All other parameters read by opcode 0x0607 unchanged. Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction") Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time") Cc: stable@dpdk.org Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index aa424e6010..ef061a6b63 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw, hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; + /* 'Get Link Status' response data structure from X722 FW has + * different format and does not contain this information + */ if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE && hw->mac.type != I40E_MAC_X722) { __le32 tmp; @@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) return status; /* extra checking needed to ensure link info to user is timely */ - if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && - ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || - !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) { - status = i40e_aq_get_phy_capabilities(hw, false, false, + if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && + ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || + !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) || + hw->mac.type == I40E_MAC_X722) { + status = i40e_aq_get_phy_capabilities(hw, false, + hw->mac.type == + I40E_MAC_X722, &abilities, NULL); if (status) return status; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 09/14] net/i40e/base: fix AOC media type reported by ethtool 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (7 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 08/14] net/i40e/base: fix update link data for X722 Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 10/14] net/i40e/base: add flags and fields for double vlan processing Robin Zhang ` (9 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski For Active Optical Cable (AOC) the correct media type is "Fibre", not "Direct Attach Copper". Fixes: d749d4d89969 ("i40e/base: add AOC PHY types") Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and ACC") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ef061a6b63..2ca6a13e79 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_40GBASE_LR4: case I40E_PHY_TYPE_25GBASE_LR: case I40E_PHY_TYPE_25GBASE_SR: + case I40E_PHY_TYPE_10GBASE_AOC: + case I40E_PHY_TYPE_25GBASE_AOC: + case I40E_PHY_TYPE_40GBASE_AOC: media = I40E_MEDIA_TYPE_FIBER; break; case I40E_PHY_TYPE_100BASE_TX: @@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_10GBASE_CR1: case I40E_PHY_TYPE_40GBASE_CR4: case I40E_PHY_TYPE_10GBASE_SFPP_CU: - case I40E_PHY_TYPE_40GBASE_AOC: - case I40E_PHY_TYPE_10GBASE_AOC: case I40E_PHY_TYPE_25GBASE_CR: - case I40E_PHY_TYPE_25GBASE_AOC: case I40E_PHY_TYPE_25GBASE_ACC: media = I40E_MEDIA_TYPE_DA; break; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 10/14] net/i40e/base: add flags and fields for double vlan processing 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (8 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 11/14] net/i40e/base: 10GBASE-ER Optical modules recognition Robin Zhang ` (8 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Przemyslaw Patynowski Add flags for outer vlan and include set port parameters in Linux compilation. Add flags, which describe port and switch state for both double vlan functionality and outer vlan processing. Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 1aafe1de38..646cfd0398 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -768,6 +768,7 @@ struct i40e_aqc_set_switch_config { #define I40E_AQ_SET_SWITCH_CFG_PROMISC 0x0001 #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER 0x0002 #define I40E_AQ_SET_SWITCH_CFG_HW_ATR_EVICT 0x0004 +#define I40E_AQ_SET_SWITCH_CFG_OUTER_VLAN 0x0008 __le16 valid_flags; /* The ethertype in switch_tag is dropped on ingress and used * internally by the switch. Set this to zero for the default @@ -904,7 +905,7 @@ struct i40e_aqc_vsi_properties_data { u8 sec_reserved; /* VLAN section */ __le16 pvid; /* VLANS include priority bits */ - __le16 fcoe_pvid; + __le16 outer_vlan; u8 port_vlan_flags; #define I40E_AQ_VSI_PVLAN_MODE_SHIFT 0x00 #define I40E_AQ_VSI_PVLAN_MODE_MASK (0x03 << \ @@ -920,7 +921,24 @@ struct i40e_aqc_vsi_properties_data { #define I40E_AQ_VSI_PVLAN_EMOD_STR_UP 0x08 #define I40E_AQ_VSI_PVLAN_EMOD_STR 0x10 #define I40E_AQ_VSI_PVLAN_EMOD_NOTHING 0x18 - u8 pvlan_reserved[3]; + u8 outer_vlan_flags; +#define I40E_AQ_VSI_OVLAN_MODE_SHIFT 0x00 +#define I40E_AQ_VSI_OVLAN_MODE_MASK (0x03 << \ + I40E_AQ_VSI_OVLAN_MODE_SHIFT) +#define I40E_AQ_VSI_OVLAN_MODE_UNTAGGED 0x01 +#define I40E_AQ_VSI_OVLAN_MODE_TAGGED 0x02 +#define I40E_AQ_VSI_OVLAN_MODE_ALL 0x03 +#define I40E_AQ_VSI_OVLAN_INSERT_PVID 0x04 +#define I40E_AQ_VSI_OVLAN_EMOD_SHIFT 0x03 +#define I40E_AQ_VSI_OVLAN_EMOD_MASK (0x03 <<\ + I40E_AQ_VSI_OVLAN_EMOD_SHIFT) +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_ALL 0x00 +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_UP 0x01 +#define I40E_AQ_VSI_OVLAN_EMOD_HIDE_ALL 0x02 +#define I40E_AQ_VSI_OVLAN_EMOD_NOTHING 0x03 +#define I40E_AQ_VSI_OVLAN_CTRL_ENA 0x04 + + u8 pvlan_reserved[2]; /* ingress egress up sections */ __le32 ingress_table; /* bitmap, 3 bits per up */ #define I40E_AQ_VSI_UP_TABLE_UP0_SHIFT 0 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 11/14] net/i40e/base: 10GBASE-ER Optical modules recognition 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (9 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 10/14] net/i40e/base: add flags and fields for double vlan processing Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 12/14] net/i40e/base: fix headers to match functions Robin Zhang ` (7 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak This change adds a new PHY type for 10GBASE-ER modules. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++ drivers/net/i40e/base/i40e_common.c | 1 + drivers/net/i40e/base/i40e_type.h | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 646cfd0398..c41dc71cdf 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -1945,6 +1945,7 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_40GBASE_AOC = 0xD, I40E_PHY_TYPE_UNRECOGNIZED = 0xE, I40E_PHY_TYPE_UNSUPPORTED = 0xF, + I40E_PHY_TYPE_10GBASE_ER = 0x10, I40E_PHY_TYPE_100BASE_TX = 0x11, I40E_PHY_TYPE_1000BASE_T = 0x12, I40E_PHY_TYPE_10GBASE_T = 0x13, @@ -1991,6 +1992,7 @@ enum i40e_aq_phy_type { BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC) | \ BIT_ULL(I40E_PHY_TYPE_UNRECOGNIZED) | \ BIT_ULL(I40E_PHY_TYPE_UNSUPPORTED) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_ER) | \ BIT_ULL(I40E_PHY_TYPE_100BASE_TX) | \ BIT_ULL(I40E_PHY_TYPE_1000BASE_T) | \ BIT_ULL(I40E_PHY_TYPE_10GBASE_T) | \ diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 2ca6a13e79..e077bf8fd3 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1268,6 +1268,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) enum i40e_media_type media; switch (hw->phy.link_info.phy_type) { + case I40E_PHY_TYPE_10GBASE_ER: case I40E_PHY_TYPE_10GBASE_SR: case I40E_PHY_TYPE_10GBASE_LR: case I40E_PHY_TYPE_1000BASE_SX: diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index a9e019d101..a309636b9f 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -294,6 +294,7 @@ struct i40e_phy_info { #define I40E_CAP_PHY_TYPE_10GBASE_CR1_CU BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1_CU) #define I40E_CAP_PHY_TYPE_10GBASE_AOC BIT_ULL(I40E_PHY_TYPE_10GBASE_AOC) #define I40E_CAP_PHY_TYPE_40GBASE_AOC BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC) +#define I40E_CAP_PHY_TYPE_10GBASE_ER BIT_ULL(I40E_PHY_TYPE_10GBASE_ER) #define I40E_CAP_PHY_TYPE_100BASE_TX BIT_ULL(I40E_PHY_TYPE_100BASE_TX) #define I40E_CAP_PHY_TYPE_1000BASE_T BIT_ULL(I40E_PHY_TYPE_1000BASE_T) #define I40E_CAP_PHY_TYPE_10GBASE_T BIT_ULL(I40E_PHY_TYPE_10GBASE_T) -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 12/14] net/i40e/base: fix headers to match functions 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (10 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 11/14] net/i40e/base: 10GBASE-ER Optical modules recognition Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang ` (6 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Jesse Brandeburg Fix several kernel-doc warnings when building with W=1. These changes are only to comments. Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 842ea1996335 ("i40e/base: save link module type") Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY") Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722") Cc: stable@dpdk.org Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 10 +++++----- drivers/net/i40e/base/i40e_dcb.c | 2 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index e077bf8fd3..3f3896aea4 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2678,7 +2678,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw, } /** - * i40e_get_vsi_params - get VSI configuration info + * i40e_aq_get_vsi_params - get VSI configuration info * @hw: pointer to the hw struct * @vsi_ctx: pointer to a vsi context struct * @cmd_details: pointer to command details structure or NULL @@ -2939,7 +2939,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up) } /** - * i40e_updatelink_status - update status of the HW network link + * i40e_update_link_info - update status of the HW network link * @hw: pointer to the hw struct **/ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) @@ -4831,7 +4831,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index, } /** - * i40e_aq_get_switch_resource_alloc (0x0204) + * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations * @hw: pointer to the hw struct * @num_entries: pointer to u8 to store the number of resource entries returned * @buf: pointer to a user supplied buffer. This buffer must be large enough @@ -6978,7 +6978,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num) } /** - * i40e_blink_phy_led + * i40e_blink_phy_link_led * @hw: pointer to the HW structure * @time: time how long led will blinks in secs * @interval: gap between LED on and off in msecs @@ -7825,7 +7825,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw, } /** - * i40e_aq_opc_set_ns_proxy_table_entry + * i40e_aq_set_ns_proxy_table_entry * @hw: pointer to the HW structure * @ns_proxy_table_entry: pointer to NS table entry command struct * @cmd_details: pointer to command details diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 27b52bc365..8f9b7e823f 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv, } /** - * i40e_parse_ieee_etsrec_tlv + * i40e_parse_ieee_tlv * @tlv: IEEE 802.1Qaz TLV * @dcbcfg: Local store to update ETS REC data * diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c index d3969396f0..d3bd683ff3 100644 --- a/drivers/net/i40e/base/i40e_lan_hmc.c +++ b/drivers/net/i40e/base/i40e_lan_hmc.c @@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw, } /** - * i40e_delete_hmc_object - remove hmc objects + * i40e_delete_lan_hmc_object - remove hmc objects * @hw: pointer to the HW structure * @info: pointer to i40e_hmc_delete_obj_info struct * diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 561ed21136..67e58cc195 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -7,7 +7,7 @@ #include "i40e_prototype.h" /** - * i40e_init_nvm_ops - Initialize NVM function pointers + * i40e_init_nvm - Initialize NVM function pointers * @hw: pointer to the HW structure * * Setup the function pointers and the NVM info structure. Should be called -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (11 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 12/14] net/i40e/base: fix headers to match functions Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-21 6:52 ` Xing, Beilei 2021-06-18 6:38 ` [dpdk-dev] [PATCH 14/14] net/i40e/base: update version in readme Robin Zhang ` (5 subsequent siblings) 18 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Christopher Pau The status of i40e_read_nvm_word is not checked, so variables set from this function could be used uninitialized. In this case, preserve the existing flow that does not block initialization by initializing these values from the start. The variable checksum from i40e_calc_nvm_checksum is used before return value is checked. Fix this logic. Fixes: 8d6c51fcd24b ("i40e/base: get OEM version") Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only") Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM") Cc: stable@dpdk.org Signed-off-by: Christopher Pau <christopher.pau@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 6 ++++-- drivers/net/i40e/base/i40e_nvm.c | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index eafacbdbec..d27ccde29a 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -648,8 +648,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) { struct i40e_adminq_info *aq = &hw->aq; enum i40e_status_code ret_code; - u16 cfg_ptr, oem_hi, oem_lo; - u16 eetrack_lo, eetrack_hi; + u16 oem_hi = 0, oem_lo = 0; + u16 eetrack_hi = 0; + u16 eetrack_lo = 0; + u16 cfg_ptr = 0; int retry = 0; /* verify input for valid configuration */ diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 67e58cc195..f385042601 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw) DEBUGFUNC("i40e_update_nvm_checksum"); ret_code = i40e_calc_nvm_checksum(hw, &checksum); - le_sum = CPU_TO_LE16(checksum); - if (ret_code == I40E_SUCCESS) + if (ret_code == I40E_SUCCESS) { + le_sum = CPU_TO_LE16(checksum); ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD, 1, &le_sum, true); + } return ret_code; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code 2021-06-18 6:38 ` [dpdk-dev] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang @ 2021-06-21 6:52 ` Xing, Beilei 0 siblings, 0 replies; 122+ messages in thread From: Xing, Beilei @ 2021-06-21 6:52 UTC (permalink / raw) To: Zhang, RobinX, dev; +Cc: Guo, Junfeng, Yang, SteveX, stable, Pau, Christopher > -----Original Message----- > From: Zhang, RobinX <robinx.zhang@intel.com> > Sent: Friday, June 18, 2021 2:39 PM > To: dev@dpdk.org > Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Junfeng > <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Zhang, > RobinX <robinx.zhang@intel.com>; stable@dpdk.org; Pau, Christopher > <christopher.pau@intel.com> > Subject: [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in > NVM code Seems there're 2 fixes in the patch, please split them. > > The status of i40e_read_nvm_word is not checked, so variables set from this > function could be used uninitialized. In this case, preserve the existing flow > that does not block initialization by initializing these values from the start. > > The variable checksum from i40e_calc_nvm_checksum is used before return > value is checked. Fix this logic. > > Fixes: 8d6c51fcd24b ("i40e/base: get OEM version") > Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver > only") > Fixes: 8db9e2a1b232 ("i40e: base driver") > Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM") > Cc: stable@dpdk.org > > Signed-off-by: Christopher Pau <christopher.pau@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> > --- > drivers/net/i40e/base/i40e_adminq.c | 6 ++++-- > drivers/net/i40e/base/i40e_nvm.c | 5 +++-- > 2 files changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/i40e/base/i40e_adminq.c > b/drivers/net/i40e/base/i40e_adminq.c > index eafacbdbec..d27ccde29a 100644 > --- a/drivers/net/i40e/base/i40e_adminq.c > +++ b/drivers/net/i40e/base/i40e_adminq.c > @@ -648,8 +648,10 @@ enum i40e_status_code i40e_init_adminq(struct > i40e_hw *hw) { > struct i40e_adminq_info *aq = &hw->aq; > enum i40e_status_code ret_code; > - u16 cfg_ptr, oem_hi, oem_lo; > - u16 eetrack_lo, eetrack_hi; > + u16 oem_hi = 0, oem_lo = 0; > + u16 eetrack_hi = 0; > + u16 eetrack_lo = 0; > + u16 cfg_ptr = 0; > int retry = 0; > > /* verify input for valid configuration */ diff --git > a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c > index 67e58cc195..f385042601 100644 > --- a/drivers/net/i40e/base/i40e_nvm.c > +++ b/drivers/net/i40e/base/i40e_nvm.c > @@ -755,10 +755,11 @@ enum i40e_status_code > i40e_update_nvm_checksum(struct i40e_hw *hw) > DEBUGFUNC("i40e_update_nvm_checksum"); > > ret_code = i40e_calc_nvm_checksum(hw, &checksum); > - le_sum = CPU_TO_LE16(checksum); > - if (ret_code == I40E_SUCCESS) > + if (ret_code == I40E_SUCCESS) { > + le_sum = CPU_TO_LE16(checksum); > ret_code = i40e_write_nvm_aq(hw, 0x00, > I40E_SR_SW_CHECKSUM_WORD, > 1, &le_sum, true); > + } > > return ret_code; > } > -- > 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH 14/14] net/i40e/base: update version in readme 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (12 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang @ 2021-06-18 6:38 ` Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (4 subsequent siblings) 18 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-18 6:38 UTC (permalink / raw) To: dev; +Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang Update base code version in README. Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README index 6af2993116..c84764005b 100644 --- a/drivers/net/i40e/base/README +++ b/drivers/net/i40e/base/README @@ -6,7 +6,7 @@ Intel® I40E driver ================== This directory contains source code of FreeBSD i40e driver of version -cid-i40e.2020.08.27.tar.gz released by the team which develops +cid-i40e.2021.04.29.tar.gz released by the team which develops basic drivers for any i40e NIC. The directory of base/ contains the original source package. This driver is valid for the product(s) listed below -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 00/14] i40e base code update 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (13 preceding siblings ...) 2021-06-18 6:38 ` [dpdk-dev] [PATCH 14/14] net/i40e/base: update version in readme Robin Zhang @ 2021-06-21 6:36 ` Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 01/14] net/i40e/base: add new versions of send ASQ command functions Robin Zhang ` (13 more replies) 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (3 subsequent siblings) 18 siblings, 14 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:36 UTC (permalink / raw) To: dev; +Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang update i40e base code. source code of i40e driver: cid-i40e.2021.04.29.tar.gz changelog in share repo: From 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") To bedcbea1063 ("i40e-shared: Fix potentially uninitialized variables in NVM code") The following commits are ignored: cb9139e3bce8 ("i40e-shared: Fix not blinking X722 with x557 PHY via ‘ethtool -p'") c09d4f9cf390 ("i40e-shared: i40e-shared: Fix build warning -Wformat related to integer size") ff8a1abc6c17 ("i40e-shared: Fix build warning with __packed") 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") v2: - refine commit messages and macro name Robin Zhang (14): net/i40e/base: add new versions of send ASQ command functions net/i40e/base: update FW API version to 1.14 net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules net/i40e/base: set TSA table values when parsing CEE configuration net/i40e/base: define new Shadow RAM pointers net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters net/i40e/base: fix PF reset failed net/i40e/base: fix update link data for X722 net/i40e/base: fix AOC media type reported by ethtool net/i40e/base: add flags and fields for double vlan processing net/i40e/base: 10GBASE-ER Optical modules recognition net/i40e/base: fix headers to match functions net/i40e/base: fix potentially uninitialized variables in NVM code net/i40e/base: update version in readme drivers/net/i40e/base/README | 2 +- drivers/net/i40e/base/i40e_adminq.c | 79 +++++++++-- drivers/net/i40e/base/i40e_adminq_cmd.h | 48 +++++-- drivers/net/i40e/base/i40e_common.c | 176 +++++++++++++++++++----- drivers/net/i40e/base/i40e_dcb.c | 10 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 7 +- drivers/net/i40e/base/i40e_prototype.h | 17 +++ drivers/net/i40e/base/i40e_type.h | 12 +- 9 files changed, 288 insertions(+), 65 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 01/14] net/i40e/base: add new versions of send ASQ command functions 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang @ 2021-06-21 6:36 ` Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 02/14] net/i40e/base: update FW API version to 1.14 Robin Zhang ` (12 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:36 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Sylwester Dziedziuch ASQ send command functions are returning only i40e status codes yet some calling functions also need Admin Queue status that is stored in hw->aq.asq_last_status. Since hw object is stored on a heap it introduces a possibility for a race condition in access to hw if calling function is not fast enough to read hw->aq.asq_last_status before next send ASQ command is executed. Added new versions of send ASQ command functions that return Admin Queue status on the stack to avoid race conditions in access to hw->aq.asq_last_status. Added new _v2 version of i40e_aq_remove_macvlan and i40e_aq_add_macvlan that is using new _v2 versions of ASQ send command functions and returns the Admin Queue status on the stack. Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 73 +++++++++++-- drivers/net/i40e/base/i40e_common.c | 139 ++++++++++++++++++++++--- drivers/net/i40e/base/i40e_prototype.h | 17 +++ 3 files changed, 205 insertions(+), 24 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 0da45f03e4..eafacbdbec 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -834,7 +834,7 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) } /** - * i40e_asq_send_command - send command to Admin Queue + * i40e_asq_send_command_exec - send command to Admin Queue * @hw: pointer to the hw struct * @desc: prefilled descriptor describing the command (non DMA mem) * @buff: buffer to use for indirect commands @@ -844,11 +844,12 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) * This is the main send command driver routine for the Admin Queue send * queue. It runs the queue, cleans the queue, etc **/ -enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, - struct i40e_aq_desc *desc, - void *buff, /* can be NULL */ - u16 buff_size, - struct i40e_asq_cmd_details *cmd_details) +STATIC enum i40e_status_code +i40e_asq_send_command_exec(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) { enum i40e_status_code status = I40E_SUCCESS; struct i40e_dma_mem *dma_buff = NULL; @@ -858,8 +859,6 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, u16 retval = 0; u32 val = 0; - i40e_acquire_spinlock(&hw->aq.asq_spinlock); - hw->aq.asq_last_status = I40E_AQ_RC_OK; if (hw->aq.asq.count == 0) { @@ -1042,6 +1041,64 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, } asq_send_command_error: + return status; +} + +/** + * i40e_asq_send_command - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * + * Acquires the lock and calls the main send command execution + * routine. + **/ +enum i40e_status_code +i40e_asq_send_command(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + i40e_release_spinlock(&hw->aq.asq_spinlock); + return status; +} + +/** + * i40e_asq_send_command_v2 - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * @aq_status: pointer to Admin Queue status return value + * + * Acquires the lock and calls the main send command execution + * routine. Returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + **/ +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + if (aq_status) + *aq_status = hw->aq.asq_last_status; i40e_release_spinlock(&hw->aq.asq_spinlock); return status; } diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index e20bb9ac35..32642f3e2b 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -3114,6 +3114,46 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, return status; } +/** + * i40e_prepare_add_macvlan + * @mv_list: list of macvlans to be added + * @desc: pointer to AQ descriptor structure + * @count: length of the list + * @seid: VSI for the mac address + * + * Internal helper function that prepares the add macvlan request + * and returns the buffer size. + **/ +static u16 +i40e_prepare_add_macvlan(struct i40e_aqc_add_macvlan_element_data *mv_list, + struct i40e_aq_desc *desc, u16 count, u16 seid) +{ + struct i40e_aqc_macvlan *cmd = + (struct i40e_aqc_macvlan *)&desc->params.raw; + u16 buf_size; + int i; + + buf_size = count * sizeof(*mv_list); + + /* prep the rest of the request */ + i40e_fill_default_direct_cmd_desc(desc, i40e_aqc_opc_add_macvlan); + cmd->num_addresses = CPU_TO_LE16(count); + cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); + cmd->seid[1] = 0; + cmd->seid[2] = 0; + + for (i = 0; i < count; i++) + if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) + mv_list[i].flags |= + CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); + + desc->flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); + if (buf_size > I40E_AQ_LARGE_BUF) + desc->flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); + + return buf_size; +} + /** * i40e_aq_add_macvlan * @hw: pointer to the hw struct @@ -3124,8 +3164,74 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, * * Add MAC/VLAN addresses to the HW filtering **/ -enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_add_macvlan_element_data *mv_list, +enum i40e_status_code +i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, + cmd_details); + + return status; +} + +/** + * i40e_aq_add_macvlan_v2 + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be added + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value + * + * Add MAC/VLAN addresses to the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. + **/ +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); + + return status; +} + +/** + * i40e_aq_remove_macvlan + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be removed + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * + * Remove MAC/VLAN addresses from the HW filtering + **/ +enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details) { struct i40e_aq_desc desc; @@ -3133,7 +3239,6 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, (struct i40e_aqc_macvlan *)&desc.params.raw; enum i40e_status_code status; u16 buf_size; - int i; if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; @@ -3141,17 +3246,12 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_macvlan); + i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan); cmd->num_addresses = CPU_TO_LE16(count); cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); cmd->seid[1] = 0; cmd->seid[2] = 0; - for (i = 0; i < count; i++) - if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) - mv_list[i].flags |= - CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); - desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); @@ -3163,18 +3263,25 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, } /** - * i40e_aq_remove_macvlan + * i40e_aq_remove_macvlan_v2 * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be removed * @count: length of the list * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value * - * Remove MAC/VLAN addresses from the HW filtering + * Remove MAC/VLAN addresses from the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. **/ -enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_remove_macvlan_element_data *mv_list, - u16 count, struct i40e_asq_cmd_details *cmd_details) +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) { struct i40e_aq_desc desc; struct i40e_aqc_macvlan *cmd = @@ -3198,8 +3305,8 @@ enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, - cmd_details); + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); return status; } diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h index 124222e476..29c86c7fe8 100644 --- a/drivers/net/i40e/base/i40e_prototype.h +++ b/drivers/net/i40e/base/i40e_prototype.h @@ -38,6 +38,13 @@ 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); +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); #ifdef VF_DRIVER bool i40e_asq_done(struct i40e_hw *hw); #endif @@ -188,9 +195,19 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_add_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_add_mirrorrule(struct i40e_hw *hw, u16 sw_seid, u16 rule_type, u16 dest_vsi, u16 count, __le16 *mr_list, struct i40e_asq_cmd_details *cmd_details, -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 02/14] net/i40e/base: update FW API version to 1.14 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 01/14] net/i40e/base: add new versions of send ASQ command functions Robin Zhang @ 2021-06-21 6:36 ` Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 03/14] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules Robin Zhang ` (11 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:36 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Sylwester Dziedziuch Update FW increment API version to 1.14 Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 2ca41db5d3..b5ac74787b 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -13,7 +13,7 @@ #define I40E_FW_API_VERSION_MAJOR 0x0001 #define I40E_FW_API_VERSION_MINOR_X722 0x000B -#define I40E_FW_API_VERSION_MINOR_X710 0x000C +#define I40E_FW_API_VERSION_MINOR_X710 0x000E #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ I40E_FW_API_VERSION_MINOR_X710 : \ -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 03/14] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 01/14] net/i40e/base: add new versions of send ASQ command functions Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 02/14] net/i40e/base: update FW API version to 1.14 Robin Zhang @ 2021-06-21 6:36 ` Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 04/14] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang ` (10 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:36 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak This change increments X722 API version and adds new constants related to the extended implementation of Security Version Opt-In. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index b5ac74787b..a73a08aae6 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -12,7 +12,7 @@ */ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR_X722 0x000B +#define I40E_FW_API_VERSION_MINOR_X722 0x000C #define I40E_FW_API_VERSION_MINOR_X710 0x000E #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ @@ -2425,11 +2425,15 @@ struct i40e_aqc_rollback_revision_update { u8 optin_mode; /* bool */ #define I40E_AQ_RREV_OPTION_MODE 0x01 u8 module_selected; -#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 -#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 -#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 -#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 -#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 +#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 +#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 +#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 +#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PHY_PLL_O_CONFIGURATION 5 +#define I40E_AQ_RREV_MODULE_PHY_0_CONFIGURATION 6 +#define I40E_AQ_RREV_MODULE_PHY_PLL_1_CONFIGURATION 7 +#define I40E_AQ_RREV_MODULE_PHY_1_CONFIGURATION 8 u8 reserved1[2]; u32 min_rrev; u8 reserved2[8]; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 04/14] net/i40e/base: set TSA table values when parsing CEE configuration 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (2 preceding siblings ...) 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 03/14] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules Robin Zhang @ 2021-06-21 6:36 ` Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 05/14] net/i40e/base: define new Shadow RAM pointers Robin Zhang ` (9 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:36 UTC (permalink / raw) To: dev; +Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Pawel Malinowski Driver did not Set TSA table values when parsing CEE configuration obtained from FW. Signed-off-by: Pawel Malinowski <pawel.malinowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_dcb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 388af3d64d..27b52bc365 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -315,9 +315,15 @@ static void i40e_parse_cee_pgcfg_tlv(struct i40e_cee_feat_tlv *tlv, * |pg0|pg1|pg2|pg3|pg4|pg5|pg6|pg7| * --------------------------------- */ - for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) + for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) { etscfg->tcbwtable[i] = buf[offset++]; + if (etscfg->prioritytable[i] == I40E_CEE_PGID_STRICT) + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_STRICT; + else + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_ETS; + } + /* Number of TCs supported (1 octet) */ etscfg->maxtcs = buf[offset]; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 05/14] net/i40e/base: define new Shadow RAM pointers 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (3 preceding siblings ...) 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 04/14] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang @ 2021-06-21 6:36 ` Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang ` (8 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:36 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak Add definitions for Shadow RAM pointers: 6th FPA module, 5th FPA module in X722 and Preservation Rules Module. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index cf41345834..e5a3729183 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -1555,6 +1555,9 @@ struct i40e_hw_port_stats { #define I40E_SR_FEATURE_CONFIGURATION_PTR 0x49 #define I40E_SR_CONFIGURATION_METADATA_PTR 0x4D #define I40E_SR_IMMEDIATE_VALUES_PTR 0x4E +#define I40E_SR_PRESERVATION_RULES_PTR 0x70 +#define I40E_X722_SR_5TH_FREE_PROVISION_AREA_PTR 0x71 +#define I40E_SR_6TH_FREE_PROVISION_AREA_PTR 0x71 /* Auxiliary field, mask and shift definition for Shadow RAM and NVM Flash */ #define I40E_SR_VPD_MODULE_MAX_SIZE 1024 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (4 preceding siblings ...) 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 05/14] net/i40e/base: define new Shadow RAM pointers Robin Zhang @ 2021-06-21 6:37 ` Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 07/14] net/i40e/base: fix PF reset failed Robin Zhang ` (7 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:37 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski Unlike other supported adapters, 2.5G and 5G use different PHY type identifiers for reading/writing PHY settings and for reading link status. This commit intruduces separate PHY identifiers for these two operation types. Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++-- drivers/net/i40e/base/i40e_common.c | 4 ++-- drivers/net/i40e/base/i40e_type.h | 8 ++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index a73a08aae6..1aafe1de38 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_25GBASE_LR = 0x22, I40E_PHY_TYPE_25GBASE_AOC = 0x23, I40E_PHY_TYPE_25GBASE_ACC = 0x24, - I40E_PHY_TYPE_2_5GBASE_T = 0x30, - I40E_PHY_TYPE_5GBASE_T = 0x31, + I40E_PHY_TYPE_2_5GBASE_T = 0x26, + I40E_PHY_TYPE_5GBASE_T = 0x27, + I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS = 0x30, + I40E_PHY_TYPE_5GBASE_T_LINK_STATUS = 0x31, I40E_PHY_TYPE_MAX, I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD, I40E_PHY_TYPE_EMPTY = 0xFE, diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 32642f3e2b..ceedec68bf 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) break; case I40E_PHY_TYPE_100BASE_TX: case I40E_PHY_TYPE_1000BASE_T: - case I40E_PHY_TYPE_2_5GBASE_T: - case I40E_PHY_TYPE_5GBASE_T: + case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS: + case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS: case I40E_PHY_TYPE_10GBASE_T: media = I40E_MEDIA_TYPE_BASET; break; diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index e5a3729183..0323887550 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -329,12 +329,8 @@ struct i40e_phy_info { I40E_PHY_TYPE_OFFSET) #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \ I40E_PHY_TYPE_OFFSET) -/* Offset for 2.5G/5G PHY Types value to bit number conversion */ -#define I40E_PHY_TYPE_OFFSET2 (-10) -#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) -#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) +#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T) +#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T) #define I40E_HW_CAP_MAX_GPIO 30 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 07/14] net/i40e/base: fix PF reset failed 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (5 preceding siblings ...) 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang @ 2021-06-21 6:37 ` Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 08/14] net/i40e/base: fix update link data for X722 Robin Zhang ` (6 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:37 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Sylwester Dziedziuch PF has to delete all the filters during reset. If it is fully loaded with filters then it is possible that it will take more than 200 ms to finish the reset resulting in timeout during pf_reset and PF reset failed, -15 error indication. Increasing the timeout value for PF reset from 200 to 1000 to give PF more time to finish reset if it is loaded with filters. Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit") Cc: stable@dpdk.org Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ceedec68bf..aa424e6010 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw, return I40E_ERR_RESET_FAILED; } -#define I40E_PF_RESET_WAIT_COUNT 200 +#define I40E_PF_RESET_WAIT_COUNT 1000 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 08/14] net/i40e/base: fix update link data for X722 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (6 preceding siblings ...) 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 07/14] net/i40e/base: fix PF reset failed Robin Zhang @ 2021-06-21 6:37 ` Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang ` (5 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:37 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Jaroslaw Gawin The X722 card has 'Link Type' information elsewhere than the X710. Previously, for all cards, the 'Link Type' information was retrieved by opcode 0x0607 and this value was wrong for all X722 cards. Now this information for X722 only is taken by opcode 0x0600 (function: i40e_aq_get_phy_capabilities) instead of an opcode 0x0607 (function: i40e_aq_get_link_info). All other parameters read by opcode 0x0607 unchanged. Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction") Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time") Cc: stable@dpdk.org Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index aa424e6010..ef061a6b63 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw, hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; + /* 'Get Link Status' response data structure from X722 FW has + * different format and does not contain this information + */ if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE && hw->mac.type != I40E_MAC_X722) { __le32 tmp; @@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) return status; /* extra checking needed to ensure link info to user is timely */ - if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && - ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || - !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) { - status = i40e_aq_get_phy_capabilities(hw, false, false, + if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && + ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || + !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) || + hw->mac.type == I40E_MAC_X722) { + status = i40e_aq_get_phy_capabilities(hw, false, + hw->mac.type == + I40E_MAC_X722, &abilities, NULL); if (status) return status; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 09/14] net/i40e/base: fix AOC media type reported by ethtool 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (7 preceding siblings ...) 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 08/14] net/i40e/base: fix update link data for X722 Robin Zhang @ 2021-06-21 6:37 ` Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 10/14] net/i40e/base: add flags and fields for double vlan processing Robin Zhang ` (4 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:37 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski For Active Optical Cable (AOC) the correct media type is "Fibre", not "Direct Attach Copper". Fixes: d749d4d89969 ("i40e/base: add AOC PHY types") Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and ACC") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ef061a6b63..2ca6a13e79 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_40GBASE_LR4: case I40E_PHY_TYPE_25GBASE_LR: case I40E_PHY_TYPE_25GBASE_SR: + case I40E_PHY_TYPE_10GBASE_AOC: + case I40E_PHY_TYPE_25GBASE_AOC: + case I40E_PHY_TYPE_40GBASE_AOC: media = I40E_MEDIA_TYPE_FIBER; break; case I40E_PHY_TYPE_100BASE_TX: @@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_10GBASE_CR1: case I40E_PHY_TYPE_40GBASE_CR4: case I40E_PHY_TYPE_10GBASE_SFPP_CU: - case I40E_PHY_TYPE_40GBASE_AOC: - case I40E_PHY_TYPE_10GBASE_AOC: case I40E_PHY_TYPE_25GBASE_CR: - case I40E_PHY_TYPE_25GBASE_AOC: case I40E_PHY_TYPE_25GBASE_ACC: media = I40E_MEDIA_TYPE_DA; break; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 10/14] net/i40e/base: add flags and fields for double vlan processing 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (8 preceding siblings ...) 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang @ 2021-06-21 6:37 ` Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 11/14] net/i40e/base: 10GBASE-ER Optical modules recognition Robin Zhang ` (3 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:37 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Przemyslaw Patynowski Add flags for outer vlan and include set port parameters in Linux compilation. Add flags, which describe port and switch state for both double vlan functionality and outer vlan processing. Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 1aafe1de38..646cfd0398 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -768,6 +768,7 @@ struct i40e_aqc_set_switch_config { #define I40E_AQ_SET_SWITCH_CFG_PROMISC 0x0001 #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER 0x0002 #define I40E_AQ_SET_SWITCH_CFG_HW_ATR_EVICT 0x0004 +#define I40E_AQ_SET_SWITCH_CFG_OUTER_VLAN 0x0008 __le16 valid_flags; /* The ethertype in switch_tag is dropped on ingress and used * internally by the switch. Set this to zero for the default @@ -904,7 +905,7 @@ struct i40e_aqc_vsi_properties_data { u8 sec_reserved; /* VLAN section */ __le16 pvid; /* VLANS include priority bits */ - __le16 fcoe_pvid; + __le16 outer_vlan; u8 port_vlan_flags; #define I40E_AQ_VSI_PVLAN_MODE_SHIFT 0x00 #define I40E_AQ_VSI_PVLAN_MODE_MASK (0x03 << \ @@ -920,7 +921,24 @@ struct i40e_aqc_vsi_properties_data { #define I40E_AQ_VSI_PVLAN_EMOD_STR_UP 0x08 #define I40E_AQ_VSI_PVLAN_EMOD_STR 0x10 #define I40E_AQ_VSI_PVLAN_EMOD_NOTHING 0x18 - u8 pvlan_reserved[3]; + u8 outer_vlan_flags; +#define I40E_AQ_VSI_OVLAN_MODE_SHIFT 0x00 +#define I40E_AQ_VSI_OVLAN_MODE_MASK (0x03 << \ + I40E_AQ_VSI_OVLAN_MODE_SHIFT) +#define I40E_AQ_VSI_OVLAN_MODE_UNTAGGED 0x01 +#define I40E_AQ_VSI_OVLAN_MODE_TAGGED 0x02 +#define I40E_AQ_VSI_OVLAN_MODE_ALL 0x03 +#define I40E_AQ_VSI_OVLAN_INSERT_PVID 0x04 +#define I40E_AQ_VSI_OVLAN_EMOD_SHIFT 0x03 +#define I40E_AQ_VSI_OVLAN_EMOD_MASK (0x03 <<\ + I40E_AQ_VSI_OVLAN_EMOD_SHIFT) +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_ALL 0x00 +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_UP 0x01 +#define I40E_AQ_VSI_OVLAN_EMOD_HIDE_ALL 0x02 +#define I40E_AQ_VSI_OVLAN_EMOD_NOTHING 0x03 +#define I40E_AQ_VSI_OVLAN_CTRL_ENA 0x04 + + u8 pvlan_reserved[2]; /* ingress egress up sections */ __le32 ingress_table; /* bitmap, 3 bits per up */ #define I40E_AQ_VSI_UP_TABLE_UP0_SHIFT 0 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 11/14] net/i40e/base: 10GBASE-ER Optical modules recognition 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (9 preceding siblings ...) 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 10/14] net/i40e/base: add flags and fields for double vlan processing Robin Zhang @ 2021-06-21 6:37 ` Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 12/14] net/i40e/base: fix headers to match functions Robin Zhang ` (2 subsequent siblings) 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:37 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak This change adds a new PHY type for 10GBASE-ER modules. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++ drivers/net/i40e/base/i40e_common.c | 1 + drivers/net/i40e/base/i40e_type.h | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 646cfd0398..c41dc71cdf 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -1945,6 +1945,7 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_40GBASE_AOC = 0xD, I40E_PHY_TYPE_UNRECOGNIZED = 0xE, I40E_PHY_TYPE_UNSUPPORTED = 0xF, + I40E_PHY_TYPE_10GBASE_ER = 0x10, I40E_PHY_TYPE_100BASE_TX = 0x11, I40E_PHY_TYPE_1000BASE_T = 0x12, I40E_PHY_TYPE_10GBASE_T = 0x13, @@ -1991,6 +1992,7 @@ enum i40e_aq_phy_type { BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC) | \ BIT_ULL(I40E_PHY_TYPE_UNRECOGNIZED) | \ BIT_ULL(I40E_PHY_TYPE_UNSUPPORTED) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_ER) | \ BIT_ULL(I40E_PHY_TYPE_100BASE_TX) | \ BIT_ULL(I40E_PHY_TYPE_1000BASE_T) | \ BIT_ULL(I40E_PHY_TYPE_10GBASE_T) | \ diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 2ca6a13e79..e077bf8fd3 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1268,6 +1268,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) enum i40e_media_type media; switch (hw->phy.link_info.phy_type) { + case I40E_PHY_TYPE_10GBASE_ER: case I40E_PHY_TYPE_10GBASE_SR: case I40E_PHY_TYPE_10GBASE_LR: case I40E_PHY_TYPE_1000BASE_SX: diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 0323887550..86b9eeeb43 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -294,6 +294,7 @@ struct i40e_phy_info { #define I40E_CAP_PHY_TYPE_10GBASE_CR1_CU BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1_CU) #define I40E_CAP_PHY_TYPE_10GBASE_AOC BIT_ULL(I40E_PHY_TYPE_10GBASE_AOC) #define I40E_CAP_PHY_TYPE_40GBASE_AOC BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC) +#define I40E_CAP_PHY_TYPE_10GBASE_ER BIT_ULL(I40E_PHY_TYPE_10GBASE_ER) #define I40E_CAP_PHY_TYPE_100BASE_TX BIT_ULL(I40E_PHY_TYPE_100BASE_TX) #define I40E_CAP_PHY_TYPE_1000BASE_T BIT_ULL(I40E_PHY_TYPE_1000BASE_T) #define I40E_CAP_PHY_TYPE_10GBASE_T BIT_ULL(I40E_PHY_TYPE_10GBASE_T) -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 12/14] net/i40e/base: fix headers to match functions 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (10 preceding siblings ...) 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 11/14] net/i40e/base: 10GBASE-ER Optical modules recognition Robin Zhang @ 2021-06-21 6:37 ` Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 14/14] net/i40e/base: update version in readme Robin Zhang 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:37 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Jesse Brandeburg Fix several kernel-doc warnings when building with W=1. These changes are only to comments. Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 842ea1996335 ("i40e/base: save link module type") Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY") Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722") Cc: stable@dpdk.org Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 10 +++++----- drivers/net/i40e/base/i40e_dcb.c | 2 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index e077bf8fd3..3f3896aea4 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2678,7 +2678,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw, } /** - * i40e_get_vsi_params - get VSI configuration info + * i40e_aq_get_vsi_params - get VSI configuration info * @hw: pointer to the hw struct * @vsi_ctx: pointer to a vsi context struct * @cmd_details: pointer to command details structure or NULL @@ -2939,7 +2939,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up) } /** - * i40e_updatelink_status - update status of the HW network link + * i40e_update_link_info - update status of the HW network link * @hw: pointer to the hw struct **/ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) @@ -4831,7 +4831,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index, } /** - * i40e_aq_get_switch_resource_alloc (0x0204) + * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations * @hw: pointer to the hw struct * @num_entries: pointer to u8 to store the number of resource entries returned * @buf: pointer to a user supplied buffer. This buffer must be large enough @@ -6978,7 +6978,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num) } /** - * i40e_blink_phy_led + * i40e_blink_phy_link_led * @hw: pointer to the HW structure * @time: time how long led will blinks in secs * @interval: gap between LED on and off in msecs @@ -7825,7 +7825,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw, } /** - * i40e_aq_opc_set_ns_proxy_table_entry + * i40e_aq_set_ns_proxy_table_entry * @hw: pointer to the HW structure * @ns_proxy_table_entry: pointer to NS table entry command struct * @cmd_details: pointer to command details diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 27b52bc365..8f9b7e823f 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv, } /** - * i40e_parse_ieee_etsrec_tlv + * i40e_parse_ieee_tlv * @tlv: IEEE 802.1Qaz TLV * @dcbcfg: Local store to update ETS REC data * diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c index d3969396f0..d3bd683ff3 100644 --- a/drivers/net/i40e/base/i40e_lan_hmc.c +++ b/drivers/net/i40e/base/i40e_lan_hmc.c @@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw, } /** - * i40e_delete_hmc_object - remove hmc objects + * i40e_delete_lan_hmc_object - remove hmc objects * @hw: pointer to the HW structure * @info: pointer to i40e_hmc_delete_obj_info struct * diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 561ed21136..67e58cc195 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -7,7 +7,7 @@ #include "i40e_prototype.h" /** - * i40e_init_nvm_ops - Initialize NVM function pointers + * i40e_init_nvm - Initialize NVM function pointers * @hw: pointer to the HW structure * * Setup the function pointers and the NVM info structure. Should be called -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (11 preceding siblings ...) 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 12/14] net/i40e/base: fix headers to match functions Robin Zhang @ 2021-06-21 6:37 ` Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 14/14] net/i40e/base: update version in readme Robin Zhang 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:37 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Christopher Pau The status of i40e_read_nvm_word is not checked, so variables set from this function could be used uninitialized. In this case, preserve the existing flow that does not block initialization by initializing these values from the start. The variable checksum from i40e_calc_nvm_checksum is used before return value is checked. Fix this logic. Fixes: 8d6c51fcd24b ("i40e/base: get OEM version") Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only") Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM") Cc: stable@dpdk.org Signed-off-by: Christopher Pau <christopher.pau@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 6 ++++-- drivers/net/i40e/base/i40e_nvm.c | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index eafacbdbec..d27ccde29a 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -648,8 +648,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) { struct i40e_adminq_info *aq = &hw->aq; enum i40e_status_code ret_code; - u16 cfg_ptr, oem_hi, oem_lo; - u16 eetrack_lo, eetrack_hi; + u16 oem_hi = 0, oem_lo = 0; + u16 eetrack_hi = 0; + u16 eetrack_lo = 0; + u16 cfg_ptr = 0; int retry = 0; /* verify input for valid configuration */ diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 67e58cc195..f385042601 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw) DEBUGFUNC("i40e_update_nvm_checksum"); ret_code = i40e_calc_nvm_checksum(hw, &checksum); - le_sum = CPU_TO_LE16(checksum); - if (ret_code == I40E_SUCCESS) + if (ret_code == I40E_SUCCESS) { + le_sum = CPU_TO_LE16(checksum); ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD, 1, &le_sum, true); + } return ret_code; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v2 14/14] net/i40e/base: update version in readme 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang ` (12 preceding siblings ...) 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang @ 2021-06-21 6:37 ` Robin Zhang 13 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 6:37 UTC (permalink / raw) To: dev; +Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang Update base code version in README. Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README index 6af2993116..c84764005b 100644 --- a/drivers/net/i40e/base/README +++ b/drivers/net/i40e/base/README @@ -6,7 +6,7 @@ Intel® I40E driver ================== This directory contains source code of FreeBSD i40e driver of version -cid-i40e.2020.08.27.tar.gz released by the team which develops +cid-i40e.2021.04.29.tar.gz released by the team which develops basic drivers for any i40e NIC. The directory of base/ contains the original source package. This driver is valid for the product(s) listed below -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 00/15] i40e base code update 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (14 preceding siblings ...) 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang @ 2021-06-21 7:51 ` Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 01/15] net/i40e/base: add new versions of send ASQ command functions Robin Zhang ` (14 more replies) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (2 subsequent siblings) 18 siblings, 15 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:51 UTC (permalink / raw) To: dev; +Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang update i40e base code. source code of i40e driver: cid-i40e.2021.04.29.tar.gz changelog in i40e share repo: From 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") To bedcbea1063 ("i40e-shared: Fix potentially uninitialized variables in NVM code") The following commits are ignored: cb9139e3bce8 ("i40e-shared: Fix not blinking X722 with x557 PHY via ‘ethtool -p'") c09d4f9cf390 ("i40e-shared: i40e-shared: Fix build warning -Wformat related to integer size") ff8a1abc6c17 ("i40e-shared: Fix build warning with __packed") 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") v2: - refine commit messages and macro name v3: - there has a fix patch contains two issues, split it into two patches Robin Zhang (15): net/i40e/base: add new versions of send ASQ command functions net/i40e/base: update X710 FW API version to 1.14 net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules net/i40e/base: set TSA table values when parsing CEE configuration net/i40e/base: define new Shadow RAM pointers net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters net/i40e/base: fix PF reset failed net/i40e/base: fix update link data for X722 net/i40e/base: fix AOC media type reported by ethtool net/i40e/base: add flags and fields for double vlan processing net/i40e/base: 10GBASE-ER Optical modules recognition net/i40e/base: fix headers to match functions net/i40e/base: fix potentially uninitialized variables in NVM code net/i40e/base: fix checksum is used before return value is checked net/i40e/base: update version in readme drivers/net/i40e/base/README | 2 +- drivers/net/i40e/base/i40e_adminq.c | 79 +++++++++-- drivers/net/i40e/base/i40e_adminq_cmd.h | 48 +++++-- drivers/net/i40e/base/i40e_common.c | 176 +++++++++++++++++++----- drivers/net/i40e/base/i40e_dcb.c | 10 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 7 +- drivers/net/i40e/base/i40e_prototype.h | 17 +++ drivers/net/i40e/base/i40e_type.h | 12 +- 9 files changed, 288 insertions(+), 65 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 01/15] net/i40e/base: add new versions of send ASQ command functions 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang @ 2021-06-21 7:51 ` Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 02/15] net/i40e/base: update X710 FW API version to 1.14 Robin Zhang ` (13 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:51 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Sylwester Dziedziuch ASQ send command functions are returning only i40e status codes yet some calling functions also need Admin Queue status that is stored in hw->aq.asq_last_status. Since hw object is stored on a heap it introduces a possibility for a race condition in access to hw if calling function is not fast enough to read hw->aq.asq_last_status before next send ASQ command is executed. Added new versions of send ASQ command functions that return Admin Queue status on the stack to avoid race conditions in access to hw->aq.asq_last_status. Added new _v2 version of i40e_aq_remove_macvlan and i40e_aq_add_macvlan that is using new _v2 versions of ASQ send command functions and returns the Admin Queue status on the stack. Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 73 +++++++++++-- drivers/net/i40e/base/i40e_common.c | 139 ++++++++++++++++++++++--- drivers/net/i40e/base/i40e_prototype.h | 17 +++ 3 files changed, 205 insertions(+), 24 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 0da45f03e4..eafacbdbec 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -834,7 +834,7 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) } /** - * i40e_asq_send_command - send command to Admin Queue + * i40e_asq_send_command_exec - send command to Admin Queue * @hw: pointer to the hw struct * @desc: prefilled descriptor describing the command (non DMA mem) * @buff: buffer to use for indirect commands @@ -844,11 +844,12 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) * This is the main send command driver routine for the Admin Queue send * queue. It runs the queue, cleans the queue, etc **/ -enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, - struct i40e_aq_desc *desc, - void *buff, /* can be NULL */ - u16 buff_size, - struct i40e_asq_cmd_details *cmd_details) +STATIC enum i40e_status_code +i40e_asq_send_command_exec(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) { enum i40e_status_code status = I40E_SUCCESS; struct i40e_dma_mem *dma_buff = NULL; @@ -858,8 +859,6 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, u16 retval = 0; u32 val = 0; - i40e_acquire_spinlock(&hw->aq.asq_spinlock); - hw->aq.asq_last_status = I40E_AQ_RC_OK; if (hw->aq.asq.count == 0) { @@ -1042,6 +1041,64 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, } asq_send_command_error: + return status; +} + +/** + * i40e_asq_send_command - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * + * Acquires the lock and calls the main send command execution + * routine. + **/ +enum i40e_status_code +i40e_asq_send_command(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + i40e_release_spinlock(&hw->aq.asq_spinlock); + return status; +} + +/** + * i40e_asq_send_command_v2 - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * @aq_status: pointer to Admin Queue status return value + * + * Acquires the lock and calls the main send command execution + * routine. Returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + **/ +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + if (aq_status) + *aq_status = hw->aq.asq_last_status; i40e_release_spinlock(&hw->aq.asq_spinlock); return status; } diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index e20bb9ac35..32642f3e2b 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -3114,6 +3114,46 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, return status; } +/** + * i40e_prepare_add_macvlan + * @mv_list: list of macvlans to be added + * @desc: pointer to AQ descriptor structure + * @count: length of the list + * @seid: VSI for the mac address + * + * Internal helper function that prepares the add macvlan request + * and returns the buffer size. + **/ +static u16 +i40e_prepare_add_macvlan(struct i40e_aqc_add_macvlan_element_data *mv_list, + struct i40e_aq_desc *desc, u16 count, u16 seid) +{ + struct i40e_aqc_macvlan *cmd = + (struct i40e_aqc_macvlan *)&desc->params.raw; + u16 buf_size; + int i; + + buf_size = count * sizeof(*mv_list); + + /* prep the rest of the request */ + i40e_fill_default_direct_cmd_desc(desc, i40e_aqc_opc_add_macvlan); + cmd->num_addresses = CPU_TO_LE16(count); + cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); + cmd->seid[1] = 0; + cmd->seid[2] = 0; + + for (i = 0; i < count; i++) + if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) + mv_list[i].flags |= + CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); + + desc->flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); + if (buf_size > I40E_AQ_LARGE_BUF) + desc->flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); + + return buf_size; +} + /** * i40e_aq_add_macvlan * @hw: pointer to the hw struct @@ -3124,8 +3164,74 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, * * Add MAC/VLAN addresses to the HW filtering **/ -enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_add_macvlan_element_data *mv_list, +enum i40e_status_code +i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, + cmd_details); + + return status; +} + +/** + * i40e_aq_add_macvlan_v2 + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be added + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value + * + * Add MAC/VLAN addresses to the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. + **/ +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); + + return status; +} + +/** + * i40e_aq_remove_macvlan + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be removed + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * + * Remove MAC/VLAN addresses from the HW filtering + **/ +enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details) { struct i40e_aq_desc desc; @@ -3133,7 +3239,6 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, (struct i40e_aqc_macvlan *)&desc.params.raw; enum i40e_status_code status; u16 buf_size; - int i; if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; @@ -3141,17 +3246,12 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_macvlan); + i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan); cmd->num_addresses = CPU_TO_LE16(count); cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); cmd->seid[1] = 0; cmd->seid[2] = 0; - for (i = 0; i < count; i++) - if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) - mv_list[i].flags |= - CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); - desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); @@ -3163,18 +3263,25 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, } /** - * i40e_aq_remove_macvlan + * i40e_aq_remove_macvlan_v2 * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be removed * @count: length of the list * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value * - * Remove MAC/VLAN addresses from the HW filtering + * Remove MAC/VLAN addresses from the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. **/ -enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_remove_macvlan_element_data *mv_list, - u16 count, struct i40e_asq_cmd_details *cmd_details) +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) { struct i40e_aq_desc desc; struct i40e_aqc_macvlan *cmd = @@ -3198,8 +3305,8 @@ enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, - cmd_details); + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); return status; } diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h index 124222e476..29c86c7fe8 100644 --- a/drivers/net/i40e/base/i40e_prototype.h +++ b/drivers/net/i40e/base/i40e_prototype.h @@ -38,6 +38,13 @@ 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); +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); #ifdef VF_DRIVER bool i40e_asq_done(struct i40e_hw *hw); #endif @@ -188,9 +195,19 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_add_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_add_mirrorrule(struct i40e_hw *hw, u16 sw_seid, u16 rule_type, u16 dest_vsi, u16 count, __le16 *mr_list, struct i40e_asq_cmd_details *cmd_details, -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 02/15] net/i40e/base: update X710 FW API version to 1.14 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 01/15] net/i40e/base: add new versions of send ASQ command functions Robin Zhang @ 2021-06-21 7:51 ` Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 03/15] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules Robin Zhang ` (12 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:51 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Sylwester Dziedziuch Update X710 FW increment API version to 1.14 Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 2ca41db5d3..b5ac74787b 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -13,7 +13,7 @@ #define I40E_FW_API_VERSION_MAJOR 0x0001 #define I40E_FW_API_VERSION_MINOR_X722 0x000B -#define I40E_FW_API_VERSION_MINOR_X710 0x000C +#define I40E_FW_API_VERSION_MINOR_X710 0x000E #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ I40E_FW_API_VERSION_MINOR_X710 : \ -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 03/15] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 01/15] net/i40e/base: add new versions of send ASQ command functions Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 02/15] net/i40e/base: update X710 FW API version to 1.14 Robin Zhang @ 2021-06-21 7:51 ` Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 04/15] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang ` (11 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:51 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak This change increments X722 API version and adds new constants related to the extended implementation of Security Version Opt-In. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index b5ac74787b..a73a08aae6 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -12,7 +12,7 @@ */ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR_X722 0x000B +#define I40E_FW_API_VERSION_MINOR_X722 0x000C #define I40E_FW_API_VERSION_MINOR_X710 0x000E #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ @@ -2425,11 +2425,15 @@ struct i40e_aqc_rollback_revision_update { u8 optin_mode; /* bool */ #define I40E_AQ_RREV_OPTION_MODE 0x01 u8 module_selected; -#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 -#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 -#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 -#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 -#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 +#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 +#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 +#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 +#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PHY_PLL_O_CONFIGURATION 5 +#define I40E_AQ_RREV_MODULE_PHY_0_CONFIGURATION 6 +#define I40E_AQ_RREV_MODULE_PHY_PLL_1_CONFIGURATION 7 +#define I40E_AQ_RREV_MODULE_PHY_1_CONFIGURATION 8 u8 reserved1[2]; u32 min_rrev; u8 reserved2[8]; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 04/15] net/i40e/base: set TSA table values when parsing CEE configuration 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (2 preceding siblings ...) 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 03/15] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules Robin Zhang @ 2021-06-21 7:51 ` Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 05/15] net/i40e/base: define new Shadow RAM pointers Robin Zhang ` (10 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:51 UTC (permalink / raw) To: dev; +Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Pawel Malinowski Driver did not Set TSA table values when parsing CEE configuration obtained from FW. Signed-off-by: Pawel Malinowski <pawel.malinowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_dcb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 388af3d64d..27b52bc365 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -315,9 +315,15 @@ static void i40e_parse_cee_pgcfg_tlv(struct i40e_cee_feat_tlv *tlv, * |pg0|pg1|pg2|pg3|pg4|pg5|pg6|pg7| * --------------------------------- */ - for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) + for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) { etscfg->tcbwtable[i] = buf[offset++]; + if (etscfg->prioritytable[i] == I40E_CEE_PGID_STRICT) + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_STRICT; + else + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_ETS; + } + /* Number of TCs supported (1 octet) */ etscfg->maxtcs = buf[offset]; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 05/15] net/i40e/base: define new Shadow RAM pointers 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (3 preceding siblings ...) 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 04/15] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang @ 2021-06-21 7:51 ` Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 06/15] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang ` (9 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:51 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak Add definitions for Shadow RAM pointers: 6th FPA module, 5th FPA module in X722 and Preservation Rules Module. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index cf41345834..e5a3729183 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -1555,6 +1555,9 @@ struct i40e_hw_port_stats { #define I40E_SR_FEATURE_CONFIGURATION_PTR 0x49 #define I40E_SR_CONFIGURATION_METADATA_PTR 0x4D #define I40E_SR_IMMEDIATE_VALUES_PTR 0x4E +#define I40E_SR_PRESERVATION_RULES_PTR 0x70 +#define I40E_X722_SR_5TH_FREE_PROVISION_AREA_PTR 0x71 +#define I40E_SR_6TH_FREE_PROVISION_AREA_PTR 0x71 /* Auxiliary field, mask and shift definition for Shadow RAM and NVM Flash */ #define I40E_SR_VPD_MODULE_MAX_SIZE 1024 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 06/15] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (4 preceding siblings ...) 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 05/15] net/i40e/base: define new Shadow RAM pointers Robin Zhang @ 2021-06-21 7:51 ` Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 07/15] net/i40e/base: fix PF reset failed Robin Zhang ` (8 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:51 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski Unlike other supported adapters, 2.5G and 5G use different PHY type identifiers for reading/writing PHY settings and for reading link status. This commit intruduces separate PHY identifiers for these two operation types. Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++-- drivers/net/i40e/base/i40e_common.c | 4 ++-- drivers/net/i40e/base/i40e_type.h | 8 ++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index a73a08aae6..1aafe1de38 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_25GBASE_LR = 0x22, I40E_PHY_TYPE_25GBASE_AOC = 0x23, I40E_PHY_TYPE_25GBASE_ACC = 0x24, - I40E_PHY_TYPE_2_5GBASE_T = 0x30, - I40E_PHY_TYPE_5GBASE_T = 0x31, + I40E_PHY_TYPE_2_5GBASE_T = 0x26, + I40E_PHY_TYPE_5GBASE_T = 0x27, + I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS = 0x30, + I40E_PHY_TYPE_5GBASE_T_LINK_STATUS = 0x31, I40E_PHY_TYPE_MAX, I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD, I40E_PHY_TYPE_EMPTY = 0xFE, diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 32642f3e2b..ceedec68bf 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) break; case I40E_PHY_TYPE_100BASE_TX: case I40E_PHY_TYPE_1000BASE_T: - case I40E_PHY_TYPE_2_5GBASE_T: - case I40E_PHY_TYPE_5GBASE_T: + case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS: + case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS: case I40E_PHY_TYPE_10GBASE_T: media = I40E_MEDIA_TYPE_BASET; break; diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index e5a3729183..0323887550 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -329,12 +329,8 @@ struct i40e_phy_info { I40E_PHY_TYPE_OFFSET) #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \ I40E_PHY_TYPE_OFFSET) -/* Offset for 2.5G/5G PHY Types value to bit number conversion */ -#define I40E_PHY_TYPE_OFFSET2 (-10) -#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) -#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) +#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T) +#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T) #define I40E_HW_CAP_MAX_GPIO 30 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 07/15] net/i40e/base: fix PF reset failed 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (5 preceding siblings ...) 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 06/15] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang @ 2021-06-21 7:51 ` Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 08/15] net/i40e/base: fix update link data for X722 Robin Zhang ` (7 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:51 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Sylwester Dziedziuch PF has to delete all the filters during reset. If it is fully loaded with filters then it is possible that it will take more than 200 ms to finish the reset resulting in timeout during pf_reset and PF reset failed, -15 error indication. Increasing the timeout value for PF reset from 200 to 1000 to give PF more time to finish reset if it is loaded with filters. Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit") Cc: stable@dpdk.org Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ceedec68bf..aa424e6010 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw, return I40E_ERR_RESET_FAILED; } -#define I40E_PF_RESET_WAIT_COUNT 200 +#define I40E_PF_RESET_WAIT_COUNT 1000 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 08/15] net/i40e/base: fix update link data for X722 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (6 preceding siblings ...) 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 07/15] net/i40e/base: fix PF reset failed Robin Zhang @ 2021-06-21 7:51 ` Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 09/15] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang ` (6 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:51 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Jaroslaw Gawin The X722 card has 'Link Type' information elsewhere than the X710. Previously, for all cards, the 'Link Type' information was retrieved by opcode 0x0607 and this value was wrong for all X722 cards. Now this information for X722 only is taken by opcode 0x0600 (function: i40e_aq_get_phy_capabilities) instead of an opcode 0x0607 (function: i40e_aq_get_link_info). All other parameters read by opcode 0x0607 unchanged. Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction") Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time") Cc: stable@dpdk.org Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index aa424e6010..ef061a6b63 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw, hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; + /* 'Get Link Status' response data structure from X722 FW has + * different format and does not contain this information + */ if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE && hw->mac.type != I40E_MAC_X722) { __le32 tmp; @@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) return status; /* extra checking needed to ensure link info to user is timely */ - if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && - ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || - !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) { - status = i40e_aq_get_phy_capabilities(hw, false, false, + if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && + ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || + !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) || + hw->mac.type == I40E_MAC_X722) { + status = i40e_aq_get_phy_capabilities(hw, false, + hw->mac.type == + I40E_MAC_X722, &abilities, NULL); if (status) return status; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 09/15] net/i40e/base: fix AOC media type reported by ethtool 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (7 preceding siblings ...) 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 08/15] net/i40e/base: fix update link data for X722 Robin Zhang @ 2021-06-21 7:52 ` Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 10/15] net/i40e/base: add flags and fields for double vlan processing Robin Zhang ` (5 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:52 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski For Active Optical Cable (AOC) the correct media type is "Fibre", not "Direct Attach Copper". Fixes: d749d4d89969 ("i40e/base: add AOC PHY types") Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and ACC") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ef061a6b63..2ca6a13e79 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_40GBASE_LR4: case I40E_PHY_TYPE_25GBASE_LR: case I40E_PHY_TYPE_25GBASE_SR: + case I40E_PHY_TYPE_10GBASE_AOC: + case I40E_PHY_TYPE_25GBASE_AOC: + case I40E_PHY_TYPE_40GBASE_AOC: media = I40E_MEDIA_TYPE_FIBER; break; case I40E_PHY_TYPE_100BASE_TX: @@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_10GBASE_CR1: case I40E_PHY_TYPE_40GBASE_CR4: case I40E_PHY_TYPE_10GBASE_SFPP_CU: - case I40E_PHY_TYPE_40GBASE_AOC: - case I40E_PHY_TYPE_10GBASE_AOC: case I40E_PHY_TYPE_25GBASE_CR: - case I40E_PHY_TYPE_25GBASE_AOC: case I40E_PHY_TYPE_25GBASE_ACC: media = I40E_MEDIA_TYPE_DA; break; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 10/15] net/i40e/base: add flags and fields for double vlan processing 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (8 preceding siblings ...) 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 09/15] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang @ 2021-06-21 7:52 ` Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 11/15] net/i40e/base: 10GBASE-ER Optical modules recognition Robin Zhang ` (4 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:52 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Przemyslaw Patynowski Add flags for outer vlan and include set port parameters in Linux compilation. Add flags, which describe port and switch state for both double vlan functionality and outer vlan processing. Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 1aafe1de38..646cfd0398 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -768,6 +768,7 @@ struct i40e_aqc_set_switch_config { #define I40E_AQ_SET_SWITCH_CFG_PROMISC 0x0001 #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER 0x0002 #define I40E_AQ_SET_SWITCH_CFG_HW_ATR_EVICT 0x0004 +#define I40E_AQ_SET_SWITCH_CFG_OUTER_VLAN 0x0008 __le16 valid_flags; /* The ethertype in switch_tag is dropped on ingress and used * internally by the switch. Set this to zero for the default @@ -904,7 +905,7 @@ struct i40e_aqc_vsi_properties_data { u8 sec_reserved; /* VLAN section */ __le16 pvid; /* VLANS include priority bits */ - __le16 fcoe_pvid; + __le16 outer_vlan; u8 port_vlan_flags; #define I40E_AQ_VSI_PVLAN_MODE_SHIFT 0x00 #define I40E_AQ_VSI_PVLAN_MODE_MASK (0x03 << \ @@ -920,7 +921,24 @@ struct i40e_aqc_vsi_properties_data { #define I40E_AQ_VSI_PVLAN_EMOD_STR_UP 0x08 #define I40E_AQ_VSI_PVLAN_EMOD_STR 0x10 #define I40E_AQ_VSI_PVLAN_EMOD_NOTHING 0x18 - u8 pvlan_reserved[3]; + u8 outer_vlan_flags; +#define I40E_AQ_VSI_OVLAN_MODE_SHIFT 0x00 +#define I40E_AQ_VSI_OVLAN_MODE_MASK (0x03 << \ + I40E_AQ_VSI_OVLAN_MODE_SHIFT) +#define I40E_AQ_VSI_OVLAN_MODE_UNTAGGED 0x01 +#define I40E_AQ_VSI_OVLAN_MODE_TAGGED 0x02 +#define I40E_AQ_VSI_OVLAN_MODE_ALL 0x03 +#define I40E_AQ_VSI_OVLAN_INSERT_PVID 0x04 +#define I40E_AQ_VSI_OVLAN_EMOD_SHIFT 0x03 +#define I40E_AQ_VSI_OVLAN_EMOD_MASK (0x03 <<\ + I40E_AQ_VSI_OVLAN_EMOD_SHIFT) +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_ALL 0x00 +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_UP 0x01 +#define I40E_AQ_VSI_OVLAN_EMOD_HIDE_ALL 0x02 +#define I40E_AQ_VSI_OVLAN_EMOD_NOTHING 0x03 +#define I40E_AQ_VSI_OVLAN_CTRL_ENA 0x04 + + u8 pvlan_reserved[2]; /* ingress egress up sections */ __le32 ingress_table; /* bitmap, 3 bits per up */ #define I40E_AQ_VSI_UP_TABLE_UP0_SHIFT 0 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 11/15] net/i40e/base: 10GBASE-ER Optical modules recognition 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (9 preceding siblings ...) 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 10/15] net/i40e/base: add flags and fields for double vlan processing Robin Zhang @ 2021-06-21 7:52 ` Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 12/15] net/i40e/base: fix headers to match functions Robin Zhang ` (3 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:52 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak This change adds a new PHY type for 10GBASE-ER modules. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 ++ drivers/net/i40e/base/i40e_common.c | 1 + drivers/net/i40e/base/i40e_type.h | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 646cfd0398..c41dc71cdf 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -1945,6 +1945,7 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_40GBASE_AOC = 0xD, I40E_PHY_TYPE_UNRECOGNIZED = 0xE, I40E_PHY_TYPE_UNSUPPORTED = 0xF, + I40E_PHY_TYPE_10GBASE_ER = 0x10, I40E_PHY_TYPE_100BASE_TX = 0x11, I40E_PHY_TYPE_1000BASE_T = 0x12, I40E_PHY_TYPE_10GBASE_T = 0x13, @@ -1991,6 +1992,7 @@ enum i40e_aq_phy_type { BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC) | \ BIT_ULL(I40E_PHY_TYPE_UNRECOGNIZED) | \ BIT_ULL(I40E_PHY_TYPE_UNSUPPORTED) | \ + BIT_ULL(I40E_PHY_TYPE_10GBASE_ER) | \ BIT_ULL(I40E_PHY_TYPE_100BASE_TX) | \ BIT_ULL(I40E_PHY_TYPE_1000BASE_T) | \ BIT_ULL(I40E_PHY_TYPE_10GBASE_T) | \ diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 2ca6a13e79..e077bf8fd3 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1268,6 +1268,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) enum i40e_media_type media; switch (hw->phy.link_info.phy_type) { + case I40E_PHY_TYPE_10GBASE_ER: case I40E_PHY_TYPE_10GBASE_SR: case I40E_PHY_TYPE_10GBASE_LR: case I40E_PHY_TYPE_1000BASE_SX: diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 0323887550..86b9eeeb43 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -294,6 +294,7 @@ struct i40e_phy_info { #define I40E_CAP_PHY_TYPE_10GBASE_CR1_CU BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1_CU) #define I40E_CAP_PHY_TYPE_10GBASE_AOC BIT_ULL(I40E_PHY_TYPE_10GBASE_AOC) #define I40E_CAP_PHY_TYPE_40GBASE_AOC BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC) +#define I40E_CAP_PHY_TYPE_10GBASE_ER BIT_ULL(I40E_PHY_TYPE_10GBASE_ER) #define I40E_CAP_PHY_TYPE_100BASE_TX BIT_ULL(I40E_PHY_TYPE_100BASE_TX) #define I40E_CAP_PHY_TYPE_1000BASE_T BIT_ULL(I40E_PHY_TYPE_1000BASE_T) #define I40E_CAP_PHY_TYPE_10GBASE_T BIT_ULL(I40E_PHY_TYPE_10GBASE_T) -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 12/15] net/i40e/base: fix headers to match functions 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (10 preceding siblings ...) 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 11/15] net/i40e/base: 10GBASE-ER Optical modules recognition Robin Zhang @ 2021-06-21 7:52 ` Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 13/15] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang ` (2 subsequent siblings) 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:52 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Jesse Brandeburg Fix several kernel-doc warnings when building with W=1. These changes are only to comments. Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 842ea1996335 ("i40e/base: save link module type") Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY") Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722") Cc: stable@dpdk.org Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 10 +++++----- drivers/net/i40e/base/i40e_dcb.c | 2 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index e077bf8fd3..3f3896aea4 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2678,7 +2678,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw, } /** - * i40e_get_vsi_params - get VSI configuration info + * i40e_aq_get_vsi_params - get VSI configuration info * @hw: pointer to the hw struct * @vsi_ctx: pointer to a vsi context struct * @cmd_details: pointer to command details structure or NULL @@ -2939,7 +2939,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up) } /** - * i40e_updatelink_status - update status of the HW network link + * i40e_update_link_info - update status of the HW network link * @hw: pointer to the hw struct **/ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) @@ -4831,7 +4831,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index, } /** - * i40e_aq_get_switch_resource_alloc (0x0204) + * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations * @hw: pointer to the hw struct * @num_entries: pointer to u8 to store the number of resource entries returned * @buf: pointer to a user supplied buffer. This buffer must be large enough @@ -6978,7 +6978,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num) } /** - * i40e_blink_phy_led + * i40e_blink_phy_link_led * @hw: pointer to the HW structure * @time: time how long led will blinks in secs * @interval: gap between LED on and off in msecs @@ -7825,7 +7825,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw, } /** - * i40e_aq_opc_set_ns_proxy_table_entry + * i40e_aq_set_ns_proxy_table_entry * @hw: pointer to the HW structure * @ns_proxy_table_entry: pointer to NS table entry command struct * @cmd_details: pointer to command details diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 27b52bc365..8f9b7e823f 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv, } /** - * i40e_parse_ieee_etsrec_tlv + * i40e_parse_ieee_tlv * @tlv: IEEE 802.1Qaz TLV * @dcbcfg: Local store to update ETS REC data * diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c index d3969396f0..d3bd683ff3 100644 --- a/drivers/net/i40e/base/i40e_lan_hmc.c +++ b/drivers/net/i40e/base/i40e_lan_hmc.c @@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw, } /** - * i40e_delete_hmc_object - remove hmc objects + * i40e_delete_lan_hmc_object - remove hmc objects * @hw: pointer to the HW structure * @info: pointer to i40e_hmc_delete_obj_info struct * diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 561ed21136..67e58cc195 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -7,7 +7,7 @@ #include "i40e_prototype.h" /** - * i40e_init_nvm_ops - Initialize NVM function pointers + * i40e_init_nvm - Initialize NVM function pointers * @hw: pointer to the HW structure * * Setup the function pointers and the NVM info structure. Should be called -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 13/15] net/i40e/base: fix potentially uninitialized variables in NVM code 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (11 preceding siblings ...) 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 12/15] net/i40e/base: fix headers to match functions Robin Zhang @ 2021-06-21 7:52 ` Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 14/15] net/i40e/base: fix checksum is used before return value is checked Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 15/15] net/i40e/base: update version in readme Robin Zhang 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:52 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Christopher Pau The status of i40e_read_nvm_word is not checked, so variables set from this function could be used uninitialized. In this case, preserve the existing flow that does not block initialization by initializing these values from the start. Fixes: 8d6c51fcd24b ("i40e/base: get OEM version") Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only") Cc: stable@dpdk.org Signed-off-by: Christopher Pau <christopher.pau@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index eafacbdbec..d27ccde29a 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -648,8 +648,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) { struct i40e_adminq_info *aq = &hw->aq; enum i40e_status_code ret_code; - u16 cfg_ptr, oem_hi, oem_lo; - u16 eetrack_lo, eetrack_hi; + u16 oem_hi = 0, oem_lo = 0; + u16 eetrack_hi = 0; + u16 eetrack_lo = 0; + u16 cfg_ptr = 0; int retry = 0; /* verify input for valid configuration */ -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 14/15] net/i40e/base: fix checksum is used before return value is checked 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (12 preceding siblings ...) 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 13/15] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang @ 2021-06-21 7:52 ` Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 15/15] net/i40e/base: update version in readme Robin Zhang 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:52 UTC (permalink / raw) To: dev Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable, Christopher Pau The variable checksum from i40e_calc_nvm_checksum is used before return value is checked. Fix this logic. Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM") Cc: stable@dpdk.org Signed-off-by: Christopher Pau <christopher.pau@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_nvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 67e58cc195..f385042601 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw) DEBUGFUNC("i40e_update_nvm_checksum"); ret_code = i40e_calc_nvm_checksum(hw, &checksum); - le_sum = CPU_TO_LE16(checksum); - if (ret_code == I40E_SUCCESS) + if (ret_code == I40E_SUCCESS) { + le_sum = CPU_TO_LE16(checksum); ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD, 1, &le_sum, true); + } return ret_code; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v3 15/15] net/i40e/base: update version in readme 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang ` (13 preceding siblings ...) 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 14/15] net/i40e/base: fix checksum is used before return value is checked Robin Zhang @ 2021-06-21 7:52 ` Robin Zhang 14 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-06-21 7:52 UTC (permalink / raw) To: dev; +Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang Update base code version in README. Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README index 6af2993116..c84764005b 100644 --- a/drivers/net/i40e/base/README +++ b/drivers/net/i40e/base/README @@ -6,7 +6,7 @@ Intel® I40E driver ================== This directory contains source code of FreeBSD i40e driver of version -cid-i40e.2020.08.27.tar.gz released by the team which develops +cid-i40e.2021.04.29.tar.gz released by the team which develops basic drivers for any i40e NIC. The directory of base/ contains the original source package. This driver is valid for the product(s) listed below -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 00/18] i40e base code update 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (15 preceding siblings ...) 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 01/18] net/i40e/base: add new versions of send ASQ command functions Robin Zhang ` (19 more replies) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang 18 siblings, 20 replies; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang update i40e base code. source code of i40e driver: cid-i40e.2021.08.16.tar.gz changelog in i40e share repo: From 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") To 2c7aab559654 ("i40e-shared: Add defines related to DDP") The following commits are ignored: cb9139e3bce8 ("i40e-shared: Fix not blinking X722 with x557 PHY via ‘ethtool -p'") c09d4f9cf390 ("i40e-shared: i40e-shared: Fix build warning -Wformat related to integer size") ff8a1abc6c17 ("i40e-shared: Fix build warning with __packed") 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") v4: - update base code to cid-i40e.2021.08.16 v3: - there has a fix patch contains two issues, split it into two patches v2: - refine commit messages and macro name Robin Zhang (18): net/i40e/base: add new versions of send ASQ command functions net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules net/i40e/base: set TSA table values when parsing CEE configuration net/i40e/base: define new Shadow RAM pointers net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters net/i40e/base: fix PF reset failed net/i40e/base: fix update link data for X722 net/i40e/base: fix AOC media type reported by ethtool net/i40e/base: add flags and fields for double vlan processing net/i40e/base: fix headers to match functions net/i40e/base: fix potentially uninitialized variables in NVM code net/i40e/base: fix checksum is used before return value is checked net/i40e/base: add defs for MAC frequency calculation if no link net/i40e/base: separate kernel allocated rx_bi rings from AF_XDP rings net/i40e/base: Update FVL FW API version to 1.15 net/i40e/base: add defines related to DDP net/i40e/base: update version in readme net/i40e: fix redefinition warning drivers/net/i40e/base/README | 2 +- drivers/net/i40e/base/i40e_adminq.c | 79 +++++++++-- drivers/net/i40e/base/i40e_adminq_cmd.h | 55 ++++++-- drivers/net/i40e/base/i40e_common.c | 175 +++++++++++++++++++----- drivers/net/i40e/base/i40e_dcb.c | 10 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 7 +- drivers/net/i40e/base/i40e_prototype.h | 17 +++ drivers/net/i40e/base/i40e_register.h | 10 ++ drivers/net/i40e/base/i40e_type.h | 26 +++- drivers/net/i40e/i40e_ethdev.c | 3 +- 11 files changed, 318 insertions(+), 68 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 01/18] net/i40e/base: add new versions of send ASQ command functions 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-29 16:21 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 02/18] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules Robin Zhang ` (18 subsequent siblings) 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, Sylwester Dziedziuch ASQ send command functions are returning only i40e status codes yet some calling functions also need Admin Queue status that is stored in hw->aq.asq_last_status. Since hw object is stored on a heap it introduces a possibility for a race condition in access to hw if calling function is not fast enough to read hw->aq.asq_last_status before next send ASQ command is executed. Added new versions of send ASQ command functions that return Admin Queue status on the stack to avoid race conditions in access to hw->aq.asq_last_status. Added new _v2 version of i40e_aq_remove_macvlan and i40e_aq_add_macvlan that is using new _v2 versions of ASQ send command functions and returns the Admin Queue status on the stack. Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 73 +++++++++++-- drivers/net/i40e/base/i40e_common.c | 139 ++++++++++++++++++++++--- drivers/net/i40e/base/i40e_prototype.h | 17 +++ 3 files changed, 205 insertions(+), 24 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 0da45f03e4..eafacbdbec 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -834,7 +834,7 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) } /** - * i40e_asq_send_command - send command to Admin Queue + * i40e_asq_send_command_exec - send command to Admin Queue * @hw: pointer to the hw struct * @desc: prefilled descriptor describing the command (non DMA mem) * @buff: buffer to use for indirect commands @@ -844,11 +844,12 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) * This is the main send command driver routine for the Admin Queue send * queue. It runs the queue, cleans the queue, etc **/ -enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, - struct i40e_aq_desc *desc, - void *buff, /* can be NULL */ - u16 buff_size, - struct i40e_asq_cmd_details *cmd_details) +STATIC enum i40e_status_code +i40e_asq_send_command_exec(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) { enum i40e_status_code status = I40E_SUCCESS; struct i40e_dma_mem *dma_buff = NULL; @@ -858,8 +859,6 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, u16 retval = 0; u32 val = 0; - i40e_acquire_spinlock(&hw->aq.asq_spinlock); - hw->aq.asq_last_status = I40E_AQ_RC_OK; if (hw->aq.asq.count == 0) { @@ -1042,6 +1041,64 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, } asq_send_command_error: + return status; +} + +/** + * i40e_asq_send_command - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * + * Acquires the lock and calls the main send command execution + * routine. + **/ +enum i40e_status_code +i40e_asq_send_command(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + i40e_release_spinlock(&hw->aq.asq_spinlock); + return status; +} + +/** + * i40e_asq_send_command_v2 - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * @aq_status: pointer to Admin Queue status return value + * + * Acquires the lock and calls the main send command execution + * routine. Returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + **/ +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + if (aq_status) + *aq_status = hw->aq.asq_last_status; i40e_release_spinlock(&hw->aq.asq_spinlock); return status; } diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index e20bb9ac35..32642f3e2b 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -3114,6 +3114,46 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, return status; } +/** + * i40e_prepare_add_macvlan + * @mv_list: list of macvlans to be added + * @desc: pointer to AQ descriptor structure + * @count: length of the list + * @seid: VSI for the mac address + * + * Internal helper function that prepares the add macvlan request + * and returns the buffer size. + **/ +static u16 +i40e_prepare_add_macvlan(struct i40e_aqc_add_macvlan_element_data *mv_list, + struct i40e_aq_desc *desc, u16 count, u16 seid) +{ + struct i40e_aqc_macvlan *cmd = + (struct i40e_aqc_macvlan *)&desc->params.raw; + u16 buf_size; + int i; + + buf_size = count * sizeof(*mv_list); + + /* prep the rest of the request */ + i40e_fill_default_direct_cmd_desc(desc, i40e_aqc_opc_add_macvlan); + cmd->num_addresses = CPU_TO_LE16(count); + cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); + cmd->seid[1] = 0; + cmd->seid[2] = 0; + + for (i = 0; i < count; i++) + if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) + mv_list[i].flags |= + CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); + + desc->flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); + if (buf_size > I40E_AQ_LARGE_BUF) + desc->flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); + + return buf_size; +} + /** * i40e_aq_add_macvlan * @hw: pointer to the hw struct @@ -3124,8 +3164,74 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, * * Add MAC/VLAN addresses to the HW filtering **/ -enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_add_macvlan_element_data *mv_list, +enum i40e_status_code +i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, + cmd_details); + + return status; +} + +/** + * i40e_aq_add_macvlan_v2 + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be added + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value + * + * Add MAC/VLAN addresses to the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. + **/ +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); + + return status; +} + +/** + * i40e_aq_remove_macvlan + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be removed + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * + * Remove MAC/VLAN addresses from the HW filtering + **/ +enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details) { struct i40e_aq_desc desc; @@ -3133,7 +3239,6 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, (struct i40e_aqc_macvlan *)&desc.params.raw; enum i40e_status_code status; u16 buf_size; - int i; if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; @@ -3141,17 +3246,12 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_macvlan); + i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan); cmd->num_addresses = CPU_TO_LE16(count); cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); cmd->seid[1] = 0; cmd->seid[2] = 0; - for (i = 0; i < count; i++) - if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) - mv_list[i].flags |= - CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); - desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); @@ -3163,18 +3263,25 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, } /** - * i40e_aq_remove_macvlan + * i40e_aq_remove_macvlan_v2 * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be removed * @count: length of the list * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value * - * Remove MAC/VLAN addresses from the HW filtering + * Remove MAC/VLAN addresses from the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. **/ -enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_remove_macvlan_element_data *mv_list, - u16 count, struct i40e_asq_cmd_details *cmd_details) +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) { struct i40e_aq_desc desc; struct i40e_aqc_macvlan *cmd = @@ -3198,8 +3305,8 @@ enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, - cmd_details); + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); return status; } diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h index 124222e476..29c86c7fe8 100644 --- a/drivers/net/i40e/base/i40e_prototype.h +++ b/drivers/net/i40e/base/i40e_prototype.h @@ -38,6 +38,13 @@ 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); +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); #ifdef VF_DRIVER bool i40e_asq_done(struct i40e_hw *hw); #endif @@ -188,9 +195,19 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_add_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_add_mirrorrule(struct i40e_hw *hw, u16 sw_seid, u16 rule_type, u16 dest_vsi, u16 count, __le16 *mr_list, struct i40e_asq_cmd_details *cmd_details, -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 01/18] net/i40e/base: add new versions of send ASQ command functions 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 01/18] net/i40e/base: add new versions of send ASQ command functions Robin Zhang @ 2021-09-29 16:21 ` Ferruh Yigit 0 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw) To: Robin Zhang, dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Sylwester Dziedziuch On 9/6/2021 3:02 AM, Robin Zhang wrote: > ASQ send command functions are returning only i40e status codes > yet some calling functions also need Admin Queue status > that is stored in hw->aq.asq_last_status. Since hw object > is stored on a heap it introduces a possibility for > a race condition in access to hw if calling function is not > fast enough to read hw->aq.asq_last_status before next > send ASQ command is executed. > > Added new versions of send ASQ command functions that return > Admin Queue status on the stack to avoid race conditions > in access to hw->aq.asq_last_status. > Added new _v2 version of i40e_aq_remove_macvlan and i40e_aq_add_macvlan > that is using new _v2 versions of ASQ send command functions and > returns the Admin Queue status on the stack. > > Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> I assume ASQ is "Admin Send Queue" (although datasheet refers to it as ATQ), can you please give the long version of the abbreviations in the commit log in first usage as: "ASQ (Admin Send Queue) ... " ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 02/18] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 01/18] net/i40e/base: add new versions of send ASQ command functions Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-29 16:21 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 03/18] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang ` (17 subsequent siblings) 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak This change increments X722 API version and adds new constants related to the extended implementation of Security Version Opt-In. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 2ca41db5d3..a96527f31c 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -12,7 +12,7 @@ */ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR_X722 0x000B +#define I40E_FW_API_VERSION_MINOR_X722 0x000C #define I40E_FW_API_VERSION_MINOR_X710 0x000C #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ @@ -2425,11 +2425,15 @@ struct i40e_aqc_rollback_revision_update { u8 optin_mode; /* bool */ #define I40E_AQ_RREV_OPTION_MODE 0x01 u8 module_selected; -#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 -#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 -#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 -#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 -#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 +#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 +#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 +#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 +#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PHY_PLL_O_CONFIGURATION 5 +#define I40E_AQ_RREV_MODULE_PHY_0_CONFIGURATION 6 +#define I40E_AQ_RREV_MODULE_PHY_PLL_1_CONFIGURATION 7 +#define I40E_AQ_RREV_MODULE_PHY_1_CONFIGURATION 8 u8 reserved1[2]; u32 min_rrev; u8 reserved2[8]; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 02/18] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 02/18] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules Robin Zhang @ 2021-09-29 16:21 ` Ferruh Yigit 0 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw) To: Robin Zhang, dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Stanislaw Grzeszczak On 9/6/2021 3:02 AM, Robin Zhang wrote: > This change increments X722 API version and adds new constants related to > the extended implementation of Security Version Opt-In. > There are new 'I40E_AQ_RREV_MODULE_PHY_*' macros, what is their relation with "Security Version Opt-In"? Also title mentions "Min Rollback Revision for 4 more X722 modules", is this referred 4 more modules are 'I40E_AQ_RREV_MODULE_PHY_*', is added macros for "Security Version Opt-In" or "Min Rollback Revision"? And what does "Min Rollback Revision" mean? And why first letters of words are upper case? Overall can you please add a little more clarification to the commit log? > Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> > --- > drivers/net/i40e/base/i40e_adminq_cmd.h | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h > index 2ca41db5d3..a96527f31c 100644 > --- a/drivers/net/i40e/base/i40e_adminq_cmd.h > +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h > @@ -12,7 +12,7 @@ > */ > > #define I40E_FW_API_VERSION_MAJOR 0x0001 > -#define I40E_FW_API_VERSION_MINOR_X722 0x000B > +#define I40E_FW_API_VERSION_MINOR_X722 0x000C > #define I40E_FW_API_VERSION_MINOR_X710 0x000C > > #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ > @@ -2425,11 +2425,15 @@ struct i40e_aqc_rollback_revision_update { > u8 optin_mode; /* bool */ > #define I40E_AQ_RREV_OPTION_MODE 0x01 > u8 module_selected; > -#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 > -#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 > -#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 > -#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 > -#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 > +#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 > +#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 > +#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 > +#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 > +#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 > +#define I40E_AQ_RREV_MODULE_PHY_PLL_O_CONFIGURATION 5 > +#define I40E_AQ_RREV_MODULE_PHY_0_CONFIGURATION 6 > +#define I40E_AQ_RREV_MODULE_PHY_PLL_1_CONFIGURATION 7 > +#define I40E_AQ_RREV_MODULE_PHY_1_CONFIGURATION 8 > u8 reserved1[2]; > u32 min_rrev; > u8 reserved2[8]; > ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 03/18] net/i40e/base: set TSA table values when parsing CEE configuration 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 01/18] net/i40e/base: add new versions of send ASQ command functions Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 02/18] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-29 16:21 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 04/18] net/i40e/base: define new Shadow RAM pointers Robin Zhang ` (16 subsequent siblings) 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, Pawel Malinowski Driver did not Set TSA table values when parsing CEE configuration obtained from FW. Signed-off-by: Pawel Malinowski <pawel.malinowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_dcb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 388af3d64d..27b52bc365 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -315,9 +315,15 @@ static void i40e_parse_cee_pgcfg_tlv(struct i40e_cee_feat_tlv *tlv, * |pg0|pg1|pg2|pg3|pg4|pg5|pg6|pg7| * --------------------------------- */ - for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) + for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) { etscfg->tcbwtable[i] = buf[offset++]; + if (etscfg->prioritytable[i] == I40E_CEE_PGID_STRICT) + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_STRICT; + else + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_ETS; + } + /* Number of TCs supported (1 octet) */ etscfg->maxtcs = buf[offset]; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 03/18] net/i40e/base: set TSA table values when parsing CEE configuration 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 03/18] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang @ 2021-09-29 16:21 ` Ferruh Yigit 0 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw) To: Robin Zhang, dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Pawel Malinowski On 9/6/2021 3:02 AM, Robin Zhang wrote: > Driver did not Set TSA table values when parsing CEE configuration > obtained from FW. > > Signed-off-by: Pawel Malinowski <pawel.malinowski@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> Can you please long version of the 'TSA' & 'CEE' abbreviations in the commit log? There are more in other commits and I won't comment on all, please update same on all commits. ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 04/18] net/i40e/base: define new Shadow RAM pointers 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (2 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 03/18] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-29 16:21 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang ` (15 subsequent siblings) 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak Add definitions for Shadow RAM pointers: 6th FPA module, 5th FPA module in X722 and Preservation Rules Module. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index cf41345834..e5a3729183 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -1555,6 +1555,9 @@ struct i40e_hw_port_stats { #define I40E_SR_FEATURE_CONFIGURATION_PTR 0x49 #define I40E_SR_CONFIGURATION_METADATA_PTR 0x4D #define I40E_SR_IMMEDIATE_VALUES_PTR 0x4E +#define I40E_SR_PRESERVATION_RULES_PTR 0x70 +#define I40E_X722_SR_5TH_FREE_PROVISION_AREA_PTR 0x71 +#define I40E_SR_6TH_FREE_PROVISION_AREA_PTR 0x71 /* Auxiliary field, mask and shift definition for Shadow RAM and NVM Flash */ #define I40E_SR_VPD_MODULE_MAX_SIZE 1024 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 04/18] net/i40e/base: define new Shadow RAM pointers 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 04/18] net/i40e/base: define new Shadow RAM pointers Robin Zhang @ 2021-09-29 16:21 ` Ferruh Yigit 0 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw) To: Robin Zhang, dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Stanislaw Grzeszczak On 9/6/2021 3:02 AM, Robin Zhang wrote: > Add definitions for Shadow RAM pointers: 6th FPA module, 5th FPA module > in X722 and Preservation Rules Module. > > Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> Can you please update patch title to use all lowercase except abbreviations, like s/Shadow RAM/shadow RAM/ A brief explanation in the commit log on what is shadow RAM pointer and what does it mean adding new ones? ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (3 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 04/18] net/i40e/base: define new Shadow RAM pointers Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-29 16:21 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 06/18] net/i40e/base: fix PF reset failed Robin Zhang ` (14 subsequent siblings) 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski Unlike other supported adapters, 2.5G and 5G use different PHY type identifiers for reading/writing PHY settings and for reading link status. This commit intruduces separate PHY identifiers for these two operation types. Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++-- drivers/net/i40e/base/i40e_common.c | 4 ++-- drivers/net/i40e/base/i40e_type.h | 8 ++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index a96527f31c..af9dec1d7f 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_25GBASE_LR = 0x22, I40E_PHY_TYPE_25GBASE_AOC = 0x23, I40E_PHY_TYPE_25GBASE_ACC = 0x24, - I40E_PHY_TYPE_2_5GBASE_T = 0x30, - I40E_PHY_TYPE_5GBASE_T = 0x31, + I40E_PHY_TYPE_2_5GBASE_T = 0x26, + I40E_PHY_TYPE_5GBASE_T = 0x27, + I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS = 0x30, + I40E_PHY_TYPE_5GBASE_T_LINK_STATUS = 0x31, I40E_PHY_TYPE_MAX, I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD, I40E_PHY_TYPE_EMPTY = 0xFE, diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 32642f3e2b..ceedec68bf 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) break; case I40E_PHY_TYPE_100BASE_TX: case I40E_PHY_TYPE_1000BASE_T: - case I40E_PHY_TYPE_2_5GBASE_T: - case I40E_PHY_TYPE_5GBASE_T: + case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS: + case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS: case I40E_PHY_TYPE_10GBASE_T: media = I40E_MEDIA_TYPE_BASET; break; diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index e5a3729183..0323887550 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -329,12 +329,8 @@ struct i40e_phy_info { I40E_PHY_TYPE_OFFSET) #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \ I40E_PHY_TYPE_OFFSET) -/* Offset for 2.5G/5G PHY Types value to bit number conversion */ -#define I40E_PHY_TYPE_OFFSET2 (-10) -#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) -#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) +#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T) +#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T) #define I40E_HW_CAP_MAX_GPIO 30 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang @ 2021-09-29 16:21 ` Ferruh Yigit 0 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw) To: Robin Zhang, dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, stable, Dawid Lukwinski On 9/6/2021 3:02 AM, Robin Zhang wrote: > Unlike other supported adapters, 2.5G and 5G use different > PHY type identifiers for reading/writing PHY settings > and for reading link status. This commit intruduces s/intruduces/introduces/ > separate PHY identifiers for these two operation types. > > Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device") > Cc: stable@dpdk.org > > Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 06/18] net/i40e/base: fix PF reset failed 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (4 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-29 16:21 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 07/18] net/i40e/base: fix update link data for X722 Robin Zhang ` (13 subsequent siblings) 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, stable, Sylwester Dziedziuch PF has to delete all the filters during reset. If it is fully loaded with filters then it is possible that it will take more than 200 ms to finish the reset resulting in timeout during pf_reset and PF reset failed, -15 error indication. Increasing the timeout value for PF reset from 200 to 1000 to give PF more time to finish reset if it is loaded with filters. Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit") Cc: stable@dpdk.org Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ceedec68bf..aa424e6010 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw, return I40E_ERR_RESET_FAILED; } -#define I40E_PF_RESET_WAIT_COUNT 200 +#define I40E_PF_RESET_WAIT_COUNT 1000 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v4 06/18] net/i40e/base: fix PF reset failed 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 06/18] net/i40e/base: fix PF reset failed Robin Zhang @ 2021-09-29 16:21 ` Ferruh Yigit 0 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw) To: Robin Zhang, dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, stable, Sylwester Dziedziuch On 9/6/2021 3:02 AM, Robin Zhang wrote: > PF has to delete all the filters during reset. > If it is fully loaded with filters then it is possible > that it will take more than 200 ms to finish the reset > resulting in timeout during pf_reset and > PF reset failed, -15 error indication. > Increasing the timeout value for PF reset from 200 to 1000 > to give PF more time to finish reset if it is loaded with filters. > > Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit") > Cc: stable@dpdk.org > > Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> What do you think updating patch title as: net/i40e/base: fix PF reset ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 07/18] net/i40e/base: fix update link data for X722 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (5 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 06/18] net/i40e/base: fix PF reset failed Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang ` (12 subsequent siblings) 19 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, stable, Jaroslaw Gawin The X722 card has 'Link Type' information elsewhere than the X710. Previously, for all cards, the 'Link Type' information was retrieved by opcode 0x0607 and this value was wrong for all X722 cards. Now this information for X722 only is taken by opcode 0x0600 (function: i40e_aq_get_phy_capabilities) instead of an opcode 0x0607 (function: i40e_aq_get_link_info). All other parameters read by opcode 0x0607 unchanged. Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction") Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time") Cc: stable@dpdk.org Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index aa424e6010..ef061a6b63 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw, hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; + /* 'Get Link Status' response data structure from X722 FW has + * different format and does not contain this information + */ if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE && hw->mac.type != I40E_MAC_X722) { __le32 tmp; @@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) return status; /* extra checking needed to ensure link info to user is timely */ - if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && - ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || - !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) { - status = i40e_aq_get_phy_capabilities(hw, false, false, + if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && + ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || + !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) || + hw->mac.type == I40E_MAC_X722) { + status = i40e_aq_get_phy_capabilities(hw, false, + hw->mac.type == + I40E_MAC_X722, &abilities, NULL); if (status) return status; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (6 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 07/18] net/i40e/base: fix update link data for X722 Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-29 16:21 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 09/18] net/i40e/base: add flags and fields for double vlan processing Robin Zhang ` (11 subsequent siblings) 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski For Active Optical Cable (AOC) the correct media type is "Fibre", not "Direct Attach Copper". Fixes: d749d4d89969 ("i40e/base: add AOC PHY types") Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and ACC") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ef061a6b63..2ca6a13e79 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_40GBASE_LR4: case I40E_PHY_TYPE_25GBASE_LR: case I40E_PHY_TYPE_25GBASE_SR: + case I40E_PHY_TYPE_10GBASE_AOC: + case I40E_PHY_TYPE_25GBASE_AOC: + case I40E_PHY_TYPE_40GBASE_AOC: media = I40E_MEDIA_TYPE_FIBER; break; case I40E_PHY_TYPE_100BASE_TX: @@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_10GBASE_CR1: case I40E_PHY_TYPE_40GBASE_CR4: case I40E_PHY_TYPE_10GBASE_SFPP_CU: - case I40E_PHY_TYPE_40GBASE_AOC: - case I40E_PHY_TYPE_10GBASE_AOC: case I40E_PHY_TYPE_25GBASE_CR: - case I40E_PHY_TYPE_25GBASE_AOC: case I40E_PHY_TYPE_25GBASE_ACC: media = I40E_MEDIA_TYPE_DA; break; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang @ 2021-09-29 16:21 ` Ferruh Yigit 0 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw) To: Robin Zhang, dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, stable, Dawid Lukwinski On 9/6/2021 3:02 AM, Robin Zhang wrote: > For Active Optical Cable (AOC) the correct media type is "Fibre", > not "Direct Attach Copper". > > Fixes: d749d4d89969 ("i40e/base: add AOC PHY types") > Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and > ACC") > Cc: stable@dpdk.org > > Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> I don't think the update in the dpdk is related to the ethtool, can you please update the patch title accordingly? ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 09/18] net/i40e/base: add flags and fields for double vlan processing 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (7 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-29 16:22 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 10/18] net/i40e/base: fix headers to match functions Robin Zhang ` (10 subsequent siblings) 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, Przemyslaw Patynowski Add flags for outer vlan and include set port parameters in Linux compilation. Add flags, which describe port and switch state for both double vlan functionality and outer vlan processing. Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index af9dec1d7f..372dd71c3f 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -768,6 +768,7 @@ struct i40e_aqc_set_switch_config { #define I40E_AQ_SET_SWITCH_CFG_PROMISC 0x0001 #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER 0x0002 #define I40E_AQ_SET_SWITCH_CFG_HW_ATR_EVICT 0x0004 +#define I40E_AQ_SET_SWITCH_CFG_OUTER_VLAN 0x0008 __le16 valid_flags; /* The ethertype in switch_tag is dropped on ingress and used * internally by the switch. Set this to zero for the default @@ -904,7 +905,7 @@ struct i40e_aqc_vsi_properties_data { u8 sec_reserved; /* VLAN section */ __le16 pvid; /* VLANS include priority bits */ - __le16 fcoe_pvid; + __le16 outer_vlan; u8 port_vlan_flags; #define I40E_AQ_VSI_PVLAN_MODE_SHIFT 0x00 #define I40E_AQ_VSI_PVLAN_MODE_MASK (0x03 << \ @@ -920,7 +921,24 @@ struct i40e_aqc_vsi_properties_data { #define I40E_AQ_VSI_PVLAN_EMOD_STR_UP 0x08 #define I40E_AQ_VSI_PVLAN_EMOD_STR 0x10 #define I40E_AQ_VSI_PVLAN_EMOD_NOTHING 0x18 - u8 pvlan_reserved[3]; + u8 outer_vlan_flags; +#define I40E_AQ_VSI_OVLAN_MODE_SHIFT 0x00 +#define I40E_AQ_VSI_OVLAN_MODE_MASK (0x03 << \ + I40E_AQ_VSI_OVLAN_MODE_SHIFT) +#define I40E_AQ_VSI_OVLAN_MODE_UNTAGGED 0x01 +#define I40E_AQ_VSI_OVLAN_MODE_TAGGED 0x02 +#define I40E_AQ_VSI_OVLAN_MODE_ALL 0x03 +#define I40E_AQ_VSI_OVLAN_INSERT_PVID 0x04 +#define I40E_AQ_VSI_OVLAN_EMOD_SHIFT 0x03 +#define I40E_AQ_VSI_OVLAN_EMOD_MASK (0x03 <<\ + I40E_AQ_VSI_OVLAN_EMOD_SHIFT) +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_ALL 0x00 +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_UP 0x01 +#define I40E_AQ_VSI_OVLAN_EMOD_HIDE_ALL 0x02 +#define I40E_AQ_VSI_OVLAN_EMOD_NOTHING 0x03 +#define I40E_AQ_VSI_OVLAN_CTRL_ENA 0x04 + + u8 pvlan_reserved[2]; /* ingress egress up sections */ __le32 ingress_table; /* bitmap, 3 bits per up */ #define I40E_AQ_VSI_UP_TABLE_UP0_SHIFT 0 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 09/18] net/i40e/base: add flags and fields for double vlan processing 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 09/18] net/i40e/base: add flags and fields for double vlan processing Robin Zhang @ 2021-09-29 16:22 ` Ferruh Yigit 0 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 16:22 UTC (permalink / raw) To: Robin Zhang, dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Przemyslaw Patynowski On 9/6/2021 3:02 AM, Robin Zhang wrote: > Add flags for outer vlan and include set port parameters in Linux > compilation. Isn't this a shared code drop, why it has changes specific to Linux compilation? > Add flags, which describe port and switch state for both double vlan > functionality and outer vlan processing. > > Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 10/18] net/i40e/base: fix headers to match functions 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (8 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 09/18] net/i40e/base: add flags and fields for double vlan processing Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-29 15:59 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 11/18] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang ` (9 subsequent siblings) 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, stable, Jesse Brandeburg Fix several kernel-doc warnings when building with W=1. These changes are only to comments. Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 842ea1996335 ("i40e/base: save link module type") Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY") Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722") Cc: stable@dpdk.org Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 10 +++++----- drivers/net/i40e/base/i40e_dcb.c | 2 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 2ca6a13e79..baa51e1396 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2677,7 +2677,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw, } /** - * i40e_get_vsi_params - get VSI configuration info + * i40e_aq_get_vsi_params - get VSI configuration info * @hw: pointer to the hw struct * @vsi_ctx: pointer to a vsi context struct * @cmd_details: pointer to command details structure or NULL @@ -2938,7 +2938,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up) } /** - * i40e_updatelink_status - update status of the HW network link + * i40e_update_link_info - update status of the HW network link * @hw: pointer to the hw struct **/ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) @@ -4830,7 +4830,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index, } /** - * i40e_aq_get_switch_resource_alloc (0x0204) + * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations * @hw: pointer to the hw struct * @num_entries: pointer to u8 to store the number of resource entries returned * @buf: pointer to a user supplied buffer. This buffer must be large enough @@ -6977,7 +6977,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num) } /** - * i40e_blink_phy_led + * i40e_blink_phy_link_led * @hw: pointer to the HW structure * @time: time how long led will blinks in secs * @interval: gap between LED on and off in msecs @@ -7824,7 +7824,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw, } /** - * i40e_aq_opc_set_ns_proxy_table_entry + * i40e_aq_set_ns_proxy_table_entry * @hw: pointer to the HW structure * @ns_proxy_table_entry: pointer to NS table entry command struct * @cmd_details: pointer to command details diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 27b52bc365..8f9b7e823f 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv, } /** - * i40e_parse_ieee_etsrec_tlv + * i40e_parse_ieee_tlv * @tlv: IEEE 802.1Qaz TLV * @dcbcfg: Local store to update ETS REC data * diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c index d3969396f0..d3bd683ff3 100644 --- a/drivers/net/i40e/base/i40e_lan_hmc.c +++ b/drivers/net/i40e/base/i40e_lan_hmc.c @@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw, } /** - * i40e_delete_hmc_object - remove hmc objects + * i40e_delete_lan_hmc_object - remove hmc objects * @hw: pointer to the HW structure * @info: pointer to i40e_hmc_delete_obj_info struct * diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 561ed21136..67e58cc195 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -7,7 +7,7 @@ #include "i40e_prototype.h" /** - * i40e_init_nvm_ops - Initialize NVM function pointers + * i40e_init_nvm - Initialize NVM function pointers * @hw: pointer to the HW structure * * Setup the function pointers and the NVM info structure. Should be called -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 10/18] net/i40e/base: fix headers to match functions 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 10/18] net/i40e/base: fix headers to match functions Robin Zhang @ 2021-09-29 15:59 ` Ferruh Yigit 0 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 15:59 UTC (permalink / raw) To: Robin Zhang, dev, Stillwell Jr, Paul M Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, stable, Jesse Brandeburg On 9/6/2021 3:02 AM, Robin Zhang wrote: > Fix several kernel-doc warnings when building with W=1. These changes > are only to comments. > Same here, why shared code drop has Linux kernel specific updates? > Fixes: 8db9e2a1b232 ("i40e: base driver") > Fixes: 842ea1996335 ("i40e/base: save link module type") > Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY") > Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722") > Cc: stable@dpdk.org > > Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 11/18] net/i40e/base: fix potentially uninitialized variables in NVM code 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (9 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 10/18] net/i40e/base: fix headers to match functions Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 12/18] net/i40e/base: fix checksum is used before return value is checked Robin Zhang ` (8 subsequent siblings) 19 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, stable, Christopher Pau The status of i40e_read_nvm_word is not checked, so variables set from this function could be used uninitialized. In this case, preserve the existing flow that does not block initialization by initializing these values from the start. Fixes: 8d6c51fcd24b ("i40e/base: get OEM version") Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only") Cc: stable@dpdk.org Signed-off-by: Christopher Pau <christopher.pau@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index eafacbdbec..d27ccde29a 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -648,8 +648,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) { struct i40e_adminq_info *aq = &hw->aq; enum i40e_status_code ret_code; - u16 cfg_ptr, oem_hi, oem_lo; - u16 eetrack_lo, eetrack_hi; + u16 oem_hi = 0, oem_lo = 0; + u16 eetrack_hi = 0; + u16 eetrack_lo = 0; + u16 cfg_ptr = 0; int retry = 0; /* verify input for valid configuration */ -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 12/18] net/i40e/base: fix checksum is used before return value is checked 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (10 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 11/18] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 13/18] net/i40e/base: add defs for MAC frequency calculation if no link Robin Zhang ` (7 subsequent siblings) 19 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, stable, Christopher Pau The variable checksum from i40e_calc_nvm_checksum is used before return value is checked. Fix this logic. Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM") Cc: stable@dpdk.org Signed-off-by: Christopher Pau <christopher.pau@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_nvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 67e58cc195..f385042601 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw) DEBUGFUNC("i40e_update_nvm_checksum"); ret_code = i40e_calc_nvm_checksum(hw, &checksum); - le_sum = CPU_TO_LE16(checksum); - if (ret_code == I40E_SUCCESS) + if (ret_code == I40E_SUCCESS) { + le_sum = CPU_TO_LE16(checksum); ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD, 1, &le_sum, true); + } return ret_code; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 13/18] net/i40e/base: add defs for MAC frequency calculation if no link 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (11 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 12/18] net/i40e/base: fix checksum is used before return value is checked Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 14/18] net/i40e/base: separate kernel allocated rx_bi rings from AF_XDP rings Robin Zhang ` (6 subsequent siblings) 19 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, Piotr Kwapulinski Add macros and structures for MAC frequency calculation in case the link is not present. Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 9 +++++++++ drivers/net/i40e/base/i40e_register.h | 10 ++++++++++ drivers/net/i40e/base/i40e_type.h | 8 ++++++++ 3 files changed, 27 insertions(+) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 372dd71c3f..d2615705a9 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -2035,6 +2035,15 @@ enum i40e_aq_link_speed { I40E_LINK_SPEED_25GB = (1 << I40E_LINK_SPEED_25GB_SHIFT), }; +enum i40e_prt_mac_pcs_link_speed { + I40E_PRT_MAC_PCS_LINK_SPEED_UNKNOWN = 0, + I40E_PRT_MAC_PCS_LINK_SPEED_100MB, + I40E_PRT_MAC_PCS_LINK_SPEED_1GB, + I40E_PRT_MAC_PCS_LINK_SPEED_10GB, + I40E_PRT_MAC_PCS_LINK_SPEED_40GB, + I40E_PRT_MAC_PCS_LINK_SPEED_20GB +}; + struct i40e_aqc_module_desc { u8 oui[3]; u8 reserved1; diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h index ee4f333f9c..75eff845f1 100644 --- a/drivers/net/i40e/base/i40e_register.h +++ b/drivers/net/i40e/base/i40e_register.h @@ -1411,6 +1411,11 @@ #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE1_MASK I40E_MASK(0x3, I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE1_SHIFT) #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_SHIFT 14 #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_MASK I40E_MASK(0x3, I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_SHIFT) +/* _i=0...3 */ /* Reset: GLOBR */ +#define I40E_PRTMAC_PCS_LINK_STATUS1(_i) (0x0008C200 + ((_i) * 4)) +#define I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_SHIFT 24 +#define I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_MASK \ + I40E_MASK(0x7, I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_SHIFT) #define I40E_GL_FWRESETCNT 0x00083100 /* Reset: POR */ #define I40E_GL_FWRESETCNT_FWRESETCNT_SHIFT 0 #define I40E_GL_FWRESETCNT_FWRESETCNT_MASK I40E_MASK(0xFFFFFFFF, I40E_GL_FWRESETCNT_FWRESETCNT_SHIFT) @@ -3873,6 +3878,11 @@ #define I40E_PRTMAC_LINK_DOWN_COUNTER 0x001E2440 /* Reset: GLOBR */ #define I40E_PRTMAC_LINK_DOWN_COUNTER_LINK_DOWN_COUNTER_SHIFT 0 #define I40E_PRTMAC_LINK_DOWN_COUNTER_LINK_DOWN_COUNTER_MASK I40E_MASK(0xFFFF, I40E_PRTMAC_LINK_DOWN_COUNTER_LINK_DOWN_COUNTER_SHIFT) +/* _i=0...3 */ /* Reset: GLOBR */ +#define I40E_PRTMAC_LINKSTA(_i) (0x001E2420 + ((_i) * 4)) +#define I40E_PRTMAC_LINKSTA_MAC_LINK_SPEED_SHIFT 27 +#define I40E_PRTMAC_LINKSTA_MAC_LINK_SPEED_MASK \ + I40E_MASK(0x7, I40E_PRTMAC_LINKSTA_MAC_LINK_SPEED_SHIFT) #define I40E_GLNVM_AL_REQ 0x000B6164 /* Reset: POR */ #define I40E_GLNVM_AL_REQ_POR_SHIFT 0 #define I40E_GLNVM_AL_REQ_POR_MASK I40E_MASK(0x1, I40E_GLNVM_AL_REQ_POR_SHIFT) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 0323887550..49e05d89fa 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -236,6 +236,14 @@ enum i40e_queue_type { I40E_QUEUE_TYPE_UNKNOWN }; +enum i40e_prt_mac_link_speed { + I40E_PRT_MAC_LINK_SPEED_100MB = 0, + I40E_PRT_MAC_LINK_SPEED_1GB, + I40E_PRT_MAC_LINK_SPEED_10GB, + I40E_PRT_MAC_LINK_SPEED_40GB, + I40E_PRT_MAC_LINK_SPEED_20GB +}; + struct i40e_link_status { enum i40e_aq_phy_type phy_type; enum i40e_aq_link_speed link_speed; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 14/18] net/i40e/base: separate kernel allocated rx_bi rings from AF_XDP rings 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (12 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 13/18] net/i40e/base: add defs for MAC frequency calculation if no link Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-29 16:22 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 15/18] net/i40e/base: Update FVL FW API version to 1.15 Robin Zhang ` (5 subsequent siblings) 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, Björn Töpel Continuing the path to support MEM_TYPE_XSK_BUFF_POOL, the AF_XDP zero-copy/sk_buff rx_bi rings are now separate. Functions to properly allocate the different rings are added as well. Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 49e05d89fa..813c1ec00f 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -817,7 +817,7 @@ union i40e_32byte_rx_desc { __le64 rsvd2; } read; struct { - struct { + struct i40e_32b_rx_wb_qw0 { struct { union { __le16 mirroring_status; @@ -855,6 +855,9 @@ union i40e_32byte_rx_desc { } hi_dword; } qword3; } wb; /* writeback */ + struct { + u64 qword[4]; + } raw; }; #define I40E_RXD_QW0_MIRROR_STATUS_SHIFT 8 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 14/18] net/i40e/base: separate kernel allocated rx_bi rings from AF_XDP rings 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 14/18] net/i40e/base: separate kernel allocated rx_bi rings from AF_XDP rings Robin Zhang @ 2021-09-29 16:22 ` Ferruh Yigit 0 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 16:22 UTC (permalink / raw) To: Robin Zhang, dev, Stillwell Jr, Paul M Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Björn Töpel On 9/6/2021 3:02 AM, Robin Zhang wrote: > Continuing the path to support MEM_TYPE_XSK_BUFF_POOL, the AF_XDP > zero-copy/sk_buff rx_bi rings are now separate. Functions to properly > allocate the different rings are added as well. > > Signed-off-by: Björn Töpel <bjorn.topel@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> Again, af_xdp concern is very specific to the Linux kernel, should we get this commit in shared code drop for DPDK? ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 15/18] net/i40e/base: Update FVL FW API version to 1.15 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (13 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 14/18] net/i40e/base: separate kernel allocated rx_bi rings from AF_XDP rings Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 16/18] net/i40e/base: add defines related to DDP Robin Zhang ` (4 subsequent siblings) 19 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, Maciej Paczkowski Update FVL FW API version to 1.15 Signed-off-by: Maciej Paczkowski <maciej.paczkowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index d2615705a9..def307b59d 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -13,7 +13,7 @@ #define I40E_FW_API_VERSION_MAJOR 0x0001 #define I40E_FW_API_VERSION_MINOR_X722 0x000C -#define I40E_FW_API_VERSION_MINOR_X710 0x000C +#define I40E_FW_API_VERSION_MINOR_X710 0x000F #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ I40E_FW_API_VERSION_MINOR_X710 : \ -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 16/18] net/i40e/base: add defines related to DDP 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (14 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 15/18] net/i40e/base: Update FVL FW API version to 1.15 Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 17/18] net/i40e/base: update version in readme Robin Zhang ` (3 subsequent siblings) 19 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang, Artur Tyminski This patch adds some defines related to DDP Track ID. Signed-off-by: Artur Tyminski <arturx.tyminski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 813c1ec00f..f4a3d66759 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -1988,6 +1988,8 @@ struct i40e_metadata_segment { struct i40e_ddp_version version; #define I40E_DDP_TRACKID_RDONLY 0 #define I40E_DDP_TRACKID_INVALID 0xFFFFFFFF +#define I40E_DDP_TRACKID_GRP_MSK 0x00FF0000 +#define I40E_DDP_TRACKID_GRP_COMP_ALL 0xFF u32 track_id; char name[I40E_DDP_NAME_SIZE]; }; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 17/18] net/i40e/base: update version in readme 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (15 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 16/18] net/i40e/base: add defines related to DDP Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning Robin Zhang ` (2 subsequent siblings) 19 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang Update base code version in README. Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README index 6af2993116..2e4fa5a921 100644 --- a/drivers/net/i40e/base/README +++ b/drivers/net/i40e/base/README @@ -6,7 +6,7 @@ Intel® I40E driver ================== This directory contains source code of FreeBSD i40e driver of version -cid-i40e.2020.08.27.tar.gz released by the team which develops +cid-i40e.2021.08.16.tar.gz released by the team which develops basic drivers for any i40e NIC. The directory of base/ contains the original source package. This driver is valid for the product(s) listed below -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (16 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 17/18] net/i40e/base: update version in readme Robin Zhang @ 2021-09-06 2:02 ` Robin Zhang 2021-09-27 9:17 ` Xing, Beilei 2021-09-27 9:41 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Xing, Beilei 2021-09-29 16:21 ` Ferruh Yigit 19 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-09-06 2:02 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang, Robin Zhang After update i40e share code, there will be a redefinition compile warning. This patch fix the situation by remove duplicate definition in i40e_ethdev.c Fixes: eef2daf2e199 ("net/i40e: fix link update no wait") Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/i40e_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 7b230e2ed1..4fc44dc5e2 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2886,7 +2886,6 @@ static __rte_always_inline void update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) { /* Link status registers and values*/ -#define I40E_PRTMAC_LINKSTA 0x001E2420 #define I40E_REG_LINK_UP 0x40000080 #define I40E_PRTMAC_MACC 0x001E24E0 #define I40E_REG_MACC_25GB 0x00020000 @@ -2899,7 +2898,7 @@ update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) uint32_t link_speed; uint32_t reg_val; - reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA); + reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA(0)); link_speed = reg_val & I40E_REG_SPEED_MASK; reg_val &= I40E_REG_LINK_UP; link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning Robin Zhang @ 2021-09-27 9:17 ` Xing, Beilei 2021-09-27 9:30 ` Zhang, RobinX 0 siblings, 1 reply; 122+ messages in thread From: Xing, Beilei @ 2021-09-27 9:17 UTC (permalink / raw) To: Zhang, RobinX, dev Cc: Zhang, Qi Z, Zhang, Helin, Wu, Jingjing, remy.horton, jijiang.liu, jing.d.chen, Zhu, Heqing, Liang, Cunming, Lu, Wenzhuo, Zhang, Roy Fan, Chilikin, Andrey, echaudro, Guo, Junfeng, Yang, SteveX > -----Original Message----- > From: Zhang, RobinX <robinx.zhang@intel.com> > Sent: Monday, September 6, 2021 10:03 AM > To: dev@dpdk.org > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; > Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; > remy.horton@intel.com; jijiang.liu@intel.com; jing.d.chen@intel.com; Zhu, > Heqing <heqing.zhu@intel.com>; Liang, Cunming > <cunming.liang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, > Roy Fan <roy.fan.zhang@intel.com>; Chilikin, Andrey > <andrey.chilikin@intel.com>; echaudro@redhat.com; Guo, Junfeng > <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Zhang, > RobinX <robinx.zhang@intel.com> > Subject: [PATCH v4 18/18] net/i40e: fix redefinition warning > > After update i40e share code, there will be a redefinition compile warning. > This patch fix the situation by remove duplicate definition in i40e_ethdev.c > > Fixes: eef2daf2e199 ("net/i40e: fix link update no wait") Need to cc stable? > > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> > --- > drivers/net/i40e/i40e_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index 7b230e2ed1..4fc44dc5e2 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -2886,7 +2886,6 @@ static __rte_always_inline void > update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) { > /* Link status registers and values*/ > -#define I40E_PRTMAC_LINKSTA 0x001E2420 > #define I40E_REG_LINK_UP 0x40000080 > #define I40E_PRTMAC_MACC 0x001E24E0 > #define I40E_REG_MACC_25GB 0x00020000 > @@ -2899,7 +2898,7 @@ update_link_reg(struct i40e_hw *hw, struct > rte_eth_link *link) > uint32_t link_speed; > uint32_t reg_val; > > - reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA); > + reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA(0)); > link_speed = reg_val & I40E_REG_SPEED_MASK; > reg_val &= I40E_REG_LINK_UP; > link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0; > -- > 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning 2021-09-27 9:17 ` Xing, Beilei @ 2021-09-27 9:30 ` Zhang, RobinX 2021-09-27 10:37 ` Kevin Traynor 0 siblings, 1 reply; 122+ messages in thread From: Zhang, RobinX @ 2021-09-27 9:30 UTC (permalink / raw) To: Xing, Beilei, dev Cc: Zhang, Qi Z, Zhang, Helin, Wu, Jingjing, remy.horton, jijiang.liu, jing.d.chen, Zhu, Heqing, Liang, Cunming, Lu, Wenzhuo, Zhang, Roy Fan, Chilikin, Andrey, echaudro, Guo, Junfeng, Yang, SteveX Hi, Beilei > -----Original Message----- > From: Xing, Beilei <beilei.xing@intel.com> > Sent: Monday, September 27, 2021 5:18 PM > To: Zhang, RobinX <robinx.zhang@intel.com>; dev@dpdk.org > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Helin > <helin.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; > remy.horton@intel.com; jijiang.liu@intel.com; jing.d.chen@intel.com; Zhu, > Heqing <heqing.zhu@intel.com>; Liang, Cunming > <cunming.liang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, > Roy Fan <roy.fan.zhang@intel.com>; Chilikin, Andrey > <andrey.chilikin@intel.com>; echaudro@redhat.com; Guo, Junfeng > <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com> > Subject: RE: [PATCH v4 18/18] net/i40e: fix redefinition warning > > > > > -----Original Message----- > > From: Zhang, RobinX <robinx.zhang@intel.com> > > Sent: Monday, September 6, 2021 10:03 AM > > To: dev@dpdk.org > > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z > > <qi.z.zhang@intel.com>; Zhang, Helin <helin.zhang@intel.com>; Wu, > > Jingjing <jingjing.wu@intel.com>; remy.horton@intel.com; > > jijiang.liu@intel.com; jing.d.chen@intel.com; Zhu, Heqing > > <heqing.zhu@intel.com>; Liang, Cunming <cunming.liang@intel.com>; Lu, > > Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Roy Fan > > <roy.fan.zhang@intel.com>; Chilikin, Andrey > > <andrey.chilikin@intel.com>; echaudro@redhat.com; Guo, Junfeng > > <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Zhang, > > RobinX <robinx.zhang@intel.com> > > Subject: [PATCH v4 18/18] net/i40e: fix redefinition warning > > > > After update i40e share code, there will be a redefinition compile warning. > > This patch fix the situation by remove duplicate definition in > > i40e_ethdev.c > > > > Fixes: eef2daf2e199 ("net/i40e: fix link update no wait") > Need to cc stable? This patch is dependent on share code, so cannot cc stable. > > > > > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> > > --- > > drivers/net/i40e/i40e_ethdev.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/net/i40e/i40e_ethdev.c > > b/drivers/net/i40e/i40e_ethdev.c index 7b230e2ed1..4fc44dc5e2 100644 > > --- a/drivers/net/i40e/i40e_ethdev.c > > +++ b/drivers/net/i40e/i40e_ethdev.c > > @@ -2886,7 +2886,6 @@ static __rte_always_inline void > > update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) { > > /* Link status registers and values*/ > > -#define I40E_PRTMAC_LINKSTA 0x001E2420 > > #define I40E_REG_LINK_UP 0x40000080 > > #define I40E_PRTMAC_MACC 0x001E24E0 > > #define I40E_REG_MACC_25GB 0x00020000 > > @@ -2899,7 +2898,7 @@ update_link_reg(struct i40e_hw *hw, struct > > rte_eth_link *link) > > uint32_t link_speed; > > uint32_t reg_val; > > > > - reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA); > > + reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA(0)); > > link_speed = reg_val & I40E_REG_SPEED_MASK; > > reg_val &= I40E_REG_LINK_UP; > > link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0; > > -- > > 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning 2021-09-27 9:30 ` Zhang, RobinX @ 2021-09-27 10:37 ` Kevin Traynor 2021-09-27 11:00 ` Zhang, Qi Z 0 siblings, 1 reply; 122+ messages in thread From: Kevin Traynor @ 2021-09-27 10:37 UTC (permalink / raw) To: Zhang, RobinX, Xing, Beilei, dev Cc: Zhang, Qi Z, Zhang, Helin, Wu, Jingjing, remy.horton, jijiang.liu, jing.d.chen, Zhu, Heqing, Liang, Cunming, Lu, Wenzhuo, Zhang, Roy Fan, Chilikin, Andrey, echaudro, Guo, Junfeng, Yang, SteveX Hi, On 27/09/2021 10:30, Zhang, RobinX wrote: > Hi, Beilei > >> -----Original Message----- >> From: Xing, Beilei <beilei.xing@intel.com> >> Sent: Monday, September 27, 2021 5:18 PM >> To: Zhang, RobinX <robinx.zhang@intel.com>; dev@dpdk.org >> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Helin >> <helin.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; >> remy.horton@intel.com; jijiang.liu@intel.com; jing.d.chen@intel.com; Zhu, >> Heqing <heqing.zhu@intel.com>; Liang, Cunming >> <cunming.liang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, >> Roy Fan <roy.fan.zhang@intel.com>; Chilikin, Andrey >> <andrey.chilikin@intel.com>; echaudro@redhat.com; Guo, Junfeng >> <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com> >> Subject: RE: [PATCH v4 18/18] net/i40e: fix redefinition warning >> >> >> >>> -----Original Message----- >>> From: Zhang, RobinX <robinx.zhang@intel.com> >>> Sent: Monday, September 6, 2021 10:03 AM >>> To: dev@dpdk.org >>> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z >>> <qi.z.zhang@intel.com>; Zhang, Helin <helin.zhang@intel.com>; Wu, >>> Jingjing <jingjing.wu@intel.com>; remy.horton@intel.com; >>> jijiang.liu@intel.com; jing.d.chen@intel.com; Zhu, Heqing >>> <heqing.zhu@intel.com>; Liang, Cunming <cunming.liang@intel.com>; Lu, >>> Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Roy Fan >>> <roy.fan.zhang@intel.com>; Chilikin, Andrey >>> <andrey.chilikin@intel.com>; echaudro@redhat.com; Guo, Junfeng >>> <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Zhang, >>> RobinX <robinx.zhang@intel.com> >>> Subject: [PATCH v4 18/18] net/i40e: fix redefinition warning >>> >>> After update i40e share code, there will be a redefinition compile warning. >>> This patch fix the situation by remove duplicate definition in >>> i40e_ethdev.c >>> >>> Fixes: eef2daf2e199 ("net/i40e: fix link update no wait") >> Need to cc stable? > > This patch is dependent on share code, so cannot cc stable. > I don't think the original definition should be the fixes commit, unless it was incorrect before these patches. This warning was introduced by the redefining in patch 13/18. It would be better to fix 13/18 to not introduce the warning, rather than introduce a warning and fix it at the end of the series. >> >>> >>> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> >>> --- >>> drivers/net/i40e/i40e_ethdev.c | 3 +-- >>> 1 file changed, 1 insertion(+), 2 deletions(-) >>> >>> diff --git a/drivers/net/i40e/i40e_ethdev.c >>> b/drivers/net/i40e/i40e_ethdev.c index 7b230e2ed1..4fc44dc5e2 100644 >>> --- a/drivers/net/i40e/i40e_ethdev.c >>> +++ b/drivers/net/i40e/i40e_ethdev.c >>> @@ -2886,7 +2886,6 @@ static __rte_always_inline void >>> update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) { >>> /* Link status registers and values*/ >>> -#define I40E_PRTMAC_LINKSTA 0x001E2420 >>> #define I40E_REG_LINK_UP 0x40000080 >>> #define I40E_PRTMAC_MACC 0x001E24E0 >>> #define I40E_REG_MACC_25GB 0x00020000 >>> @@ -2899,7 +2898,7 @@ update_link_reg(struct i40e_hw *hw, struct >>> rte_eth_link *link) >>> uint32_t link_speed; >>> uint32_t reg_val; >>> >>> - reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA); >>> + reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA(0)); >>> link_speed = reg_val & I40E_REG_SPEED_MASK; >>> reg_val &= I40E_REG_LINK_UP; >>> link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0; >>> -- >>> 2.25.1 > ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning 2021-09-27 10:37 ` Kevin Traynor @ 2021-09-27 11:00 ` Zhang, Qi Z 0 siblings, 0 replies; 122+ messages in thread From: Zhang, Qi Z @ 2021-09-27 11:00 UTC (permalink / raw) To: Kevin Traynor, Zhang, RobinX, Xing, Beilei, dev Cc: Zhang, Helin, Wu, Jingjing, remy.horton, jijiang.liu, jing.d.chen, Zhu, Heqing, Liang, Cunming, Lu, Wenzhuo, Zhang, Roy Fan, Chilikin, Andrey, echaudro, Guo, Junfeng, Yang, SteveX > -----Original Message----- > From: Kevin Traynor <ktraynor@redhat.com> > Sent: Monday, September 27, 2021 6:38 PM > To: Zhang, RobinX <robinx.zhang@intel.com>; Xing, Beilei > <beilei.xing@intel.com>; dev@dpdk.org > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Helin <helin.zhang@intel.com>; > Wu, Jingjing <jingjing.wu@intel.com>; remy.horton@intel.com; > jijiang.liu@intel.com; jing.d.chen@intel.com; Zhu, Heqing > <heqing.zhu@intel.com>; Liang, Cunming <cunming.liang@intel.com>; Lu, > Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Roy Fan > <roy.fan.zhang@intel.com>; Chilikin, Andrey <andrey.chilikin@intel.com>; > echaudro@redhat.com; Guo, Junfeng <junfeng.guo@intel.com>; Yang, SteveX > <stevex.yang@intel.com> > Subject: Re: [dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning > > Hi, > > On 27/09/2021 10:30, Zhang, RobinX wrote: > > Hi, Beilei > > > >> -----Original Message----- > >> From: Xing, Beilei <beilei.xing@intel.com> > >> Sent: Monday, September 27, 2021 5:18 PM > >> To: Zhang, RobinX <robinx.zhang@intel.com>; dev@dpdk.org > >> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Helin > >> <helin.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; > >> remy.horton@intel.com; jijiang.liu@intel.com; jing.d.chen@intel.com; > >> Zhu, Heqing <heqing.zhu@intel.com>; Liang, Cunming > >> <cunming.liang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; > Zhang, > >> Roy Fan <roy.fan.zhang@intel.com>; Chilikin, Andrey > >> <andrey.chilikin@intel.com>; echaudro@redhat.com; Guo, Junfeng > >> <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com> > >> Subject: RE: [PATCH v4 18/18] net/i40e: fix redefinition warning > >> > >> > >> > >>> -----Original Message----- > >>> From: Zhang, RobinX <robinx.zhang@intel.com> > >>> Sent: Monday, September 6, 2021 10:03 AM > >>> To: dev@dpdk.org > >>> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z > >>> <qi.z.zhang@intel.com>; Zhang, Helin <helin.zhang@intel.com>; Wu, > >>> Jingjing <jingjing.wu@intel.com>; remy.horton@intel.com; > >>> jijiang.liu@intel.com; jing.d.chen@intel.com; Zhu, Heqing > >>> <heqing.zhu@intel.com>; Liang, Cunming <cunming.liang@intel.com>; > >>> Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Roy Fan > >>> <roy.fan.zhang@intel.com>; Chilikin, Andrey > >>> <andrey.chilikin@intel.com>; echaudro@redhat.com; Guo, Junfeng > >>> <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com>; > >>> Zhang, RobinX <robinx.zhang@intel.com> > >>> Subject: [PATCH v4 18/18] net/i40e: fix redefinition warning > >>> > >>> After update i40e share code, there will be a redefinition compile warning. > >>> This patch fix the situation by remove duplicate definition in > >>> i40e_ethdev.c > >>> > >>> Fixes: eef2daf2e199 ("net/i40e: fix link update no wait") > >> Need to cc stable? > > > > This patch is dependent on share code, so cannot cc stable. > > > > I don't think the original definition should be the fixes commit, unless it was > incorrect before these patches. > > This warning was introduced by the redefining in patch 13/18. It would be > better to fix 13/18 to not introduce the warning, rather than introduce a > warning and fix it at the end of the series. +1 If fix a patch belong to the same set, please squash them into 1. > > >> > >>> > >>> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> > >>> --- > >>> drivers/net/i40e/i40e_ethdev.c | 3 +-- > >>> 1 file changed, 1 insertion(+), 2 deletions(-) > >>> > >>> diff --git a/drivers/net/i40e/i40e_ethdev.c > >>> b/drivers/net/i40e/i40e_ethdev.c index 7b230e2ed1..4fc44dc5e2 100644 > >>> --- a/drivers/net/i40e/i40e_ethdev.c > >>> +++ b/drivers/net/i40e/i40e_ethdev.c > >>> @@ -2886,7 +2886,6 @@ static __rte_always_inline void > >>> update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) { > >>> /* Link status registers and values*/ > >>> -#define I40E_PRTMAC_LINKSTA 0x001E2420 > >>> #define I40E_REG_LINK_UP 0x40000080 > >>> #define I40E_PRTMAC_MACC 0x001E24E0 > >>> #define I40E_REG_MACC_25GB 0x00020000 > >>> @@ -2899,7 +2898,7 @@ update_link_reg(struct i40e_hw *hw, struct > >>> rte_eth_link *link) > >>> uint32_t link_speed; > >>> uint32_t reg_val; > >>> > >>> - reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA); > >>> + reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA(0)); > >>> link_speed = reg_val & I40E_REG_SPEED_MASK; > >>> reg_val &= I40E_REG_LINK_UP; > >>> link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0; > >>> -- > >>> 2.25.1 > > ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 00/18] i40e base code update 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (17 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning Robin Zhang @ 2021-09-27 9:41 ` Xing, Beilei 2021-09-27 12:09 ` Zhang, Qi Z 2021-09-29 16:21 ` Ferruh Yigit 19 siblings, 1 reply; 122+ messages in thread From: Xing, Beilei @ 2021-09-27 9:41 UTC (permalink / raw) To: Zhang, RobinX, dev Cc: Zhang, Qi Z, Zhang, Helin, Wu, Jingjing, remy.horton, jijiang.liu, jing.d.chen, Zhu, Heqing, Liang, Cunming, Lu, Wenzhuo, Zhang, Roy Fan, Chilikin, Andrey, echaudro, Guo, Junfeng, Yang, SteveX > -----Original Message----- > From: Zhang, RobinX <robinx.zhang@intel.com> > Sent: Monday, September 6, 2021 10:03 AM > To: dev@dpdk.org > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; > Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; > remy.horton@intel.com; jijiang.liu@intel.com; jing.d.chen@intel.com; Zhu, > Heqing <heqing.zhu@intel.com>; Liang, Cunming > <cunming.liang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Zhang, > Roy Fan <roy.fan.zhang@intel.com>; Chilikin, Andrey > <andrey.chilikin@intel.com>; echaudro@redhat.com; Guo, Junfeng > <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Zhang, > RobinX <robinx.zhang@intel.com> > Subject: [PATCH v4 00/18] i40e base code update > > update i40e base code. > > source code of i40e driver: > cid-i40e.2021.08.16.tar.gz > > changelog in i40e share repo: > From 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux > support") To 2c7aab559654 ("i40e-shared: Add defines related to DDP") > > The following commits are ignored: > cb9139e3bce8 ("i40e-shared: Fix not blinking X722 with x557 PHY via ‘ethtool > -p'") > c09d4f9cf390 ("i40e-shared: i40e-shared: Fix build warning -Wformat related > to integer size") > ff8a1abc6c17 ("i40e-shared: Fix build warning with __packed") 59a080f4fafe > ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux > support") > > v4: > - update base code to cid-i40e.2021.08.16 > v3: > - there has a fix patch contains two issues, split it into two patches > v2: > - refine commit messages and macro name > > Robin Zhang (18): > net/i40e/base: add new versions of send ASQ command functions > net/i40e/base: add support for Min Rollback Revision for 4 more X722 > modules > net/i40e/base: set TSA table values when parsing CEE configuration > net/i40e/base: define new Shadow RAM pointers > net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters > net/i40e/base: fix PF reset failed > net/i40e/base: fix update link data for X722 > net/i40e/base: fix AOC media type reported by ethtool > net/i40e/base: add flags and fields for double vlan processing > net/i40e/base: fix headers to match functions > net/i40e/base: fix potentially uninitialized variables in NVM code > net/i40e/base: fix checksum is used before return value is checked > net/i40e/base: add defs for MAC frequency calculation if no link > net/i40e/base: separate kernel allocated rx_bi rings from AF_XDP rings > net/i40e/base: Update FVL FW API version to 1.15 > net/i40e/base: add defines related to DDP > net/i40e/base: update version in readme > net/i40e: fix redefinition warning > > drivers/net/i40e/base/README | 2 +- > drivers/net/i40e/base/i40e_adminq.c | 79 +++++++++-- > drivers/net/i40e/base/i40e_adminq_cmd.h | 55 ++++++-- > drivers/net/i40e/base/i40e_common.c | 175 +++++++++++++++++++----- > drivers/net/i40e/base/i40e_dcb.c | 10 +- > drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- > drivers/net/i40e/base/i40e_nvm.c | 7 +- > drivers/net/i40e/base/i40e_prototype.h | 17 +++ > drivers/net/i40e/base/i40e_register.h | 10 ++ > drivers/net/i40e/base/i40e_type.h | 26 +++- > drivers/net/i40e/i40e_ethdev.c | 3 +- > 11 files changed, 318 insertions(+), 68 deletions(-) > > -- > 2.25.1 Acked-by: Beilei Xing <beilei.xing@intel.com> ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 00/18] i40e base code update 2021-09-27 9:41 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Xing, Beilei @ 2021-09-27 12:09 ` Zhang, Qi Z 0 siblings, 0 replies; 122+ messages in thread From: Zhang, Qi Z @ 2021-09-27 12:09 UTC (permalink / raw) To: Xing, Beilei, Zhang, RobinX, dev Cc: Zhang, Helin, Wu, Jingjing, remy.horton, jijiang.liu, jing.d.chen, Zhu, Heqing, Liang, Cunming, Lu, Wenzhuo, Zhang, Roy Fan, Chilikin, Andrey, echaudro, Guo, Junfeng, Yang, SteveX > -----Original Message----- > From: Xing, Beilei <beilei.xing@intel.com> > Sent: Monday, September 27, 2021 5:42 PM > To: Zhang, RobinX <robinx.zhang@intel.com>; dev@dpdk.org > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Helin <helin.zhang@intel.com>; > Wu, Jingjing <jingjing.wu@intel.com>; remy.horton@intel.com; > jijiang.liu@intel.com; jing.d.chen@intel.com; Zhu, Heqing > <heqing.zhu@intel.com>; Liang, Cunming <cunming.liang@intel.com>; Lu, > Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Roy Fan > <roy.fan.zhang@intel.com>; Chilikin, Andrey <andrey.chilikin@intel.com>; > echaudro@redhat.com; Guo, Junfeng <junfeng.guo@intel.com>; Yang, SteveX > <stevex.yang@intel.com> > Subject: RE: [PATCH v4 00/18] i40e base code update > > > > > -----Original Message----- > > From: Zhang, RobinX <robinx.zhang@intel.com> > > Sent: Monday, September 6, 2021 10:03 AM > > To: dev@dpdk.org > > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z > > <qi.z.zhang@intel.com>; Zhang, Helin <helin.zhang@intel.com>; Wu, > > Jingjing <jingjing.wu@intel.com>; remy.horton@intel.com; > > jijiang.liu@intel.com; jing.d.chen@intel.com; Zhu, Heqing > > <heqing.zhu@intel.com>; Liang, Cunming <cunming.liang@intel.com>; Lu, > > Wenzhuo <wenzhuo.lu@intel.com>; Zhang, Roy Fan > > <roy.fan.zhang@intel.com>; Chilikin, Andrey > > <andrey.chilikin@intel.com>; echaudro@redhat.com; Guo, Junfeng > > <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Zhang, > > RobinX <robinx.zhang@intel.com> > > Subject: [PATCH v4 00/18] i40e base code update > > > > update i40e base code. > > > > source code of i40e driver: > > cid-i40e.2021.08.16.tar.gz > > > > changelog in i40e share repo: > > From 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux > > support") To 2c7aab559654 ("i40e-shared: Add defines related to DDP") > > > > The following commits are ignored: > > cb9139e3bce8 ("i40e-shared: Fix not blinking X722 with x557 PHY via > > ‘ethtool > > -p'") > > c09d4f9cf390 ("i40e-shared: i40e-shared: Fix build warning -Wformat > > related to integer size") > > ff8a1abc6c17 ("i40e-shared: Fix build warning with __packed") > > 59a080f4fafe > > ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux > > support") > > > > v4: > > - update base code to cid-i40e.2021.08.16 > > v3: > > - there has a fix patch contains two issues, split it into two patches > > v2: > > - refine commit messages and macro name > > > > Robin Zhang (18): > > net/i40e/base: add new versions of send ASQ command functions > > net/i40e/base: add support for Min Rollback Revision for 4 more X722 > > modules > > net/i40e/base: set TSA table values when parsing CEE configuration > > net/i40e/base: define new Shadow RAM pointers > > net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters > > net/i40e/base: fix PF reset failed > > net/i40e/base: fix update link data for X722 > > net/i40e/base: fix AOC media type reported by ethtool > > net/i40e/base: add flags and fields for double vlan processing > > net/i40e/base: fix headers to match functions > > net/i40e/base: fix potentially uninitialized variables in NVM code > > net/i40e/base: fix checksum is used before return value is checked > > net/i40e/base: add defs for MAC frequency calculation if no link > > net/i40e/base: separate kernel allocated rx_bi rings from AF_XDP rings > > net/i40e/base: Update FVL FW API version to 1.15 > > net/i40e/base: add defines related to DDP > > net/i40e/base: update version in readme > > net/i40e: fix redefinition warning > > > > drivers/net/i40e/base/README | 2 +- > > drivers/net/i40e/base/i40e_adminq.c | 79 +++++++++-- > > drivers/net/i40e/base/i40e_adminq_cmd.h | 55 ++++++-- > > drivers/net/i40e/base/i40e_common.c | 175 > +++++++++++++++++++----- > > drivers/net/i40e/base/i40e_dcb.c | 10 +- > > drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- > > drivers/net/i40e/base/i40e_nvm.c | 7 +- > > drivers/net/i40e/base/i40e_prototype.h | 17 +++ > > drivers/net/i40e/base/i40e_register.h | 10 ++ > > drivers/net/i40e/base/i40e_type.h | 26 +++- > > drivers/net/i40e/i40e_ethdev.c | 3 +- > > 11 files changed, 318 insertions(+), 68 deletions(-) > > > > -- > > 2.25.1 > > Acked-by: Beilei Xing <beilei.xing@intel.com> Applied to dpdk-next-net-intel after squash patch 18/18 into patch 13/18. Thanks Qi > ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v4 00/18] i40e base code update 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang ` (18 preceding siblings ...) 2021-09-27 9:41 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Xing, Beilei @ 2021-09-29 16:21 ` Ferruh Yigit 19 siblings, 0 replies; 122+ messages in thread From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw) To: Robin Zhang, dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu, roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo, stevex.yang On 9/6/2021 3:02 AM, Robin Zhang wrote: > update i40e base code. > > source code of i40e driver: > cid-i40e.2021.08.16.tar.gz > > changelog in i40e share repo: > From 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux > support") To 2c7aab559654 ("i40e-shared: Add defines related to DDP") > > The following commits are ignored: > cb9139e3bce8 ("i40e-shared: Fix not blinking X722 with x557 PHY via > ‘ethtool -p'") > c09d4f9cf390 ("i40e-shared: i40e-shared: Fix build warning -Wformat > related to integer size") > ff8a1abc6c17 ("i40e-shared: Fix build warning with __packed") > 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux > support") > > v4: > - update base code to cid-i40e.2021.08.16 > v3: > - there has a fix patch contains two issues, split it into two patches > v2: > - refine commit messages and macro name > > Robin Zhang (18): > net/i40e/base: add new versions of send ASQ command functions > net/i40e/base: add support for Min Rollback Revision for 4 more X722 > modules > net/i40e/base: set TSA table values when parsing CEE configuration > net/i40e/base: define new Shadow RAM pointers > net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters > net/i40e/base: fix PF reset failed > net/i40e/base: fix update link data for X722 > net/i40e/base: fix AOC media type reported by ethtool > net/i40e/base: add flags and fields for double vlan processing > net/i40e/base: fix headers to match functions > net/i40e/base: fix potentially uninitialized variables in NVM code > net/i40e/base: fix checksum is used before return value is checked > net/i40e/base: add defs for MAC frequency calculation if no link > net/i40e/base: separate kernel allocated rx_bi rings from AF_XDP rings > net/i40e/base: Update FVL FW API version to 1.15 > net/i40e/base: add defines related to DDP > net/i40e/base: update version in readme > net/i40e: fix redefinition warning > There are various './devtools/check-git-log.sh' warnings, can you please check them. Specially there are many 'Headline too long' warnings. ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 00/17] i40e base code update 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (16 preceding siblings ...) 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 01/17] net/i40e/base: add v2 version of send ASQ command functions Robin Zhang ` (16 more replies) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang 18 siblings, 17 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang update i40e base code. source code of i40e driver: cid-i40e.2021.08.16.tar.gz changelog in i40e share repo: From 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") To 2c7aab559654 ("i40e-shared: Add defines related to DDP") The following commits are ignored: cb9139e3bce8 ("i40e-shared: Fix not blinking X722 with x557 PHY via ‘ethtool -p'") c09d4f9cf390 ("i40e-shared: i40e-shared: Fix build warning -Wformat related to integer size") ff8a1abc6c17 ("i40e-shared: Fix build warning with __packed") 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") v5: - refine commit messages v4: - update base code to cid-i40e.2021.08.16 v3: - there has a fix patch contains two issues, split it into two patches v2: - refine commit messages and macro name Robin Zhang (17): net/i40e/base: add v2 version of send ASQ command functions net/i40e/base: add Min SRev for 4 more X722 modules net/i40e/base: set TSA table values when parsing CEE config net/i40e/base: define new shadow RAM pointers net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters net/i40e/base: fix PF reset net/i40e/base: fix update link data for X722 net/i40e/base: fix AOC media type net/i40e/base: add flags and fields for double VLAN net/i40e/base: fix headers to match functions net/i40e/base: fix potentially uninitialized variables net/i40e/base: fix checksum is used incorrectly net/i40e/base: add calculation of MAC frequency if no link net/i40e/base: separate kernel allocated Rx bi rings net/i40e/base: update FVL FW API version to 1.15 net/i40e/base: add defines related to DDP net/i40e/base: update version in readme drivers/net/i40e/base/README | 2 +- drivers/net/i40e/base/i40e_adminq.c | 79 +++++++++-- drivers/net/i40e/base/i40e_adminq_cmd.h | 55 ++++++-- drivers/net/i40e/base/i40e_common.c | 175 +++++++++++++++++++----- drivers/net/i40e/base/i40e_dcb.c | 10 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 7 +- drivers/net/i40e/base/i40e_prototype.h | 17 +++ drivers/net/i40e/base/i40e_register.h | 10 ++ drivers/net/i40e/base/i40e_type.h | 26 +++- drivers/net/i40e/i40e_ethdev.c | 3 +- 11 files changed, 318 insertions(+), 68 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 01/17] net/i40e/base: add v2 version of send ASQ command functions 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 02/17] net/i40e/base: add Min SRev for 4 more X722 modules Robin Zhang ` (15 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Sylwester Dziedziuch ASQ(Admin Send Queue) send command functions are returning only i40e status codes yet some calling functions also need Admin Queue status that is stored in hw->aq.asq_last_status. Since hw object is stored on a heap it introduces a possibility for a race condition in access to hw if calling function is not fast enough to read hw->aq.asq_last_status before next send ASQ command is executed. Added new versions of send ASQ command functions that return Admin Queue status on the stack to avoid race conditions in access to hw->aq.asq_last_status. Added new _v2 version of i40e_aq_remove_macvlan and i40e_aq_add_macvlan that is using new _v2 versions of ASQ send command functions and returns the Admin Queue status on the stack. Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 73 +++++++++++-- drivers/net/i40e/base/i40e_common.c | 139 ++++++++++++++++++++++--- drivers/net/i40e/base/i40e_prototype.h | 17 +++ 3 files changed, 205 insertions(+), 24 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 235667d57a..38d3429e5b 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -838,7 +838,7 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) } /** - * i40e_asq_send_command - send command to Admin Queue + * i40e_asq_send_command_exec - send command to Admin Queue * @hw: pointer to the hw struct * @desc: prefilled descriptor describing the command (non DMA mem) * @buff: buffer to use for indirect commands @@ -848,11 +848,12 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) * This is the main send command driver routine for the Admin Queue send * queue. It runs the queue, cleans the queue, etc **/ -enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, - struct i40e_aq_desc *desc, - void *buff, /* can be NULL */ - u16 buff_size, - struct i40e_asq_cmd_details *cmd_details) +STATIC enum i40e_status_code +i40e_asq_send_command_exec(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) { enum i40e_status_code status = I40E_SUCCESS; struct i40e_dma_mem *dma_buff = NULL; @@ -862,8 +863,6 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, u16 retval = 0; u32 val = 0; - i40e_acquire_spinlock(&hw->aq.asq_spinlock); - hw->aq.asq_last_status = I40E_AQ_RC_OK; if (hw->aq.asq.count == 0) { @@ -1046,6 +1045,64 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, } asq_send_command_error: + return status; +} + +/** + * i40e_asq_send_command - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * + * Acquires the lock and calls the main send command execution + * routine. + **/ +enum i40e_status_code +i40e_asq_send_command(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + i40e_release_spinlock(&hw->aq.asq_spinlock); + return status; +} + +/** + * i40e_asq_send_command_v2 - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * @aq_status: pointer to Admin Queue status return value + * + * Acquires the lock and calls the main send command execution + * routine. Returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + **/ +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + if (aq_status) + *aq_status = hw->aq.asq_last_status; i40e_release_spinlock(&hw->aq.asq_spinlock); return status; } diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index e20bb9ac35..32642f3e2b 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -3114,6 +3114,46 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, return status; } +/** + * i40e_prepare_add_macvlan + * @mv_list: list of macvlans to be added + * @desc: pointer to AQ descriptor structure + * @count: length of the list + * @seid: VSI for the mac address + * + * Internal helper function that prepares the add macvlan request + * and returns the buffer size. + **/ +static u16 +i40e_prepare_add_macvlan(struct i40e_aqc_add_macvlan_element_data *mv_list, + struct i40e_aq_desc *desc, u16 count, u16 seid) +{ + struct i40e_aqc_macvlan *cmd = + (struct i40e_aqc_macvlan *)&desc->params.raw; + u16 buf_size; + int i; + + buf_size = count * sizeof(*mv_list); + + /* prep the rest of the request */ + i40e_fill_default_direct_cmd_desc(desc, i40e_aqc_opc_add_macvlan); + cmd->num_addresses = CPU_TO_LE16(count); + cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); + cmd->seid[1] = 0; + cmd->seid[2] = 0; + + for (i = 0; i < count; i++) + if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) + mv_list[i].flags |= + CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); + + desc->flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); + if (buf_size > I40E_AQ_LARGE_BUF) + desc->flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); + + return buf_size; +} + /** * i40e_aq_add_macvlan * @hw: pointer to the hw struct @@ -3124,8 +3164,74 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, * * Add MAC/VLAN addresses to the HW filtering **/ -enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_add_macvlan_element_data *mv_list, +enum i40e_status_code +i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, + cmd_details); + + return status; +} + +/** + * i40e_aq_add_macvlan_v2 + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be added + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value + * + * Add MAC/VLAN addresses to the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. + **/ +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); + + return status; +} + +/** + * i40e_aq_remove_macvlan + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be removed + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * + * Remove MAC/VLAN addresses from the HW filtering + **/ +enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details) { struct i40e_aq_desc desc; @@ -3133,7 +3239,6 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, (struct i40e_aqc_macvlan *)&desc.params.raw; enum i40e_status_code status; u16 buf_size; - int i; if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; @@ -3141,17 +3246,12 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_macvlan); + i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan); cmd->num_addresses = CPU_TO_LE16(count); cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); cmd->seid[1] = 0; cmd->seid[2] = 0; - for (i = 0; i < count; i++) - if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) - mv_list[i].flags |= - CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); - desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); @@ -3163,18 +3263,25 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, } /** - * i40e_aq_remove_macvlan + * i40e_aq_remove_macvlan_v2 * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be removed * @count: length of the list * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value * - * Remove MAC/VLAN addresses from the HW filtering + * Remove MAC/VLAN addresses from the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. **/ -enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_remove_macvlan_element_data *mv_list, - u16 count, struct i40e_asq_cmd_details *cmd_details) +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) { struct i40e_aq_desc desc; struct i40e_aqc_macvlan *cmd = @@ -3198,8 +3305,8 @@ enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, - cmd_details); + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); return status; } diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h index 124222e476..29c86c7fe8 100644 --- a/drivers/net/i40e/base/i40e_prototype.h +++ b/drivers/net/i40e/base/i40e_prototype.h @@ -38,6 +38,13 @@ 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); +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); #ifdef VF_DRIVER bool i40e_asq_done(struct i40e_hw *hw); #endif @@ -188,9 +195,19 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_add_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_add_mirrorrule(struct i40e_hw *hw, u16 sw_seid, u16 rule_type, u16 dest_vsi, u16 count, __le16 *mr_list, struct i40e_asq_cmd_details *cmd_details, -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 02/17] net/i40e/base: add Min SRev for 4 more X722 modules 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 01/17] net/i40e/base: add v2 version of send ASQ command functions Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 03/17] net/i40e/base: set TSA table values when parsing CEE config Robin Zhang ` (14 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak Some customers want to downgrade to an earlier FW security revision, this already implemented by FW so that customers can have more control over the security revisions they can use. FW also implemented a mechanism via NVMupdate to allow the users to accept or not a baseline Min SRev version that will limit the secure version rollback only down to that level. This commit increments X722 API version and adds new minimal rollback revision that related to the extended implementation of Security Revision Opt-In for 4 more X722 modules. These definations are not using by DPDK now, the purpose of this commit is sync with latest share code. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 2ca41db5d3..a96527f31c 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -12,7 +12,7 @@ */ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR_X722 0x000B +#define I40E_FW_API_VERSION_MINOR_X722 0x000C #define I40E_FW_API_VERSION_MINOR_X710 0x000C #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ @@ -2425,11 +2425,15 @@ struct i40e_aqc_rollback_revision_update { u8 optin_mode; /* bool */ #define I40E_AQ_RREV_OPTION_MODE 0x01 u8 module_selected; -#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 -#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 -#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 -#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 -#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 +#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 +#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 +#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 +#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PHY_PLL_O_CONFIGURATION 5 +#define I40E_AQ_RREV_MODULE_PHY_0_CONFIGURATION 6 +#define I40E_AQ_RREV_MODULE_PHY_PLL_1_CONFIGURATION 7 +#define I40E_AQ_RREV_MODULE_PHY_1_CONFIGURATION 8 u8 reserved1[2]; u32 min_rrev; u8 reserved2[8]; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 03/17] net/i40e/base: set TSA table values when parsing CEE config 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 01/17] net/i40e/base: add v2 version of send ASQ command functions Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 02/17] net/i40e/base: add Min SRev for 4 more X722 modules Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 04/17] net/i40e/base: define new shadow RAM pointers Robin Zhang ` (13 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Pawel Malinowski Driver did not Set TSA(Transmit Selection Algorithm) table values when parsing CEE(Converged Enhanced Ethernet) configuration obtained from FW. Signed-off-by: Pawel Malinowski <pawel.malinowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_dcb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 388af3d64d..27b52bc365 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -315,9 +315,15 @@ static void i40e_parse_cee_pgcfg_tlv(struct i40e_cee_feat_tlv *tlv, * |pg0|pg1|pg2|pg3|pg4|pg5|pg6|pg7| * --------------------------------- */ - for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) + for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) { etscfg->tcbwtable[i] = buf[offset++]; + if (etscfg->prioritytable[i] == I40E_CEE_PGID_STRICT) + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_STRICT; + else + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_ETS; + } + /* Number of TCs supported (1 octet) */ etscfg->maxtcs = buf[offset]; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 04/17] net/i40e/base: define new shadow RAM pointers 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (2 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 03/17] net/i40e/base: set TSA table values when parsing CEE config Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang ` (12 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak Add definitions for Shadow RAM pointers: 6th FPA(Free Provisioning Area) module, 5th FPA module in X722 and Preservation Rules module. These definations are not using by DPDK now, the purpose of this commit is sync with latest share code. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index cf41345834..e5a3729183 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -1555,6 +1555,9 @@ struct i40e_hw_port_stats { #define I40E_SR_FEATURE_CONFIGURATION_PTR 0x49 #define I40E_SR_CONFIGURATION_METADATA_PTR 0x4D #define I40E_SR_IMMEDIATE_VALUES_PTR 0x4E +#define I40E_SR_PRESERVATION_RULES_PTR 0x70 +#define I40E_X722_SR_5TH_FREE_PROVISION_AREA_PTR 0x71 +#define I40E_SR_6TH_FREE_PROVISION_AREA_PTR 0x71 /* Auxiliary field, mask and shift definition for Shadow RAM and NVM Flash */ #define I40E_SR_VPD_MODULE_MAX_SIZE 1024 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (3 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 04/17] net/i40e/base: define new shadow RAM pointers Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 06/17] net/i40e/base: fix PF reset Robin Zhang ` (11 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski Unlike other supported adapters, 2.5G and 5G use different PHY type identifiers for reading/writing PHY settings and for reading link status. This commit introduces separate PHY identifiers for these two operation types. Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++-- drivers/net/i40e/base/i40e_common.c | 4 ++-- drivers/net/i40e/base/i40e_type.h | 8 ++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index a96527f31c..af9dec1d7f 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_25GBASE_LR = 0x22, I40E_PHY_TYPE_25GBASE_AOC = 0x23, I40E_PHY_TYPE_25GBASE_ACC = 0x24, - I40E_PHY_TYPE_2_5GBASE_T = 0x30, - I40E_PHY_TYPE_5GBASE_T = 0x31, + I40E_PHY_TYPE_2_5GBASE_T = 0x26, + I40E_PHY_TYPE_5GBASE_T = 0x27, + I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS = 0x30, + I40E_PHY_TYPE_5GBASE_T_LINK_STATUS = 0x31, I40E_PHY_TYPE_MAX, I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD, I40E_PHY_TYPE_EMPTY = 0xFE, diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 32642f3e2b..ceedec68bf 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) break; case I40E_PHY_TYPE_100BASE_TX: case I40E_PHY_TYPE_1000BASE_T: - case I40E_PHY_TYPE_2_5GBASE_T: - case I40E_PHY_TYPE_5GBASE_T: + case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS: + case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS: case I40E_PHY_TYPE_10GBASE_T: media = I40E_MEDIA_TYPE_BASET; break; diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index e5a3729183..0323887550 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -329,12 +329,8 @@ struct i40e_phy_info { I40E_PHY_TYPE_OFFSET) #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \ I40E_PHY_TYPE_OFFSET) -/* Offset for 2.5G/5G PHY Types value to bit number conversion */ -#define I40E_PHY_TYPE_OFFSET2 (-10) -#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) -#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) +#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T) +#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T) #define I40E_HW_CAP_MAX_GPIO 30 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 06/17] net/i40e/base: fix PF reset 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (4 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 07/17] net/i40e/base: fix update link data for X722 Robin Zhang ` (10 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Sylwester Dziedziuch PF has to delete all the filters during reset. If it is fully loaded with filters then it is possible that it will take more than 200 ms to finish the reset resulting in timeout during pf_reset and PF reset failed, -15 error indication. Increasing the timeout value for PF reset from 200 to 1000 to give PF more time to finish reset if it is loaded with filters. Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit") Cc: stable@dpdk.org Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ceedec68bf..aa424e6010 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw, return I40E_ERR_RESET_FAILED; } -#define I40E_PF_RESET_WAIT_COUNT 200 +#define I40E_PF_RESET_WAIT_COUNT 1000 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 07/17] net/i40e/base: fix update link data for X722 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (5 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 06/17] net/i40e/base: fix PF reset Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 08/17] net/i40e/base: fix AOC media type Robin Zhang ` (9 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Jaroslaw Gawin The X722 card has 'Link Type' information elsewhere than the X710. Previously, for all cards, the 'Link Type' information was retrieved by opcode 0x0607 and this value was wrong for all X722 cards. Now this information for X722 only is taken by opcode 0x0600 (function: i40e_aq_get_phy_capabilities) instead of an opcode 0x0607 (function: i40e_aq_get_link_info). All other parameters read by opcode 0x0607 unchanged. Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction") Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time") Cc: stable@dpdk.org Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index aa424e6010..ef061a6b63 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw, hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; + /* 'Get Link Status' response data structure from X722 FW has + * different format and does not contain this information + */ if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE && hw->mac.type != I40E_MAC_X722) { __le32 tmp; @@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) return status; /* extra checking needed to ensure link info to user is timely */ - if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && - ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || - !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) { - status = i40e_aq_get_phy_capabilities(hw, false, false, + if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && + ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || + !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) || + hw->mac.type == I40E_MAC_X722) { + status = i40e_aq_get_phy_capabilities(hw, false, + hw->mac.type == + I40E_MAC_X722, &abilities, NULL); if (status) return status; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 08/17] net/i40e/base: fix AOC media type 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (6 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 07/17] net/i40e/base: fix update link data for X722 Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 09/17] net/i40e/base: add flags and fields for double VLAN Robin Zhang ` (8 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski For Active Optical Cable (AOC) the correct media type is "Fibre", not "Direct Attach Copper". Fixes: d749d4d89969 ("i40e/base: add AOC PHY types") Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and ACC") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ef061a6b63..2ca6a13e79 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_40GBASE_LR4: case I40E_PHY_TYPE_25GBASE_LR: case I40E_PHY_TYPE_25GBASE_SR: + case I40E_PHY_TYPE_10GBASE_AOC: + case I40E_PHY_TYPE_25GBASE_AOC: + case I40E_PHY_TYPE_40GBASE_AOC: media = I40E_MEDIA_TYPE_FIBER; break; case I40E_PHY_TYPE_100BASE_TX: @@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_10GBASE_CR1: case I40E_PHY_TYPE_40GBASE_CR4: case I40E_PHY_TYPE_10GBASE_SFPP_CU: - case I40E_PHY_TYPE_40GBASE_AOC: - case I40E_PHY_TYPE_10GBASE_AOC: case I40E_PHY_TYPE_25GBASE_CR: - case I40E_PHY_TYPE_25GBASE_AOC: case I40E_PHY_TYPE_25GBASE_ACC: media = I40E_MEDIA_TYPE_DA; break; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 09/17] net/i40e/base: add flags and fields for double VLAN 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (7 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 08/17] net/i40e/base: fix AOC media type Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 10/17] net/i40e/base: fix headers to match functions Robin Zhang ` (7 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Przemyslaw Patynowski Add flags for outer VLAN and include set port parameters. Add flags, which describe port and switch state for both double VLAN functionality and outer VLAN processing. Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index af9dec1d7f..372dd71c3f 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -768,6 +768,7 @@ struct i40e_aqc_set_switch_config { #define I40E_AQ_SET_SWITCH_CFG_PROMISC 0x0001 #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER 0x0002 #define I40E_AQ_SET_SWITCH_CFG_HW_ATR_EVICT 0x0004 +#define I40E_AQ_SET_SWITCH_CFG_OUTER_VLAN 0x0008 __le16 valid_flags; /* The ethertype in switch_tag is dropped on ingress and used * internally by the switch. Set this to zero for the default @@ -904,7 +905,7 @@ struct i40e_aqc_vsi_properties_data { u8 sec_reserved; /* VLAN section */ __le16 pvid; /* VLANS include priority bits */ - __le16 fcoe_pvid; + __le16 outer_vlan; u8 port_vlan_flags; #define I40E_AQ_VSI_PVLAN_MODE_SHIFT 0x00 #define I40E_AQ_VSI_PVLAN_MODE_MASK (0x03 << \ @@ -920,7 +921,24 @@ struct i40e_aqc_vsi_properties_data { #define I40E_AQ_VSI_PVLAN_EMOD_STR_UP 0x08 #define I40E_AQ_VSI_PVLAN_EMOD_STR 0x10 #define I40E_AQ_VSI_PVLAN_EMOD_NOTHING 0x18 - u8 pvlan_reserved[3]; + u8 outer_vlan_flags; +#define I40E_AQ_VSI_OVLAN_MODE_SHIFT 0x00 +#define I40E_AQ_VSI_OVLAN_MODE_MASK (0x03 << \ + I40E_AQ_VSI_OVLAN_MODE_SHIFT) +#define I40E_AQ_VSI_OVLAN_MODE_UNTAGGED 0x01 +#define I40E_AQ_VSI_OVLAN_MODE_TAGGED 0x02 +#define I40E_AQ_VSI_OVLAN_MODE_ALL 0x03 +#define I40E_AQ_VSI_OVLAN_INSERT_PVID 0x04 +#define I40E_AQ_VSI_OVLAN_EMOD_SHIFT 0x03 +#define I40E_AQ_VSI_OVLAN_EMOD_MASK (0x03 <<\ + I40E_AQ_VSI_OVLAN_EMOD_SHIFT) +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_ALL 0x00 +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_UP 0x01 +#define I40E_AQ_VSI_OVLAN_EMOD_HIDE_ALL 0x02 +#define I40E_AQ_VSI_OVLAN_EMOD_NOTHING 0x03 +#define I40E_AQ_VSI_OVLAN_CTRL_ENA 0x04 + + u8 pvlan_reserved[2]; /* ingress egress up sections */ __le32 ingress_table; /* bitmap, 3 bits per up */ #define I40E_AQ_VSI_UP_TABLE_UP0_SHIFT 0 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 10/17] net/i40e/base: fix headers to match functions 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (8 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 09/17] net/i40e/base: add flags and fields for double VLAN Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang ` (6 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Jesse Brandeburg Fix several kernel-doc warnings when building with W=1. These changes are only to comments. Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 842ea1996335 ("i40e/base: save link module type") Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY") Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722") Cc: stable@dpdk.org Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 10 +++++----- drivers/net/i40e/base/i40e_dcb.c | 2 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 2ca6a13e79..baa51e1396 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2677,7 +2677,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw, } /** - * i40e_get_vsi_params - get VSI configuration info + * i40e_aq_get_vsi_params - get VSI configuration info * @hw: pointer to the hw struct * @vsi_ctx: pointer to a vsi context struct * @cmd_details: pointer to command details structure or NULL @@ -2938,7 +2938,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up) } /** - * i40e_updatelink_status - update status of the HW network link + * i40e_update_link_info - update status of the HW network link * @hw: pointer to the hw struct **/ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) @@ -4830,7 +4830,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index, } /** - * i40e_aq_get_switch_resource_alloc (0x0204) + * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations * @hw: pointer to the hw struct * @num_entries: pointer to u8 to store the number of resource entries returned * @buf: pointer to a user supplied buffer. This buffer must be large enough @@ -6977,7 +6977,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num) } /** - * i40e_blink_phy_led + * i40e_blink_phy_link_led * @hw: pointer to the HW structure * @time: time how long led will blinks in secs * @interval: gap between LED on and off in msecs @@ -7824,7 +7824,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw, } /** - * i40e_aq_opc_set_ns_proxy_table_entry + * i40e_aq_set_ns_proxy_table_entry * @hw: pointer to the HW structure * @ns_proxy_table_entry: pointer to NS table entry command struct * @cmd_details: pointer to command details diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 27b52bc365..8f9b7e823f 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv, } /** - * i40e_parse_ieee_etsrec_tlv + * i40e_parse_ieee_tlv * @tlv: IEEE 802.1Qaz TLV * @dcbcfg: Local store to update ETS REC data * diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c index d3969396f0..d3bd683ff3 100644 --- a/drivers/net/i40e/base/i40e_lan_hmc.c +++ b/drivers/net/i40e/base/i40e_lan_hmc.c @@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw, } /** - * i40e_delete_hmc_object - remove hmc objects + * i40e_delete_lan_hmc_object - remove hmc objects * @hw: pointer to the HW structure * @info: pointer to i40e_hmc_delete_obj_info struct * diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 561ed21136..67e58cc195 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -7,7 +7,7 @@ #include "i40e_prototype.h" /** - * i40e_init_nvm_ops - Initialize NVM function pointers + * i40e_init_nvm - Initialize NVM function pointers * @hw: pointer to the HW structure * * Setup the function pointers and the NVM info structure. Should be called -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 11/17] net/i40e/base: fix potentially uninitialized variables 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (9 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 10/17] net/i40e/base: fix headers to match functions Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang ` (5 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Christopher Pau The status of i40e_read_nvm_word is not checked, so variables set from this function could be used uninitialized. In this case, preserve the existing flow that does not block initialization by initializing these values from the start. Fixes: 8d6c51fcd24b ("i40e/base: get OEM version") Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only") Cc: stable@dpdk.org Signed-off-by: Christopher Pau <christopher.pau@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 38d3429e5b..27c82d9b44 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -652,8 +652,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) { struct i40e_adminq_info *aq = &hw->aq; enum i40e_status_code ret_code; - u16 cfg_ptr, oem_hi, oem_lo; - u16 eetrack_lo, eetrack_hi; + u16 oem_hi = 0, oem_lo = 0; + u16 eetrack_hi = 0; + u16 eetrack_lo = 0; + u16 cfg_ptr = 0; int retry = 0; /* verify input for valid configuration */ -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 12/17] net/i40e/base: fix checksum is used incorrectly 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (10 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 13/17] net/i40e/base: add calculation of MAC frequency if no link Robin Zhang ` (4 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Christopher Pau The variable checksum from i40e_calc_nvm_checksum is used before return value is checked. Fix this logic. Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM") Cc: stable@dpdk.org Signed-off-by: Christopher Pau <christopher.pau@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_nvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 67e58cc195..f385042601 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw) DEBUGFUNC("i40e_update_nvm_checksum"); ret_code = i40e_calc_nvm_checksum(hw, &checksum); - le_sum = CPU_TO_LE16(checksum); - if (ret_code == I40E_SUCCESS) + if (ret_code == I40E_SUCCESS) { + le_sum = CPU_TO_LE16(checksum); ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD, 1, &le_sum, true); + } return ret_code; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 13/17] net/i40e/base: add calculation of MAC frequency if no link 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (11 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 14/17] net/i40e/base: separate kernel allocated Rx bi rings Robin Zhang ` (3 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Piotr Kwapulinski Add macros and structures for MAC frequency calculation in case the link is not present. Remove duplicate definition in i40e_ethdev.c Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 9 +++++++++ drivers/net/i40e/base/i40e_register.h | 10 ++++++++++ drivers/net/i40e/base/i40e_type.h | 8 ++++++++ drivers/net/i40e/i40e_ethdev.c | 3 +-- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 372dd71c3f..d2615705a9 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -2035,6 +2035,15 @@ enum i40e_aq_link_speed { I40E_LINK_SPEED_25GB = (1 << I40E_LINK_SPEED_25GB_SHIFT), }; +enum i40e_prt_mac_pcs_link_speed { + I40E_PRT_MAC_PCS_LINK_SPEED_UNKNOWN = 0, + I40E_PRT_MAC_PCS_LINK_SPEED_100MB, + I40E_PRT_MAC_PCS_LINK_SPEED_1GB, + I40E_PRT_MAC_PCS_LINK_SPEED_10GB, + I40E_PRT_MAC_PCS_LINK_SPEED_40GB, + I40E_PRT_MAC_PCS_LINK_SPEED_20GB +}; + struct i40e_aqc_module_desc { u8 oui[3]; u8 reserved1; diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h index ee4f333f9c..75eff845f1 100644 --- a/drivers/net/i40e/base/i40e_register.h +++ b/drivers/net/i40e/base/i40e_register.h @@ -1411,6 +1411,11 @@ #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE1_MASK I40E_MASK(0x3, I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE1_SHIFT) #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_SHIFT 14 #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_MASK I40E_MASK(0x3, I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_SHIFT) +/* _i=0...3 */ /* Reset: GLOBR */ +#define I40E_PRTMAC_PCS_LINK_STATUS1(_i) (0x0008C200 + ((_i) * 4)) +#define I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_SHIFT 24 +#define I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_MASK \ + I40E_MASK(0x7, I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_SHIFT) #define I40E_GL_FWRESETCNT 0x00083100 /* Reset: POR */ #define I40E_GL_FWRESETCNT_FWRESETCNT_SHIFT 0 #define I40E_GL_FWRESETCNT_FWRESETCNT_MASK I40E_MASK(0xFFFFFFFF, I40E_GL_FWRESETCNT_FWRESETCNT_SHIFT) @@ -3873,6 +3878,11 @@ #define I40E_PRTMAC_LINK_DOWN_COUNTER 0x001E2440 /* Reset: GLOBR */ #define I40E_PRTMAC_LINK_DOWN_COUNTER_LINK_DOWN_COUNTER_SHIFT 0 #define I40E_PRTMAC_LINK_DOWN_COUNTER_LINK_DOWN_COUNTER_MASK I40E_MASK(0xFFFF, I40E_PRTMAC_LINK_DOWN_COUNTER_LINK_DOWN_COUNTER_SHIFT) +/* _i=0...3 */ /* Reset: GLOBR */ +#define I40E_PRTMAC_LINKSTA(_i) (0x001E2420 + ((_i) * 4)) +#define I40E_PRTMAC_LINKSTA_MAC_LINK_SPEED_SHIFT 27 +#define I40E_PRTMAC_LINKSTA_MAC_LINK_SPEED_MASK \ + I40E_MASK(0x7, I40E_PRTMAC_LINKSTA_MAC_LINK_SPEED_SHIFT) #define I40E_GLNVM_AL_REQ 0x000B6164 /* Reset: POR */ #define I40E_GLNVM_AL_REQ_POR_SHIFT 0 #define I40E_GLNVM_AL_REQ_POR_MASK I40E_MASK(0x1, I40E_GLNVM_AL_REQ_POR_SHIFT) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 0323887550..49e05d89fa 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -236,6 +236,14 @@ enum i40e_queue_type { I40E_QUEUE_TYPE_UNKNOWN }; +enum i40e_prt_mac_link_speed { + I40E_PRT_MAC_LINK_SPEED_100MB = 0, + I40E_PRT_MAC_LINK_SPEED_1GB, + I40E_PRT_MAC_LINK_SPEED_10GB, + I40E_PRT_MAC_LINK_SPEED_40GB, + I40E_PRT_MAC_LINK_SPEED_20GB +}; + struct i40e_link_status { enum i40e_aq_phy_type phy_type; enum i40e_aq_link_speed link_speed; diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 6f1765117a..b00f9cd396 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2855,7 +2855,6 @@ static __rte_always_inline void update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) { /* Link status registers and values*/ -#define I40E_PRTMAC_LINKSTA 0x001E2420 #define I40E_REG_LINK_UP 0x40000080 #define I40E_PRTMAC_MACC 0x001E24E0 #define I40E_REG_MACC_25GB 0x00020000 @@ -2868,7 +2867,7 @@ update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) uint32_t link_speed; uint32_t reg_val; - reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA); + reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA(0)); link_speed = reg_val & I40E_REG_SPEED_MASK; reg_val &= I40E_REG_LINK_UP; link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 14/17] net/i40e/base: separate kernel allocated Rx bi rings 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (12 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 13/17] net/i40e/base: add calculation of MAC frequency if no link Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 15/17] net/i40e/base: update FVL FW API version to 1.15 Robin Zhang ` (2 subsequent siblings) 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Björn Töpel Continuing the path to support MEM_TYPE_XSK_BUFF_POOL, the AF_XDP zero-copy/sk_buff rx_bi rings are now separate. Functions to properly allocate the different rings are added as well. The purpose of this commit is sync with latest share code. Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 49e05d89fa..813c1ec00f 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -817,7 +817,7 @@ union i40e_32byte_rx_desc { __le64 rsvd2; } read; struct { - struct { + struct i40e_32b_rx_wb_qw0 { struct { union { __le16 mirroring_status; @@ -855,6 +855,9 @@ union i40e_32byte_rx_desc { } hi_dword; } qword3; } wb; /* writeback */ + struct { + u64 qword[4]; + } raw; }; #define I40E_RXD_QW0_MIRROR_STATUS_SHIFT 8 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 15/17] net/i40e/base: update FVL FW API version to 1.15 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (13 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 14/17] net/i40e/base: separate kernel allocated Rx bi rings Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 16/17] net/i40e/base: add defines related to DDP Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 17/17] net/i40e/base: update version in readme Robin Zhang 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Maciej Paczkowski Update FVL FW API version to 1.15 Signed-off-by: Maciej Paczkowski <maciej.paczkowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index d2615705a9..def307b59d 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -13,7 +13,7 @@ #define I40E_FW_API_VERSION_MAJOR 0x0001 #define I40E_FW_API_VERSION_MINOR_X722 0x000C -#define I40E_FW_API_VERSION_MINOR_X710 0x000C +#define I40E_FW_API_VERSION_MINOR_X710 0x000F #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ I40E_FW_API_VERSION_MINOR_X710 : \ -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 16/17] net/i40e/base: add defines related to DDP 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (14 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 15/17] net/i40e/base: update FVL FW API version to 1.15 Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 17/17] net/i40e/base: update version in readme Robin Zhang 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Artur Tyminski This patch adds some defines related to DDP Track ID. Signed-off-by: Artur Tyminski <arturx.tyminski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 813c1ec00f..f4a3d66759 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -1988,6 +1988,8 @@ struct i40e_metadata_segment { struct i40e_ddp_version version; #define I40E_DDP_TRACKID_RDONLY 0 #define I40E_DDP_TRACKID_INVALID 0xFFFFFFFF +#define I40E_DDP_TRACKID_GRP_MSK 0x00FF0000 +#define I40E_DDP_TRACKID_GRP_COMP_ALL 0xFF u32 track_id; char name[I40E_DDP_NAME_SIZE]; }; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v5 17/17] net/i40e/base: update version in readme 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang ` (15 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 16/17] net/i40e/base: add defines related to DDP Robin Zhang @ 2021-10-09 1:26 ` Robin Zhang 16 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:26 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang Update base code version in README. Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README index 6af2993116..2e4fa5a921 100644 --- a/drivers/net/i40e/base/README +++ b/drivers/net/i40e/base/README @@ -6,7 +6,7 @@ Intel® I40E driver ================== This directory contains source code of FreeBSD i40e driver of version -cid-i40e.2020.08.27.tar.gz released by the team which develops +cid-i40e.2021.08.16.tar.gz released by the team which develops basic drivers for any i40e NIC. The directory of base/ contains the original source package. This driver is valid for the product(s) listed below -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 00/17] i40e base code update 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang ` (17 preceding siblings ...) 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 01/17] net/i40e/base: add v2 version of send ASQ command functions Robin Zhang ` (17 more replies) 18 siblings, 18 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang update i40e base code. source code of i40e driver: cid-i40e.2021.08.16.tar.gz changelog in i40e share repo: From 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") To 2c7aab559654 ("i40e-shared: Add defines related to DDP") The following commits are ignored: cb9139e3bce8 ("i40e-shared: Fix not blinking X722 with x557 PHY via ‘ethtool -p'") c09d4f9cf390 ("i40e-shared: i40e-shared: Fix build warning -Wformat related to integer size") ff8a1abc6c17 ("i40e-shared: Fix build warning with __packed") 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux support") v6: - fix some typos v5: - refine commit messages v4: - update base code to cid-i40e.2021.08.16 v3: - there has a fix patch contains two issues, split it into two patches v2: - refine commit messages and macro name Robin Zhang (17): net/i40e/base: add v2 version of send ASQ command functions net/i40e/base: add Min SRev for 4 more X722 modules net/i40e/base: set TSA table values when parsing CEE config net/i40e/base: define new shadow RAM pointers net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters net/i40e/base: fix PF reset net/i40e/base: fix update link data for X722 net/i40e/base: fix AOC media type net/i40e/base: add flags and fields for double VLAN net/i40e/base: fix headers to match functions net/i40e/base: fix potentially uninitialized variables net/i40e/base: fix checksum is used incorrectly net/i40e/base: add calculation of MAC frequency if no link net/i40e/base: separate kernel allocated Rx bi rings net/i40e/base: update FVL FW API version to 1.15 net/i40e/base: add defines related to DDP net/i40e/base: update version in readme drivers/net/i40e/base/README | 2 +- drivers/net/i40e/base/i40e_adminq.c | 79 +++++++++-- drivers/net/i40e/base/i40e_adminq_cmd.h | 55 ++++++-- drivers/net/i40e/base/i40e_common.c | 175 +++++++++++++++++++----- drivers/net/i40e/base/i40e_dcb.c | 10 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 7 +- drivers/net/i40e/base/i40e_prototype.h | 17 +++ drivers/net/i40e/base/i40e_register.h | 10 ++ drivers/net/i40e/base/i40e_type.h | 26 +++- drivers/net/i40e/i40e_ethdev.c | 3 +- 11 files changed, 318 insertions(+), 68 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 01/17] net/i40e/base: add v2 version of send ASQ command functions 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 02/17] net/i40e/base: add Min SRev for 4 more X722 modules Robin Zhang ` (16 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Sylwester Dziedziuch ASQ(Admin Send Queue) send command functions are returning only i40e status codes yet some calling functions also need Admin Queue status that is stored in hw->aq.asq_last_status. Since hw object is stored on a heap it introduces a possibility for a race condition in access to hw if calling function is not fast enough to read hw->aq.asq_last_status before next send ASQ command is executed. Added new versions of send ASQ command functions that return Admin Queue status on the stack to avoid race conditions in access to hw->aq.asq_last_status. Added new _v2 version of i40e_aq_remove_macvlan and i40e_aq_add_macvlan that is using new _v2 versions of ASQ send command functions and returns the Admin Queue status on the stack. Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 73 +++++++++++-- drivers/net/i40e/base/i40e_common.c | 139 ++++++++++++++++++++++--- drivers/net/i40e/base/i40e_prototype.h | 17 +++ 3 files changed, 205 insertions(+), 24 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 235667d57a..38d3429e5b 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -838,7 +838,7 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) } /** - * i40e_asq_send_command - send command to Admin Queue + * i40e_asq_send_command_exec - send command to Admin Queue * @hw: pointer to the hw struct * @desc: prefilled descriptor describing the command (non DMA mem) * @buff: buffer to use for indirect commands @@ -848,11 +848,12 @@ STATIC bool i40e_asq_done(struct i40e_hw *hw) * This is the main send command driver routine for the Admin Queue send * queue. It runs the queue, cleans the queue, etc **/ -enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, - struct i40e_aq_desc *desc, - void *buff, /* can be NULL */ - u16 buff_size, - struct i40e_asq_cmd_details *cmd_details) +STATIC enum i40e_status_code +i40e_asq_send_command_exec(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) { enum i40e_status_code status = I40E_SUCCESS; struct i40e_dma_mem *dma_buff = NULL; @@ -862,8 +863,6 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, u16 retval = 0; u32 val = 0; - i40e_acquire_spinlock(&hw->aq.asq_spinlock); - hw->aq.asq_last_status = I40E_AQ_RC_OK; if (hw->aq.asq.count == 0) { @@ -1046,6 +1045,64 @@ enum i40e_status_code i40e_asq_send_command(struct i40e_hw *hw, } asq_send_command_error: + return status; +} + +/** + * i40e_asq_send_command - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * + * Acquires the lock and calls the main send command execution + * routine. + **/ +enum i40e_status_code +i40e_asq_send_command(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + i40e_release_spinlock(&hw->aq.asq_spinlock); + return status; +} + +/** + * i40e_asq_send_command_v2 - send command to Admin Queue + * @hw: pointer to the hw struct + * @desc: prefilled descriptor describing the command (non DMA mem) + * @buff: buffer to use for indirect commands + * @buff_size: size of buffer for indirect commands + * @cmd_details: pointer to command details structure + * @aq_status: pointer to Admin Queue status return value + * + * Acquires the lock and calls the main send command execution + * routine. Returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + **/ +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + enum i40e_status_code status = I40E_SUCCESS; + + i40e_acquire_spinlock(&hw->aq.asq_spinlock); + status = i40e_asq_send_command_exec(hw, desc, buff, buff_size, + cmd_details); + if (aq_status) + *aq_status = hw->aq.asq_last_status; i40e_release_spinlock(&hw->aq.asq_spinlock); return status; } diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index e20bb9ac35..32642f3e2b 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -3114,6 +3114,46 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, return status; } +/** + * i40e_prepare_add_macvlan + * @mv_list: list of macvlans to be added + * @desc: pointer to AQ descriptor structure + * @count: length of the list + * @seid: VSI for the mac address + * + * Internal helper function that prepares the add macvlan request + * and returns the buffer size. + **/ +static u16 +i40e_prepare_add_macvlan(struct i40e_aqc_add_macvlan_element_data *mv_list, + struct i40e_aq_desc *desc, u16 count, u16 seid) +{ + struct i40e_aqc_macvlan *cmd = + (struct i40e_aqc_macvlan *)&desc->params.raw; + u16 buf_size; + int i; + + buf_size = count * sizeof(*mv_list); + + /* prep the rest of the request */ + i40e_fill_default_direct_cmd_desc(desc, i40e_aqc_opc_add_macvlan); + cmd->num_addresses = CPU_TO_LE16(count); + cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); + cmd->seid[1] = 0; + cmd->seid[2] = 0; + + for (i = 0; i < count; i++) + if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) + mv_list[i].flags |= + CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); + + desc->flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); + if (buf_size > I40E_AQ_LARGE_BUF) + desc->flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); + + return buf_size; +} + /** * i40e_aq_add_macvlan * @hw: pointer to the hw struct @@ -3124,8 +3164,74 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, * * Add MAC/VLAN addresses to the HW filtering **/ -enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_add_macvlan_element_data *mv_list, +enum i40e_status_code +i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, + cmd_details); + + return status; +} + +/** + * i40e_aq_add_macvlan_v2 + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be added + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value + * + * Add MAC/VLAN addresses to the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. + **/ +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) +{ + struct i40e_aq_desc desc; + enum i40e_status_code status; + u16 buf_size; + + if (count == 0 || !mv_list || !hw) + return I40E_ERR_PARAM; + + buf_size = i40e_prepare_add_macvlan(mv_list, &desc, count, seid); + + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); + + return status; +} + +/** + * i40e_aq_remove_macvlan + * @hw: pointer to the hw struct + * @seid: VSI for the mac address + * @mv_list: list of macvlans to be removed + * @count: length of the list + * @cmd_details: pointer to command details structure or NULL + * + * Remove MAC/VLAN addresses from the HW filtering + **/ +enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details) { struct i40e_aq_desc desc; @@ -3133,7 +3239,6 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, (struct i40e_aqc_macvlan *)&desc.params.raw; enum i40e_status_code status; u16 buf_size; - int i; if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; @@ -3141,17 +3246,12 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ - i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_macvlan); + i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan); cmd->num_addresses = CPU_TO_LE16(count); cmd->seid[0] = CPU_TO_LE16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid); cmd->seid[1] = 0; cmd->seid[2] = 0; - for (i = 0; i < count; i++) - if (I40E_IS_MULTICAST(mv_list[i].mac_addr)) - mv_list[i].flags |= - CPU_TO_LE16(I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC); - desc.flags |= CPU_TO_LE16((u16)(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD)); if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); @@ -3163,18 +3263,25 @@ enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 seid, } /** - * i40e_aq_remove_macvlan + * i40e_aq_remove_macvlan_v2 * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be removed * @count: length of the list * @cmd_details: pointer to command details structure or NULL + * @aq_status: pointer to Admin Queue status return value * - * Remove MAC/VLAN addresses from the HW filtering + * Remove MAC/VLAN addresses from the HW filtering. + * The _v2 version returns the last Admin Queue status in aq_status + * to avoid race conditions in access to hw->aq.asq_last_status. + * It also calls _v2 versions of asq_send_command functions to + * get the aq_status on the stack. **/ -enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, - struct i40e_aqc_remove_macvlan_element_data *mv_list, - u16 count, struct i40e_asq_cmd_details *cmd_details) +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status) { struct i40e_aq_desc desc; struct i40e_aqc_macvlan *cmd = @@ -3198,8 +3305,8 @@ enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, if (buf_size > I40E_AQ_LARGE_BUF) desc.flags |= CPU_TO_LE16((u16)I40E_AQ_FLAG_LB); - status = i40e_asq_send_command(hw, &desc, mv_list, buf_size, - cmd_details); + status = i40e_asq_send_command_v2(hw, &desc, mv_list, buf_size, + cmd_details, aq_status); return status; } diff --git a/drivers/net/i40e/base/i40e_prototype.h b/drivers/net/i40e/base/i40e_prototype.h index 124222e476..29c86c7fe8 100644 --- a/drivers/net/i40e/base/i40e_prototype.h +++ b/drivers/net/i40e/base/i40e_prototype.h @@ -38,6 +38,13 @@ 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); +enum i40e_status_code +i40e_asq_send_command_v2(struct i40e_hw *hw, + struct i40e_aq_desc *desc, + void *buff, /* can be NULL */ + u16 buff_size, + struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); #ifdef VF_DRIVER bool i40e_asq_done(struct i40e_hw *hw); #endif @@ -188,9 +195,19 @@ enum i40e_status_code i40e_aq_get_veb_parameters(struct i40e_hw *hw, enum i40e_status_code i40e_aq_add_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_add_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_add_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_add_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 vsi_id, struct i40e_aqc_remove_macvlan_element_data *mv_list, u16 count, struct i40e_asq_cmd_details *cmd_details); +enum i40e_status_code +i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, + struct i40e_aqc_remove_macvlan_element_data *mv_list, + u16 count, struct i40e_asq_cmd_details *cmd_details, + enum i40e_admin_queue_err *aq_status); enum i40e_status_code i40e_aq_add_mirrorrule(struct i40e_hw *hw, u16 sw_seid, u16 rule_type, u16 dest_vsi, u16 count, __le16 *mr_list, struct i40e_asq_cmd_details *cmd_details, -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 02/17] net/i40e/base: add Min SRev for 4 more X722 modules 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 01/17] net/i40e/base: add v2 version of send ASQ command functions Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 03/17] net/i40e/base: set TSA table values when parsing CEE config Robin Zhang ` (15 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak Some customers want to downgrade to an earlier FW security revision, this already implemented by FW so that customers can have more control over the security revisions they can use. FW also implemented a mechanism via NVMupdate to allow the users to accept or not a baseline Min SRev version that will limit the secure version rollback only down to that level. This commit increments X722 API version and adds new minimal rollback revision that related to the extended implementation of Security Revision Opt-In for 4 more X722 modules. These definitions are not using by DPDK now, the purpose of this commit is sync with latest share code. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 2ca41db5d3..a96527f31c 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -12,7 +12,7 @@ */ #define I40E_FW_API_VERSION_MAJOR 0x0001 -#define I40E_FW_API_VERSION_MINOR_X722 0x000B +#define I40E_FW_API_VERSION_MINOR_X722 0x000C #define I40E_FW_API_VERSION_MINOR_X710 0x000C #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ @@ -2425,11 +2425,15 @@ struct i40e_aqc_rollback_revision_update { u8 optin_mode; /* bool */ #define I40E_AQ_RREV_OPTION_MODE 0x01 u8 module_selected; -#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 -#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 -#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 -#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 -#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PCIE_ANALOG 0 +#define I40E_AQ_RREV_MODULE_PHY_ANALOG 1 +#define I40E_AQ_RREV_MODULE_OPTION_ROM 2 +#define I40E_AQ_RREV_MODULE_EMP_IMAGE 3 +#define I40E_AQ_RREV_MODULE_PE_IMAGE 4 +#define I40E_AQ_RREV_MODULE_PHY_PLL_O_CONFIGURATION 5 +#define I40E_AQ_RREV_MODULE_PHY_0_CONFIGURATION 6 +#define I40E_AQ_RREV_MODULE_PHY_PLL_1_CONFIGURATION 7 +#define I40E_AQ_RREV_MODULE_PHY_1_CONFIGURATION 8 u8 reserved1[2]; u32 min_rrev; u8 reserved2[8]; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 03/17] net/i40e/base: set TSA table values when parsing CEE config 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 01/17] net/i40e/base: add v2 version of send ASQ command functions Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 02/17] net/i40e/base: add Min SRev for 4 more X722 modules Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 04/17] net/i40e/base: define new shadow RAM pointers Robin Zhang ` (14 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Pawel Malinowski Driver did not Set TSA(Transmit Selection Algorithm) table values when parsing CEE(Converged Enhanced Ethernet) configuration obtained from FW. Signed-off-by: Pawel Malinowski <pawel.malinowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_dcb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 388af3d64d..27b52bc365 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -315,9 +315,15 @@ static void i40e_parse_cee_pgcfg_tlv(struct i40e_cee_feat_tlv *tlv, * |pg0|pg1|pg2|pg3|pg4|pg5|pg6|pg7| * --------------------------------- */ - for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) + for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) { etscfg->tcbwtable[i] = buf[offset++]; + if (etscfg->prioritytable[i] == I40E_CEE_PGID_STRICT) + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_STRICT; + else + dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_ETS; + } + /* Number of TCs supported (1 octet) */ etscfg->maxtcs = buf[offset]; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 04/17] net/i40e/base: define new shadow RAM pointers 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (2 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 03/17] net/i40e/base: set TSA table values when parsing CEE config Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang ` (13 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Stanislaw Grzeszczak Add definitions for Shadow RAM pointers: 6th FPA(Free Provisioning Area) module, 5th FPA module in X722 and Preservation Rules module. These definitions are not using by DPDK now, the purpose of this commit is sync with latest share code. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index cf41345834..e5a3729183 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -1555,6 +1555,9 @@ struct i40e_hw_port_stats { #define I40E_SR_FEATURE_CONFIGURATION_PTR 0x49 #define I40E_SR_CONFIGURATION_METADATA_PTR 0x4D #define I40E_SR_IMMEDIATE_VALUES_PTR 0x4E +#define I40E_SR_PRESERVATION_RULES_PTR 0x70 +#define I40E_X722_SR_5TH_FREE_PROVISION_AREA_PTR 0x71 +#define I40E_SR_6TH_FREE_PROVISION_AREA_PTR 0x71 /* Auxiliary field, mask and shift definition for Shadow RAM and NVM Flash */ #define I40E_SR_VPD_MODULE_MAX_SIZE 1024 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (3 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 04/17] net/i40e/base: define new shadow RAM pointers Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 06/17] net/i40e/base: fix PF reset Robin Zhang ` (12 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski Unlike other supported adapters, 2.5G and 5G use different PHY type identifiers for reading/writing PHY settings and for reading link status. This commit introduces separate PHY identifiers for these two operation types. Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++-- drivers/net/i40e/base/i40e_common.c | 4 ++-- drivers/net/i40e/base/i40e_type.h | 8 ++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index a96527f31c..af9dec1d7f 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type { I40E_PHY_TYPE_25GBASE_LR = 0x22, I40E_PHY_TYPE_25GBASE_AOC = 0x23, I40E_PHY_TYPE_25GBASE_ACC = 0x24, - I40E_PHY_TYPE_2_5GBASE_T = 0x30, - I40E_PHY_TYPE_5GBASE_T = 0x31, + I40E_PHY_TYPE_2_5GBASE_T = 0x26, + I40E_PHY_TYPE_5GBASE_T = 0x27, + I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS = 0x30, + I40E_PHY_TYPE_5GBASE_T_LINK_STATUS = 0x31, I40E_PHY_TYPE_MAX, I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD, I40E_PHY_TYPE_EMPTY = 0xFE, diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 32642f3e2b..ceedec68bf 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) break; case I40E_PHY_TYPE_100BASE_TX: case I40E_PHY_TYPE_1000BASE_T: - case I40E_PHY_TYPE_2_5GBASE_T: - case I40E_PHY_TYPE_5GBASE_T: + case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS: + case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS: case I40E_PHY_TYPE_10GBASE_T: media = I40E_MEDIA_TYPE_BASET; break; diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index e5a3729183..0323887550 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -329,12 +329,8 @@ struct i40e_phy_info { I40E_PHY_TYPE_OFFSET) #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \ I40E_PHY_TYPE_OFFSET) -/* Offset for 2.5G/5G PHY Types value to bit number conversion */ -#define I40E_PHY_TYPE_OFFSET2 (-10) -#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) -#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \ - I40E_PHY_TYPE_OFFSET2) +#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T) +#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T) #define I40E_HW_CAP_MAX_GPIO 30 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO 0 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C 1 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 06/17] net/i40e/base: fix PF reset 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (4 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 07/17] net/i40e/base: fix update link data for X722 Robin Zhang ` (11 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Sylwester Dziedziuch PF has to delete all the filters during reset. If it is fully loaded with filters then it is possible that it will take more than 200 ms to finish the reset resulting in timeout during pf_reset and PF reset failed, -15 error indication. Increasing the timeout value for PF reset from 200 to 1000 to give PF more time to finish reset if it is loaded with filters. Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit") Cc: stable@dpdk.org Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ceedec68bf..aa424e6010 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw, return I40E_ERR_RESET_FAILED; } -#define I40E_PF_RESET_WAIT_COUNT 200 +#define I40E_PF_RESET_WAIT_COUNT 1000 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 07/17] net/i40e/base: fix update link data for X722 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (5 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 06/17] net/i40e/base: fix PF reset Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 08/17] net/i40e/base: fix AOC media type Robin Zhang ` (10 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Jaroslaw Gawin The X722 card has 'Link Type' information elsewhere than the X710. Previously, for all cards, the 'Link Type' information was retrieved by opcode 0x0607 and this value was wrong for all X722 cards. Now this information for X722 only is taken by opcode 0x0600 (function: i40e_aq_get_phy_capabilities) instead of an opcode 0x0607 (function: i40e_aq_get_link_info). All other parameters read by opcode 0x0607 unchanged. Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction") Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time") Cc: stable@dpdk.org Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index aa424e6010..ef061a6b63 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw, hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE) hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU; + /* 'Get Link Status' response data structure from X722 FW has + * different format and does not contain this information + */ if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE && hw->mac.type != I40E_MAC_X722) { __le32 tmp; @@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) return status; /* extra checking needed to ensure link info to user is timely */ - if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && - ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || - !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) { - status = i40e_aq_get_phy_capabilities(hw, false, false, + if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) && + ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) || + !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) || + hw->mac.type == I40E_MAC_X722) { + status = i40e_aq_get_phy_capabilities(hw, false, + hw->mac.type == + I40E_MAC_X722, &abilities, NULL); if (status) return status; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 08/17] net/i40e/base: fix AOC media type 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (6 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 07/17] net/i40e/base: fix update link data for X722 Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 09/17] net/i40e/base: add flags and fields for double VLAN Robin Zhang ` (9 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Dawid Lukwinski For Active Optical Cable (AOC) the correct media type is "Fibre", not "Direct Attach Copper". Fixes: d749d4d89969 ("i40e/base: add AOC PHY types") Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and ACC") Cc: stable@dpdk.org Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ef061a6b63..2ca6a13e79 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_40GBASE_LR4: case I40E_PHY_TYPE_25GBASE_LR: case I40E_PHY_TYPE_25GBASE_SR: + case I40E_PHY_TYPE_10GBASE_AOC: + case I40E_PHY_TYPE_25GBASE_AOC: + case I40E_PHY_TYPE_40GBASE_AOC: media = I40E_MEDIA_TYPE_FIBER; break; case I40E_PHY_TYPE_100BASE_TX: @@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) case I40E_PHY_TYPE_10GBASE_CR1: case I40E_PHY_TYPE_40GBASE_CR4: case I40E_PHY_TYPE_10GBASE_SFPP_CU: - case I40E_PHY_TYPE_40GBASE_AOC: - case I40E_PHY_TYPE_10GBASE_AOC: case I40E_PHY_TYPE_25GBASE_CR: - case I40E_PHY_TYPE_25GBASE_AOC: case I40E_PHY_TYPE_25GBASE_ACC: media = I40E_MEDIA_TYPE_DA; break; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 09/17] net/i40e/base: add flags and fields for double VLAN 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (7 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 08/17] net/i40e/base: fix AOC media type Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 10/17] net/i40e/base: fix headers to match functions Robin Zhang ` (8 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Przemyslaw Patynowski Add flags for outer VLAN and include set port parameters. Add flags, which describe port and switch state for both double VLAN functionality and outer VLAN processing. Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index af9dec1d7f..372dd71c3f 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -768,6 +768,7 @@ struct i40e_aqc_set_switch_config { #define I40E_AQ_SET_SWITCH_CFG_PROMISC 0x0001 #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER 0x0002 #define I40E_AQ_SET_SWITCH_CFG_HW_ATR_EVICT 0x0004 +#define I40E_AQ_SET_SWITCH_CFG_OUTER_VLAN 0x0008 __le16 valid_flags; /* The ethertype in switch_tag is dropped on ingress and used * internally by the switch. Set this to zero for the default @@ -904,7 +905,7 @@ struct i40e_aqc_vsi_properties_data { u8 sec_reserved; /* VLAN section */ __le16 pvid; /* VLANS include priority bits */ - __le16 fcoe_pvid; + __le16 outer_vlan; u8 port_vlan_flags; #define I40E_AQ_VSI_PVLAN_MODE_SHIFT 0x00 #define I40E_AQ_VSI_PVLAN_MODE_MASK (0x03 << \ @@ -920,7 +921,24 @@ struct i40e_aqc_vsi_properties_data { #define I40E_AQ_VSI_PVLAN_EMOD_STR_UP 0x08 #define I40E_AQ_VSI_PVLAN_EMOD_STR 0x10 #define I40E_AQ_VSI_PVLAN_EMOD_NOTHING 0x18 - u8 pvlan_reserved[3]; + u8 outer_vlan_flags; +#define I40E_AQ_VSI_OVLAN_MODE_SHIFT 0x00 +#define I40E_AQ_VSI_OVLAN_MODE_MASK (0x03 << \ + I40E_AQ_VSI_OVLAN_MODE_SHIFT) +#define I40E_AQ_VSI_OVLAN_MODE_UNTAGGED 0x01 +#define I40E_AQ_VSI_OVLAN_MODE_TAGGED 0x02 +#define I40E_AQ_VSI_OVLAN_MODE_ALL 0x03 +#define I40E_AQ_VSI_OVLAN_INSERT_PVID 0x04 +#define I40E_AQ_VSI_OVLAN_EMOD_SHIFT 0x03 +#define I40E_AQ_VSI_OVLAN_EMOD_MASK (0x03 <<\ + I40E_AQ_VSI_OVLAN_EMOD_SHIFT) +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_ALL 0x00 +#define I40E_AQ_VSI_OVLAN_EMOD_SHOW_UP 0x01 +#define I40E_AQ_VSI_OVLAN_EMOD_HIDE_ALL 0x02 +#define I40E_AQ_VSI_OVLAN_EMOD_NOTHING 0x03 +#define I40E_AQ_VSI_OVLAN_CTRL_ENA 0x04 + + u8 pvlan_reserved[2]; /* ingress egress up sections */ __le32 ingress_table; /* bitmap, 3 bits per up */ #define I40E_AQ_VSI_UP_TABLE_UP0_SHIFT 0 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 10/17] net/i40e/base: fix headers to match functions 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (8 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 09/17] net/i40e/base: add flags and fields for double VLAN Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 5:36 ` Zhang, Qi Z 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang ` (7 subsequent siblings) 17 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Jesse Brandeburg Fix several kernel-doc warnings when building with W=1. These changes are only to comments. Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 842ea1996335 ("i40e/base: save link module type") Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY") Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722") Cc: stable@dpdk.org Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_common.c | 10 +++++----- drivers/net/i40e/base/i40e_dcb.c | 2 +- drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- drivers/net/i40e/base/i40e_nvm.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index 2ca6a13e79..baa51e1396 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -2677,7 +2677,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw, } /** - * i40e_get_vsi_params - get VSI configuration info + * i40e_aq_get_vsi_params - get VSI configuration info * @hw: pointer to the hw struct * @vsi_ctx: pointer to a vsi context struct * @cmd_details: pointer to command details structure or NULL @@ -2938,7 +2938,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up) } /** - * i40e_updatelink_status - update status of the HW network link + * i40e_update_link_info - update status of the HW network link * @hw: pointer to the hw struct **/ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) @@ -4830,7 +4830,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index, } /** - * i40e_aq_get_switch_resource_alloc (0x0204) + * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations * @hw: pointer to the hw struct * @num_entries: pointer to u8 to store the number of resource entries returned * @buf: pointer to a user supplied buffer. This buffer must be large enough @@ -6977,7 +6977,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num) } /** - * i40e_blink_phy_led + * i40e_blink_phy_link_led * @hw: pointer to the HW structure * @time: time how long led will blinks in secs * @interval: gap between LED on and off in msecs @@ -7824,7 +7824,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw, } /** - * i40e_aq_opc_set_ns_proxy_table_entry + * i40e_aq_set_ns_proxy_table_entry * @hw: pointer to the HW structure * @ns_proxy_table_entry: pointer to NS table entry command struct * @cmd_details: pointer to command details diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c index 27b52bc365..8f9b7e823f 100644 --- a/drivers/net/i40e/base/i40e_dcb.c +++ b/drivers/net/i40e/base/i40e_dcb.c @@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv, } /** - * i40e_parse_ieee_etsrec_tlv + * i40e_parse_ieee_tlv * @tlv: IEEE 802.1Qaz TLV * @dcbcfg: Local store to update ETS REC data * diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c index d3969396f0..d3bd683ff3 100644 --- a/drivers/net/i40e/base/i40e_lan_hmc.c +++ b/drivers/net/i40e/base/i40e_lan_hmc.c @@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw, } /** - * i40e_delete_hmc_object - remove hmc objects + * i40e_delete_lan_hmc_object - remove hmc objects * @hw: pointer to the HW structure * @info: pointer to i40e_hmc_delete_obj_info struct * diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 561ed21136..67e58cc195 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -7,7 +7,7 @@ #include "i40e_prototype.h" /** - * i40e_init_nvm_ops - Initialize NVM function pointers + * i40e_init_nvm - Initialize NVM function pointers * @hw: pointer to the HW structure * * Setup the function pointers and the NVM info structure. Should be called -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v6 10/17] net/i40e/base: fix headers to match functions 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 10/17] net/i40e/base: fix headers to match functions Robin Zhang @ 2021-10-09 5:36 ` Zhang, Qi Z 0 siblings, 0 replies; 122+ messages in thread From: Zhang, Qi Z @ 2021-10-09 5:36 UTC (permalink / raw) To: Zhang, RobinX, dev; +Cc: Xing, Beilei, Yigit, Ferruh > -----Original Message----- > From: Zhang, RobinX <robinx.zhang@intel.com> > Sent: Saturday, October 9, 2021 9:40 AM > To: dev@dpdk.org > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; > Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; > remy.horton@intel.com; jijiang.liu@intel.com; jing.d.chen@intel.com; Liang, > Cunming <cunming.liang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; > Guo, Junfeng <junfeng.guo@intel.com>; Yang, SteveX > <stevex.yang@intel.com>; Zhang, RobinX <robinx.zhang@intel.com>; > stable@dpdk.org; Brandeburg, Jesse <jesse.brandeburg@intel.com> > Subject: [PATCH v6 10/17] net/i40e/base: fix headers to match functions > fix headers to match functions > Fix several kernel-doc warnings when building with W=1. These changes are > only to comments. "Fix mismatched function name in comments" This is an obvious fix, no need to involve unrelated background. > > Fixes: 8db9e2a1b232 ("i40e: base driver") > Fixes: 842ea1996335 ("i40e/base: save link module type") > Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY") > Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722") > Cc: stable@dpdk.org > > Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> > --- > drivers/net/i40e/base/i40e_common.c | 10 +++++----- > drivers/net/i40e/base/i40e_dcb.c | 2 +- > drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- > drivers/net/i40e/base/i40e_nvm.c | 2 +- > 4 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/net/i40e/base/i40e_common.c > b/drivers/net/i40e/base/i40e_common.c > index 2ca6a13e79..baa51e1396 100644 > --- a/drivers/net/i40e/base/i40e_common.c > +++ b/drivers/net/i40e/base/i40e_common.c > @@ -2677,7 +2677,7 @@ enum i40e_status_code > i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw, } > > /** > - * i40e_get_vsi_params - get VSI configuration info > + * i40e_aq_get_vsi_params - get VSI configuration info > * @hw: pointer to the hw struct > * @vsi_ctx: pointer to a vsi context struct > * @cmd_details: pointer to command details structure or NULL @@ -2938,7 > +2938,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw > *hw, bool *link_up) } > > /** > - * i40e_updatelink_status - update status of the HW network link > + * i40e_update_link_info - update status of the HW network link > * @hw: pointer to the hw struct > **/ > enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw) @@ > -4830,7 +4830,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct > i40e_hw *hw, u8 index, } > > /** > - * i40e_aq_get_switch_resource_alloc (0x0204) > + * i40e_aq_get_switch_resource_alloc - command (0x0204) to get > + allocations > * @hw: pointer to the hw struct > * @num_entries: pointer to u8 to store the number of resource entries > returned > * @buf: pointer to a user supplied buffer. This buffer must be large enough > @@ -6977,7 +6977,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 > dev_num) } > > /** > - * i40e_blink_phy_led > + * i40e_blink_phy_link_led > * @hw: pointer to the HW structure > * @time: time how long led will blinks in secs > * @interval: gap between LED on and off in msecs @@ -7824,7 +7824,7 > @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw > *hw, } > > /** > - * i40e_aq_opc_set_ns_proxy_table_entry > + * i40e_aq_set_ns_proxy_table_entry > * @hw: pointer to the HW structure > * @ns_proxy_table_entry: pointer to NS table entry command struct > * @cmd_details: pointer to command details diff --git > a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c > index 27b52bc365..8f9b7e823f 100644 > --- a/drivers/net/i40e/base/i40e_dcb.c > +++ b/drivers/net/i40e/base/i40e_dcb.c > @@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct > i40e_lldp_org_tlv *tlv, } > > /** > - * i40e_parse_ieee_etsrec_tlv > + * i40e_parse_ieee_tlv > * @tlv: IEEE 802.1Qaz TLV > * @dcbcfg: Local store to update ETS REC data > * > diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c > b/drivers/net/i40e/base/i40e_lan_hmc.c > index d3969396f0..d3bd683ff3 100644 > --- a/drivers/net/i40e/base/i40e_lan_hmc.c > +++ b/drivers/net/i40e/base/i40e_lan_hmc.c > @@ -516,7 +516,7 @@ enum i40e_status_code > i40e_configure_lan_hmc(struct i40e_hw *hw, } > > /** > - * i40e_delete_hmc_object - remove hmc objects > + * i40e_delete_lan_hmc_object - remove hmc objects > * @hw: pointer to the HW structure > * @info: pointer to i40e_hmc_delete_obj_info struct > * > diff --git a/drivers/net/i40e/base/i40e_nvm.c > b/drivers/net/i40e/base/i40e_nvm.c > index 561ed21136..67e58cc195 100644 > --- a/drivers/net/i40e/base/i40e_nvm.c > +++ b/drivers/net/i40e/base/i40e_nvm.c > @@ -7,7 +7,7 @@ > #include "i40e_prototype.h" > > /** > - * i40e_init_nvm_ops - Initialize NVM function pointers > + * i40e_init_nvm - Initialize NVM function pointers > * @hw: pointer to the HW structure > * > * Setup the function pointers and the NVM info structure. Should be called > -- > 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 11/17] net/i40e/base: fix potentially uninitialized variables 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (9 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 10/17] net/i40e/base: fix headers to match functions Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang ` (6 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Christopher Pau The status of i40e_read_nvm_word is not checked, so variables set from this function could be used uninitialized. In this case, preserve the existing flow that does not block initialization by initializing these values from the start. Fixes: 8d6c51fcd24b ("i40e/base: get OEM version") Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only") Cc: stable@dpdk.org Signed-off-by: Christopher Pau <christopher.pau@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c index 38d3429e5b..27c82d9b44 100644 --- a/drivers/net/i40e/base/i40e_adminq.c +++ b/drivers/net/i40e/base/i40e_adminq.c @@ -652,8 +652,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw) { struct i40e_adminq_info *aq = &hw->aq; enum i40e_status_code ret_code; - u16 cfg_ptr, oem_hi, oem_lo; - u16 eetrack_lo, eetrack_hi; + u16 oem_hi = 0, oem_lo = 0; + u16 eetrack_hi = 0; + u16 eetrack_lo = 0; + u16 cfg_ptr = 0; int retry = 0; /* verify input for valid configuration */ -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 12/17] net/i40e/base: fix checksum is used incorrectly 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (10 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 13/17] net/i40e/base: add calculation of MAC frequency if no link Robin Zhang ` (5 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, stable, Christopher Pau The variable checksum from i40e_calc_nvm_checksum is used before return value is checked. Fix this logic. Fixes: 8db9e2a1b232 ("i40e: base driver") Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM") Cc: stable@dpdk.org Signed-off-by: Christopher Pau <christopher.pau@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_nvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c index 67e58cc195..f385042601 100644 --- a/drivers/net/i40e/base/i40e_nvm.c +++ b/drivers/net/i40e/base/i40e_nvm.c @@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw) DEBUGFUNC("i40e_update_nvm_checksum"); ret_code = i40e_calc_nvm_checksum(hw, &checksum); - le_sum = CPU_TO_LE16(checksum); - if (ret_code == I40E_SUCCESS) + if (ret_code == I40E_SUCCESS) { + le_sum = CPU_TO_LE16(checksum); ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD, 1, &le_sum, true); + } return ret_code; } -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 13/17] net/i40e/base: add calculation of MAC frequency if no link 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (11 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 14/17] net/i40e/base: separate kernel allocated Rx bi rings Robin Zhang ` (4 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Piotr Kwapulinski Add macros and structures for MAC frequency calculation in case the link is not present. Remove duplicate definition in i40e_ethdev.c Signed-off-by: Piotr Kwapulinski <piotr.kwapulinski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 9 +++++++++ drivers/net/i40e/base/i40e_register.h | 10 ++++++++++ drivers/net/i40e/base/i40e_type.h | 8 ++++++++ drivers/net/i40e/i40e_ethdev.c | 3 +-- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index 372dd71c3f..d2615705a9 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -2035,6 +2035,15 @@ enum i40e_aq_link_speed { I40E_LINK_SPEED_25GB = (1 << I40E_LINK_SPEED_25GB_SHIFT), }; +enum i40e_prt_mac_pcs_link_speed { + I40E_PRT_MAC_PCS_LINK_SPEED_UNKNOWN = 0, + I40E_PRT_MAC_PCS_LINK_SPEED_100MB, + I40E_PRT_MAC_PCS_LINK_SPEED_1GB, + I40E_PRT_MAC_PCS_LINK_SPEED_10GB, + I40E_PRT_MAC_PCS_LINK_SPEED_40GB, + I40E_PRT_MAC_PCS_LINK_SPEED_20GB +}; + struct i40e_aqc_module_desc { u8 oui[3]; u8 reserved1; diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h index ee4f333f9c..75eff845f1 100644 --- a/drivers/net/i40e/base/i40e_register.h +++ b/drivers/net/i40e/base/i40e_register.h @@ -1411,6 +1411,11 @@ #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE1_MASK I40E_MASK(0x3, I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE1_SHIFT) #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_SHIFT 14 #define I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_MASK I40E_MASK(0x3, I40E_PRTMAC_PCS_XAUI_SWAP_B_SWAP_RX_LANE0_SHIFT) +/* _i=0...3 */ /* Reset: GLOBR */ +#define I40E_PRTMAC_PCS_LINK_STATUS1(_i) (0x0008C200 + ((_i) * 4)) +#define I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_SHIFT 24 +#define I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_MASK \ + I40E_MASK(0x7, I40E_PRTMAC_PCS_LINK_STATUS1_LINK_SPEED_SHIFT) #define I40E_GL_FWRESETCNT 0x00083100 /* Reset: POR */ #define I40E_GL_FWRESETCNT_FWRESETCNT_SHIFT 0 #define I40E_GL_FWRESETCNT_FWRESETCNT_MASK I40E_MASK(0xFFFFFFFF, I40E_GL_FWRESETCNT_FWRESETCNT_SHIFT) @@ -3873,6 +3878,11 @@ #define I40E_PRTMAC_LINK_DOWN_COUNTER 0x001E2440 /* Reset: GLOBR */ #define I40E_PRTMAC_LINK_DOWN_COUNTER_LINK_DOWN_COUNTER_SHIFT 0 #define I40E_PRTMAC_LINK_DOWN_COUNTER_LINK_DOWN_COUNTER_MASK I40E_MASK(0xFFFF, I40E_PRTMAC_LINK_DOWN_COUNTER_LINK_DOWN_COUNTER_SHIFT) +/* _i=0...3 */ /* Reset: GLOBR */ +#define I40E_PRTMAC_LINKSTA(_i) (0x001E2420 + ((_i) * 4)) +#define I40E_PRTMAC_LINKSTA_MAC_LINK_SPEED_SHIFT 27 +#define I40E_PRTMAC_LINKSTA_MAC_LINK_SPEED_MASK \ + I40E_MASK(0x7, I40E_PRTMAC_LINKSTA_MAC_LINK_SPEED_SHIFT) #define I40E_GLNVM_AL_REQ 0x000B6164 /* Reset: POR */ #define I40E_GLNVM_AL_REQ_POR_SHIFT 0 #define I40E_GLNVM_AL_REQ_POR_MASK I40E_MASK(0x1, I40E_GLNVM_AL_REQ_POR_SHIFT) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 0323887550..49e05d89fa 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -236,6 +236,14 @@ enum i40e_queue_type { I40E_QUEUE_TYPE_UNKNOWN }; +enum i40e_prt_mac_link_speed { + I40E_PRT_MAC_LINK_SPEED_100MB = 0, + I40E_PRT_MAC_LINK_SPEED_1GB, + I40E_PRT_MAC_LINK_SPEED_10GB, + I40E_PRT_MAC_LINK_SPEED_40GB, + I40E_PRT_MAC_LINK_SPEED_20GB +}; + struct i40e_link_status { enum i40e_aq_phy_type phy_type; enum i40e_aq_link_speed link_speed; diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 6f1765117a..b00f9cd396 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2855,7 +2855,6 @@ static __rte_always_inline void update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) { /* Link status registers and values*/ -#define I40E_PRTMAC_LINKSTA 0x001E2420 #define I40E_REG_LINK_UP 0x40000080 #define I40E_PRTMAC_MACC 0x001E24E0 #define I40E_REG_MACC_25GB 0x00020000 @@ -2868,7 +2867,7 @@ update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) uint32_t link_speed; uint32_t reg_val; - reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA); + reg_val = I40E_READ_REG(hw, I40E_PRTMAC_LINKSTA(0)); link_speed = reg_val & I40E_REG_SPEED_MASK; reg_val &= I40E_REG_LINK_UP; link->link_status = (reg_val == I40E_REG_LINK_UP) ? 1 : 0; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 14/17] net/i40e/base: separate kernel allocated Rx bi rings 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (12 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 13/17] net/i40e/base: add calculation of MAC frequency if no link Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 5:39 ` Zhang, Qi Z 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 15/17] net/i40e/base: update FVL FW API version to 1.15 Robin Zhang ` (3 subsequent siblings) 17 siblings, 1 reply; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Björn Töpel Continuing the path to support MEM_TYPE_XSK_BUFF_POOL, the AF_XDP zero-copy/sk_buff rx_bi rings are now separate. Functions to properly allocate the different rings are added as well. The purpose of this commit is sync with latest share code. Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 49e05d89fa..813c1ec00f 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -817,7 +817,7 @@ union i40e_32byte_rx_desc { __le64 rsvd2; } read; struct { - struct { + struct i40e_32b_rx_wb_qw0 { struct { union { __le16 mirroring_status; @@ -855,6 +855,9 @@ union i40e_32byte_rx_desc { } hi_dword; } qword3; } wb; /* writeback */ + struct { + u64 qword[4]; + } raw; }; #define I40E_RXD_QW0_MIRROR_STATUS_SHIFT 8 -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v6 14/17] net/i40e/base: separate kernel allocated Rx bi rings 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 14/17] net/i40e/base: separate kernel allocated Rx bi rings Robin Zhang @ 2021-10-09 5:39 ` Zhang, Qi Z 0 siblings, 0 replies; 122+ messages in thread From: Zhang, Qi Z @ 2021-10-09 5:39 UTC (permalink / raw) To: Zhang, RobinX, dev; +Cc: Xing, Beilei, Yigit, Ferruh > -----Original Message----- > From: Zhang, RobinX <robinx.zhang@intel.com> > Sent: Saturday, October 9, 2021 9:40 AM > To: dev@dpdk.org > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; > Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; > remy.horton@intel.com; jijiang.liu@intel.com; jing.d.chen@intel.com; Liang, > Cunming <cunming.liang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; > Guo, Junfeng <junfeng.guo@intel.com>; Yang, SteveX > <stevex.yang@intel.com>; Zhang, RobinX <robinx.zhang@intel.com>; Björn > Töpel <bjorn.topel@intel.com> > Subject: [PATCH v6 14/17] net/i40e/base: separate kernel allocated Rx bi rings The title is still misleading Changed to " add raw format for 32 bytes Rx description" > > Continuing the path to support MEM_TYPE_XSK_BUFF_POOL, the AF_XDP > zero-copy/sk_buff rx_bi rings are now separate. Functions to properly allocate > the different rings are added as well. > > The purpose of this commit is sync with latest share code. Changed to "Add raw format for i40e_32byte_rx_desc, right now this only be used by kernel driver, the commit is just to sync with kernel driver" > > Signed-off-by: Björn Töpel <bjorn.topel@intel.com> > Signed-off-by: Robin Zhang <robinx.zhang@intel.com> > --- > drivers/net/i40e/base/i40e_type.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/i40e/base/i40e_type.h > b/drivers/net/i40e/base/i40e_type.h > index 49e05d89fa..813c1ec00f 100644 > --- a/drivers/net/i40e/base/i40e_type.h > +++ b/drivers/net/i40e/base/i40e_type.h > @@ -817,7 +817,7 @@ union i40e_32byte_rx_desc { > __le64 rsvd2; > } read; > struct { > - struct { > + struct i40e_32b_rx_wb_qw0 { > struct { > union { > __le16 mirroring_status; > @@ -855,6 +855,9 @@ union i40e_32byte_rx_desc { > } hi_dword; > } qword3; > } wb; /* writeback */ > + struct { > + u64 qword[4]; > + } raw; > }; > > #define I40E_RXD_QW0_MIRROR_STATUS_SHIFT 8 > -- > 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 15/17] net/i40e/base: update FVL FW API version to 1.15 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (13 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 14/17] net/i40e/base: separate kernel allocated Rx bi rings Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 16/17] net/i40e/base: add defines related to DDP Robin Zhang ` (2 subsequent siblings) 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Maciej Paczkowski Update FVL FW API version to 1.15 Signed-off-by: Maciej Paczkowski <maciej.paczkowski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h index d2615705a9..def307b59d 100644 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h @@ -13,7 +13,7 @@ #define I40E_FW_API_VERSION_MAJOR 0x0001 #define I40E_FW_API_VERSION_MINOR_X722 0x000C -#define I40E_FW_API_VERSION_MINOR_X710 0x000C +#define I40E_FW_API_VERSION_MINOR_X710 0x000F #define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \ I40E_FW_API_VERSION_MINOR_X710 : \ -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 16/17] net/i40e/base: add defines related to DDP 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (14 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 15/17] net/i40e/base: update FVL FW API version to 1.15 Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 17/17] net/i40e/base: update version in readme Robin Zhang 2021-10-09 5:41 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Zhang, Qi Z 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang, Artur Tyminski This patch adds some defines related to DDP Track ID. Signed-off-by: Artur Tyminski <arturx.tyminski@intel.com> Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/i40e_type.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h index 813c1ec00f..f4a3d66759 100644 --- a/drivers/net/i40e/base/i40e_type.h +++ b/drivers/net/i40e/base/i40e_type.h @@ -1988,6 +1988,8 @@ struct i40e_metadata_segment { struct i40e_ddp_version version; #define I40E_DDP_TRACKID_RDONLY 0 #define I40E_DDP_TRACKID_INVALID 0xFFFFFFFF +#define I40E_DDP_TRACKID_GRP_MSK 0x00FF0000 +#define I40E_DDP_TRACKID_GRP_COMP_ALL 0xFF u32 track_id; char name[I40E_DDP_NAME_SIZE]; }; -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* [dpdk-dev] [PATCH v6 17/17] net/i40e/base: update version in readme 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (15 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 16/17] net/i40e/base: add defines related to DDP Robin Zhang @ 2021-10-09 1:39 ` Robin Zhang 2021-10-09 5:41 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Zhang, Qi Z 17 siblings, 0 replies; 122+ messages in thread From: Robin Zhang @ 2021-10-09 1:39 UTC (permalink / raw) To: dev Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton, jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo, stevex.yang, Robin Zhang Update base code version in README. Signed-off-by: Robin Zhang <robinx.zhang@intel.com> --- drivers/net/i40e/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/base/README b/drivers/net/i40e/base/README index 6af2993116..2e4fa5a921 100644 --- a/drivers/net/i40e/base/README +++ b/drivers/net/i40e/base/README @@ -6,7 +6,7 @@ Intel® I40E driver ================== This directory contains source code of FreeBSD i40e driver of version -cid-i40e.2020.08.27.tar.gz released by the team which develops +cid-i40e.2021.08.16.tar.gz released by the team which develops basic drivers for any i40e NIC. The directory of base/ contains the original source package. This driver is valid for the product(s) listed below -- 2.25.1 ^ permalink raw reply [flat|nested] 122+ messages in thread
* Re: [dpdk-dev] [PATCH v6 00/17] i40e base code update 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang ` (16 preceding siblings ...) 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 17/17] net/i40e/base: update version in readme Robin Zhang @ 2021-10-09 5:41 ` Zhang, Qi Z 17 siblings, 0 replies; 122+ messages in thread From: Zhang, Qi Z @ 2021-10-09 5:41 UTC (permalink / raw) To: Zhang, RobinX, dev Cc: Xing, Beilei, Zhang, Helin, Wu, Jingjing, remy.horton, jijiang.liu, jing.d.chen, Liang, Cunming, Lu, Wenzhuo, Guo, Junfeng, Yang, SteveX > -----Original Message----- > From: Zhang, RobinX <robinx.zhang@intel.com> > Sent: Saturday, October 9, 2021 9:40 AM > To: dev@dpdk.org > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; > Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; > remy.horton@intel.com; jijiang.liu@intel.com; jing.d.chen@intel.com; Liang, > Cunming <cunming.liang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; > Guo, Junfeng <junfeng.guo@intel.com>; Yang, SteveX > <stevex.yang@intel.com>; Zhang, RobinX <robinx.zhang@intel.com> > Subject: [PATCH v6 00/17] i40e base code update > > update i40e base code. > > source code of i40e driver: > cid-i40e.2021.08.16.tar.gz > > changelog in i40e share repo: > From 59a080f4fafe ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux > support") To 2c7aab559654 ("i40e-shared: Add defines related to DDP") > > The following commits are ignored: > cb9139e3bce8 ("i40e-shared: Fix not blinking X722 with x557 PHY via ‘ethtool > -p'") > c09d4f9cf390 ("i40e-shared: i40e-shared: Fix build warning -Wformat related to > integer size") > ff8a1abc6c17 ("i40e-shared: Fix build warning with __packed") 59a080f4fafe > ("i40e-shared: Add opcode 0x0406 and 0x0416 to Linux > support") > > v6: > - fix some typos > v5: > - refine commit messages > v4: > - update base code to cid-i40e.2021.08.16 > v3: > - there has a fix patch contains two issues, split it into two patches > v2: > - refine commit messages and macro name > > Robin Zhang (17): > net/i40e/base: add v2 version of send ASQ command functions > net/i40e/base: add Min SRev for 4 more X722 modules > net/i40e/base: set TSA table values when parsing CEE config > net/i40e/base: define new shadow RAM pointers > net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters > net/i40e/base: fix PF reset > net/i40e/base: fix update link data for X722 > net/i40e/base: fix AOC media type > net/i40e/base: add flags and fields for double VLAN > net/i40e/base: fix headers to match functions > net/i40e/base: fix potentially uninitialized variables > net/i40e/base: fix checksum is used incorrectly > net/i40e/base: add calculation of MAC frequency if no link > net/i40e/base: separate kernel allocated Rx bi rings > net/i40e/base: update FVL FW API version to 1.15 > net/i40e/base: add defines related to DDP > net/i40e/base: update version in readme > > drivers/net/i40e/base/README | 2 +- > drivers/net/i40e/base/i40e_adminq.c | 79 +++++++++-- > drivers/net/i40e/base/i40e_adminq_cmd.h | 55 ++++++-- > drivers/net/i40e/base/i40e_common.c | 175 +++++++++++++++++++----- > drivers/net/i40e/base/i40e_dcb.c | 10 +- > drivers/net/i40e/base/i40e_lan_hmc.c | 2 +- > drivers/net/i40e/base/i40e_nvm.c | 7 +- > drivers/net/i40e/base/i40e_prototype.h | 17 +++ > drivers/net/i40e/base/i40e_register.h | 10 ++ > drivers/net/i40e/base/i40e_type.h | 26 +++- > drivers/net/i40e/i40e_ethdev.c | 3 +- > 11 files changed, 318 insertions(+), 68 deletions(-) > > -- > 2.25.1 Applied to dpdk-next-net-intel. Commit log are refined base on the previous suggestion. Thanks Qi ^ permalink raw reply [flat|nested] 122+ messages in thread
end of thread, other threads:[~2021-10-09 5:41 UTC | newest] Thread overview: 122+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-06-18 6:38 [dpdk-dev] [PATCH 00/14] i40e base code update Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 01/14] net/i40e/base: add new versions of send ASQ command functions Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 02/14] net/i40e/base: update FVL FW API version to 1.14 Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 03/14] net/i40e/base: add support for Min Rollback Revision for 4 more FPK modules Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 04/14] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 05/14] net/i40e/base: define new Shadow RAM pointers Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 07/14] net/i40e/base: fix PF reset failed Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 08/14] net/i40e/base: fix update link data for X722 Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 10/14] net/i40e/base: add flags and fields for double vlan processing Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 11/14] net/i40e/base: 10GBASE-ER Optical modules recognition Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 12/14] net/i40e/base: fix headers to match functions Robin Zhang 2021-06-18 6:38 ` [dpdk-dev] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang 2021-06-21 6:52 ` Xing, Beilei 2021-06-18 6:38 ` [dpdk-dev] [PATCH 14/14] net/i40e/base: update version in readme Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 00/14] i40e base code update Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 01/14] net/i40e/base: add new versions of send ASQ command functions Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 02/14] net/i40e/base: update FW API version to 1.14 Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 03/14] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 04/14] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang 2021-06-21 6:36 ` [dpdk-dev] [PATCH v2 05/14] net/i40e/base: define new Shadow RAM pointers Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 07/14] net/i40e/base: fix PF reset failed Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 08/14] net/i40e/base: fix update link data for X722 Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 10/14] net/i40e/base: add flags and fields for double vlan processing Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 11/14] net/i40e/base: 10GBASE-ER Optical modules recognition Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 12/14] net/i40e/base: fix headers to match functions Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang 2021-06-21 6:37 ` [dpdk-dev] [PATCH v2 14/14] net/i40e/base: update version in readme Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 00/15] i40e base code update Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 01/15] net/i40e/base: add new versions of send ASQ command functions Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 02/15] net/i40e/base: update X710 FW API version to 1.14 Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 03/15] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 04/15] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 05/15] net/i40e/base: define new Shadow RAM pointers Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 06/15] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 07/15] net/i40e/base: fix PF reset failed Robin Zhang 2021-06-21 7:51 ` [dpdk-dev] [PATCH v3 08/15] net/i40e/base: fix update link data for X722 Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 09/15] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 10/15] net/i40e/base: add flags and fields for double vlan processing Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 11/15] net/i40e/base: 10GBASE-ER Optical modules recognition Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 12/15] net/i40e/base: fix headers to match functions Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 13/15] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 14/15] net/i40e/base: fix checksum is used before return value is checked Robin Zhang 2021-06-21 7:52 ` [dpdk-dev] [PATCH v3 15/15] net/i40e/base: update version in readme Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 01/18] net/i40e/base: add new versions of send ASQ command functions Robin Zhang 2021-09-29 16:21 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 02/18] net/i40e/base: add support for Min Rollback Revision for 4 more X722 modules Robin Zhang 2021-09-29 16:21 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 03/18] net/i40e/base: set TSA table values when parsing CEE configuration Robin Zhang 2021-09-29 16:21 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 04/18] net/i40e/base: define new Shadow RAM pointers Robin Zhang 2021-09-29 16:21 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang 2021-09-29 16:21 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 06/18] net/i40e/base: fix PF reset failed Robin Zhang 2021-09-29 16:21 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 07/18] net/i40e/base: fix update link data for X722 Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang 2021-09-29 16:21 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 09/18] net/i40e/base: add flags and fields for double vlan processing Robin Zhang 2021-09-29 16:22 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 10/18] net/i40e/base: fix headers to match functions Robin Zhang 2021-09-29 15:59 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 11/18] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 12/18] net/i40e/base: fix checksum is used before return value is checked Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 13/18] net/i40e/base: add defs for MAC frequency calculation if no link Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 14/18] net/i40e/base: separate kernel allocated rx_bi rings from AF_XDP rings Robin Zhang 2021-09-29 16:22 ` Ferruh Yigit 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 15/18] net/i40e/base: Update FVL FW API version to 1.15 Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 16/18] net/i40e/base: add defines related to DDP Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 17/18] net/i40e/base: update version in readme Robin Zhang 2021-09-06 2:02 ` [dpdk-dev] [PATCH v4 18/18] net/i40e: fix redefinition warning Robin Zhang 2021-09-27 9:17 ` Xing, Beilei 2021-09-27 9:30 ` Zhang, RobinX 2021-09-27 10:37 ` Kevin Traynor 2021-09-27 11:00 ` Zhang, Qi Z 2021-09-27 9:41 ` [dpdk-dev] [PATCH v4 00/18] i40e base code update Xing, Beilei 2021-09-27 12:09 ` Zhang, Qi Z 2021-09-29 16:21 ` Ferruh Yigit 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 00/17] " Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 01/17] net/i40e/base: add v2 version of send ASQ command functions Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 02/17] net/i40e/base: add Min SRev for 4 more X722 modules Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 03/17] net/i40e/base: set TSA table values when parsing CEE config Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 04/17] net/i40e/base: define new shadow RAM pointers Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 06/17] net/i40e/base: fix PF reset Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 07/17] net/i40e/base: fix update link data for X722 Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 08/17] net/i40e/base: fix AOC media type Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 09/17] net/i40e/base: add flags and fields for double VLAN Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 10/17] net/i40e/base: fix headers to match functions Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 13/17] net/i40e/base: add calculation of MAC frequency if no link Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 14/17] net/i40e/base: separate kernel allocated Rx bi rings Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 15/17] net/i40e/base: update FVL FW API version to 1.15 Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 16/17] net/i40e/base: add defines related to DDP Robin Zhang 2021-10-09 1:26 ` [dpdk-dev] [PATCH v5 17/17] net/i40e/base: update version in readme Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 01/17] net/i40e/base: add v2 version of send ASQ command functions Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 02/17] net/i40e/base: add Min SRev for 4 more X722 modules Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 03/17] net/i40e/base: set TSA table values when parsing CEE config Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 04/17] net/i40e/base: define new shadow RAM pointers Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 06/17] net/i40e/base: fix PF reset Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 07/17] net/i40e/base: fix update link data for X722 Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 08/17] net/i40e/base: fix AOC media type Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 09/17] net/i40e/base: add flags and fields for double VLAN Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 10/17] net/i40e/base: fix headers to match functions Robin Zhang 2021-10-09 5:36 ` Zhang, Qi Z 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 13/17] net/i40e/base: add calculation of MAC frequency if no link Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 14/17] net/i40e/base: separate kernel allocated Rx bi rings Robin Zhang 2021-10-09 5:39 ` Zhang, Qi Z 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 15/17] net/i40e/base: update FVL FW API version to 1.15 Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 16/17] net/i40e/base: add defines related to DDP Robin Zhang 2021-10-09 1:39 ` [dpdk-dev] [PATCH v6 17/17] net/i40e/base: update version in readme Robin Zhang 2021-10-09 5:41 ` [dpdk-dev] [PATCH v6 00/17] i40e base code update Zhang, Qi Z
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).