net/qede/base: fix for FW bug
PATCH 1/3 net/qede/base: fix for FW bug
In our testing we have identified a critical FW bug. Performance is degraded significantly for certain packet sizes with 8.40.25.0 FW.
This patch updates the FW to version 8.40.33.0. The updated FW has a fix to performance issue.
The patch also adds initialization for FW overlay RAM as part of hardware initialization which is required by the new FW.
--- doc/guides/nics/qede.rst | 4 +- drivers/net/qede/base/common_hsi.h | 6 +- drivers/net/qede/base/ecore.h | 4 +- drivers/net/qede/base/ecore_dev.c | 19 ++- drivers/net/qede/base/ecore_hsi_debug_tools.h | 3 + drivers/net/qede/base/ecore_hw.c | 4 +- drivers/net/qede/base/ecore_init_fw_funcs.c | 138 ++++++++++++++++++ drivers/net/qede/base/ecore_init_fw_funcs.h | 35 +++++ drivers/net/qede/base/ecore_int.c | 14 +- drivers/net/qede/base/ecore_iro_values.h | 122 ++++++++-------- drivers/net/qede/qede_ethdev.h | 2 +- drivers/net/qede/qede_main.c | 2 +- 12 files changed, 274 insertions(+), 79 deletions(-)
doc/guides/nics/qede.rst +2 -2
@@ -78,9 +78,9 @@ Supported QLogic Adapters Prerequisites ------------- -- Requires storm firmware version **8.37.7.0**. Firmware may be available +- Requires storm firmware version **8.40.33.0**. Firmware may be available inbox in certain newer Linux distros under the standard directory - ``E.g. /lib/firmware/qed/qed_init_values-8.37.7.0.bin``. + ``E.g. /lib/firmware/qed/qed_init_values-8.40.33.0.bin``. If the required firmware files are not available then download it from `linux-firmware git repository <http://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qed>`_ or `QLogic Driver Download Center <http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/DefaultNewSearch.aspx>`_.
drivers/net/qede/base/common_hsi.h +3 -3
@@ -92,10 +92,10 @@/****************************************************************************/ -#define FW_MAJOR_VERSION 8 +#define FW_MAJOR_VERSION 8#define FW_MINOR_VERSION 40 -#define FW_REVISION_VERSION 25 -#define FW_ENGINEERING_VERSION 0 +#define FW_REVISION_VERSION 33 +#define FW_ENGINEERING_VERSION 0/***********************/ /* COMMON HW CONSTANTS */
drivers/net/qede/base/ecore.h +3 -1
@@ -29,7 +29,7 @@#define ECORE_MAJOR_VERSION 8#define ECORE_MINOR_VERSION 40 -#define ECORE_REVISION_VERSION 18 +#define ECORE_REVISION_VERSION 26#define ECORE_ENGINEERING_VERSION 0#define ECORE_VERSION \
@@ -699,6 +699,8 @@ struct ecore_hwfn {*/ bool b_en_pacing; +struct phys_mem_desc *fw_overlay_mem; +/* @DPDK */ struct ecore_ptt *p_arfs_ptt; };
drivers/net/qede/base/ecore_dev.c +17 -2
@@ -1653,6 +1653,7 @@ void ecore_resc_free(struct ecore_dev *p_dev)ecore_dmae_info_free (p_hwfn);ecore_dcbx_info_free (p_hwfn);ecore_dbg_user_data_free (p_hwfn); +ecore_fw_overlay_mem_free (p_hwfn, p_hwfn->fw_overlay_mem);/* @@@TBD Flush work-queue ? */ /* destroy doorbell recovery mechanism */
@@ -3467,6 +3468,8 @@ ecore_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,if (rc)return rc; +ecore_fw_overlay_init_ram (p_hwfn, p_ptt, p_hwfn->fw_overlay_mem); +/* Pure runtime initializations - directly to the HW */ ecore_int_igu_init_pure_rt (p_hwfn, p_ptt, true, true);
@@ -3494,7 +3497,7 @@ ecore_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,if (IS_LEAD_HWFN (p_hwfn)) { rc =ecore_llh_hw_init_pf (p_hwfn, p_ptt, p_params->avoid_eng_affin); -if (rc) +if (rc !=ECORE_SUCCESS )return rc; }
@@ -3510,7 +3513,6 @@ ecore_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,if (rc) {DP_NOTICE (p_hwfn, true,"Function start ramrod failed\n" ); - }else {return rc; } prs_reg =ecore_rd (p_hwfn, p_ptt,PRS_REG_SEARCH_TAG1 );
@@ -3677,6 +3679,8 @@ enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,u32 load_code, resp, param, drv_mb_param;bool b_default_mtu = true;struct ecore_hwfn *p_hwfn; +const u32 *fw_overlays; +u32 fw_overlays_len;enum _ecore_status_t rc =ECORE_SUCCESS ;u16 ether_type;int i;
@@ -3815,6 +3819,17 @@ enum _ecore_status_t ecore_hw_init(struct ecore_dev *p_dev,*/ ecore_pglueb_clear_err (p_hwfn, p_hwfn->p_main_ptt); + fw_overlays = p_dev->fw_data->fw_overlays; + fw_overlays_len = p_dev->fw_data->fw_overlays_len; + p_hwfn->fw_overlay_mem = +ecore_fw_overlay_mem_alloc (p_hwfn, fw_overlays, + fw_overlays_len); +if (!p_hwfn->fw_overlay_mem) { +DP_NOTICE (p_hwfn, false, +"Failed to allocate fw overlay memory\n" ); + goto load_err; + } +switch (load_code) {case FW_MSG_CODE_DRV_LOAD_ENGINE : rc = ecore_hw_init_common(p_hwfn, p_hwfn->p_main_ptt,
drivers/net/qede/base/ecore_hsi_debug_tools.h +3 -0
@@ -917,6 +917,9 @@ enum dbg_grc_params {DBG_GRC_PARAM_NO_FW_VER /* dont read FW/MFW version (0/1) */ ,DBG_GRC_PARAM_RESERVED3 /* reserved */ ,DBG_GRC_PARAM_DUMP_MCP_HW_DUMP /* dump MCP HW Dump (0/1) */ , +DBG_GRC_PARAM_DUMP_ILT_CDUC /* dump ILT CDUC client (0/1) */ , +DBG_GRC_PARAM_DUMP_ILT_CDUT /* dump ILT CDUT client (0/1) */ , +DBG_GRC_PARAM_DUMP_CAU_EXT /* dump CAU extended memories (0/1) */ , MAX_DBG_GRC_PARAMS };
drivers/net/qede/base/ecore_hw.c +2 -2
@@ -712,7 +712,7 @@ static enum _ecore_status_t ecore_dmae_operation_wait(struct ecore_hwfn *p_hwfn)while (*p_hwfn->dmae_info.p_completion_word !=DMAE_COMPLETION_VAL ) {OSAL_UDELAY (DMAE_MIN_WAIT_TIME );if (++wait_cnt > wait_cnt_limit) { - DP_NOTICE(p_hwfn->p_dev, ECORE_MSG_HW, + DP_NOTICE(p_hwfn->p_dev, false, "Timed-out waiting for operation to" " complete. Completion word is 0x%08x" " expected 0x%08x.\n",
@@ -805,7 +805,7 @@ ecore_dmae_execute_sub_operation(struct ecore_hwfn *p_hwfn, length_dw * sizeof(u32), true);if (ecore_status !=ECORE_SUCCESS ) { - DP_NOTICE(p_hwfn, ECORE_MSG_HW, + DP_NOTICE(p_hwfn, false, "Wait Failed. source_addr 0x%lx, grc_addr 0x%lx, size_in_dwords 0x%x, intermediate buffer 0x%lx.\n", (unsigned long)src_addr, (unsigned long)dst_addr, length_dw,
drivers/net/qede/base/ecore_init_fw_funcs.c +138 -0
141 lines not on this page · raw message
drivers/net/qede/base/ecore_init_fw_funcs.h +35 -0
@@ -553,5 +553,40 @@ void ecore_set_rdma_error_level(struct ecore_hwfn *p_hwfn,struct ecore_ptt *p_ptt, u8 assert_level[NUM_STORMS]); +/** +* @brief ecore_fw_overlay_mem_alloc - Allocates and fills the FW overlay memory +* +* @param p_hwfn - HW device data +* @param fw_overlay_in_buf - the input FW overlay buffer. +* @param buf_size - the size of the input FW overlay buffer in bytes. +* must be aligned to dwords. +* @param fw_overlay_out_mem - OUT: a pointer to the allocated overlays memory. +* +* @return a pointer to the allocated overlays memory, or OSAL_NULL in case of +* failures. +*/ +struct phys_mem_desc *ecore_fw_overlay_mem_alloc (struct ecore_hwfn *p_hwfn, +const u32 *const fw_overlay_in_buf, +u32 buf_size_in_bytes); + +/** +* @brief ecore_fw_overlay_init_ram - Initializes the FW overlay RAM. +* +* @param p_hwfn - HW device data. +* @param p_ptt - ptt window used for writing the registers. +* @param fw_overlay_mem - the allocated FW overlay memory. +*/ +void ecore_fw_overlay_init_ram (struct ecore_hwfn *p_hwfn, +struct ecore_ptt *p_ptt, +struct phys_mem_desc *fw_overlay_mem); + +/** +* @brief ecore_fw_overlay_mem_free - Frees the FW overlay memory. +* +* @param p_hwfn - HW device data. +* @param fw_overlay_mem - the allocated FW overlay memory to free. +*/ +void ecore_fw_overlay_mem_free (struct ecore_hwfn *p_hwfn, +struct phys_mem_desc *fw_overlay_mem);#endif
drivers/net/qede/base/ecore_int.c +8 -6
@@ -192,7 +192,10 @@ static enum _ecore_status_t ecore_pswhst_attn_cb(struct ecore_hwfn *p_hwfn)return ECORE_SUCCESS ; } -#define ECORE_GRC_ATTENTION_VALID_BIT (1 << 0) +/* Register GRC_REG_TIMEOUT_ATTN_ACCESS_VALID */ +#define ECORE_GRC_ATTENTION_VALID_BIT_MASK (0x1) +#define ECORE_GRC_ATTENTION_VALID_BIT_SHIFT (0) +#define ECORE_GRC_ATTENTION_ADDRESS_MASK (0x7fffff << 0)#define ECORE_GRC_ATTENTION_RDWR_BIT (1 << 23)#define ECORE_GRC_ATTENTION_MASTER_MASK (0xf << 24)
@@ -237,15 +240,14 @@ static enum _ecore_status_t ecore_grc_attn_cb(struct ecore_hwfn *p_hwfn)u32 tmp, tmp2;/* We've already cleared the timeout interrupt register, so we learn -* of interrupts via the validity register. -* Any attention which is not for a timeout event is treated as fatal. +* of interrupts via the validity register. If it is not a timeout do +* nothing. It is too late at this stage to differentiate spurious +* interrupt from fatal grc attention. */ tmp =ecore_rd (p_hwfn, p_hwfn->p_dpc_ptt,GRC_REG_TIMEOUT_ATTN_ACCESS_VALID ); -if (!(tmp &ECORE_GRC_ATTENTION_VALID_BIT )) { - rc =ECORE_INVAL ; +if (!(GET_FIELD (tmp,ECORE_GRC_ATTENTION_VALID_BIT ))) goto out; - }/* Read the GRC timeout information */ tmp = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
drivers/net/qede/base/ecore_iro_values.h +61 -61
206 lines not on this page · raw message
drivers/net/qede/qede_ethdev.h +1 -1
@@ -46,7 +46,7 @@#define QEDE_PMD_VER_PREFIX "QEDE PMD"#define QEDE_PMD_VERSION_MAJOR 2#define QEDE_PMD_VERSION_MINOR 11 -#define QEDE_PMD_VERSION_REVISION 0 +#define QEDE_PMD_VERSION_REVISION 3#define QEDE_PMD_VERSION_PATCH 1#define QEDE_PMD_DRV_VERSION qede_stringify(QEDE_PMD_VERSION_MAJOR) "." \
drivers/net/qede/qede_main.c +1 -1
@@ -18,7 +18,7 @@char qede_fw_file[PATH_MAX ];static const char *const QEDE_DEFAULT_FIRMWARE = -"/lib/firmware/qed/qed_init_values-8.40.25.0.bin" ; +"/lib/firmware/qed/qed_init_values-8.40.33.0.bin" ;static void qed_update_pf_params (struct ecore_dev *edev,struct ecore_pf_params *params)
Signature · 1 line
2.18.0
PATCH 2/3 net/qede: fix to modify MTU update flow
From: Shahed Shaikh <[email protected]>
New MTU value is not propagated to vport in HW when MTU update request is sent while ports are stopped.
This patch fixes the logic error for above mentioned condition.
--- drivers/net/qede/qede_ethdev.c | 8 +++++--- drivers/net/qede/qede_ethdev.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-)
drivers/net/qede/qede_ethdev.c +5 -3
@@ -1038,9 +1038,11 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (edev);/* Update MTU only if it has changed */ -if (eth_dev->data->mtu != qdev->mtu) { -if (qede_update_mtu (eth_dev, qdev->mtu)) +if (qdev->new_mtu && qdev->new_mtu != qdev->mtu) { +if (qede_update_mtu (eth_dev, qdev->new_mtu)) goto err; + qdev->mtu = qdev->new_mtu; + qdev->new_mtu =0 ; }/* Configure TPA parameters */
@@ -2248,7 +2250,7 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) restart = true; }rte_delay_ms (1000 ); - qdev->mtu = mtu; + qdev->new_mtu = mtu;/* Fix up RX buf size for all queues of the port */ for (i =0 ; i < qdev->num_rx_queues; i++) {
drivers/net/qede/qede_ethdev.h +1 -0
@@ -225,6 +225,7 @@ struct qede_dev {struct qede_fastpath *fp_array;struct qede_fastpath_cmt *fp_array_cmt;uint16_t mtu; +uint16_t new_mtu;bool enable_tx_switching;bool rss_enable;struct rte_eth_rss_conf rss_conf;
Signature · 1 line
2.18.0
PATCH 3/3 net/qede: fix to set VLAN strip mode
In reply to Rasesh ModyFrom: Shahed Shaikh <[email protected]>
Commit 9a6d30ae6d46 ("net/qede: refactoring vport handling code") deleted the code as part of refactoring which sets vlan strip mode. Revert it back and fix vlan strip feature.
--- drivers/net/qede/qede_ethdev.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/qede/qede_ethdev.c +2 -0
@@ -833,6 +833,8 @@ static int qede_vlan_stripping(struct rte_eth_dev *eth_dev, bool flg) } } + qdev->vlan_strip_flg = flg; +DP_INFO (edev,"VLAN stripping %s\n" , flg ?"enabled" :"disabled" );return 0 ; }
Signature · 1 line
2.18.0
Quoted 11 lines · Rasesh Mody
In our testing we have identified a critical FW bug. Performance is degraded significantly for certain packet sizes with 8.40.25.0 FW.
This patch updates the FW to version 8.40.33.0. The updated FW has a fix to performance issue.
The patch also adds initialization for FW overlay RAM as part of hardware initialization which is required by the new FW.
Fixes 066f0d380a2f ("net/qede/base: update FW to 8.40.25.0")
Hi Rasesh, it should be:
Quoted 21 lines
Signed-off-by Rasesh Mody <[email protected]>--- doc/guides/nics/qede.rst | 4 +- drivers/net/qede/base/common_hsi.h | 6 +- drivers/net/qede/base/ecore.h | 4 +- drivers/net/qede/base/ecore_dev.c | 19 ++- drivers/net/qede/base/ecore_hsi_debug_tools.h | 3 + drivers/net/qede/base/ecore_hw.c | 4 +- drivers/net/qede/base/ecore_init_fw_funcs.c | 138 ++++++++++++++++++ drivers/net/qede/base/ecore_init_fw_funcs.h | 35 +++++ drivers/net/qede/base/ecore_int.c | 14 +- drivers/net/qede/base/ecore_iro_values.h | 122 ++++++++-------- drivers/net/qede/qede_ethdev.h | 2 +- drivers/net/qede/qede_main.c | 2 +- 12 files changed, 274 insertions(+), 79 deletions(-)doc/guides/nics/qede.rst +0
-0
doc/guides/nics/qede.rst Supported QLogic Adapters · line 83
Quoted 8 lines
doc/guides/nics/qede.rst +2
-2@@ -78,9 +78,9 @@ Supported QLogic Adapters Prerequisites ------------- -- Requires storm firmware version **8.37.7.0**. Firmware may be available +- Requires storm firmware version **8.40.33.0**. Firmware may be available inbox in certain newer Linux distros under the standard directory - ``E.g. /lib/firmware/qed/qed_init_values-8.37.7.0.bin``. + ``E.g. /lib/firmware/qed/qed_init_values-8.40.33.0.bin``.
Not available in latest Fedora and Ubuntu releases
doc/guides/nics/qede.rst Supported QLogic Adapters · line 85
Quoted 2 lines
doc/guides/nics/qede.rst +0
-0If the required firmware files are not available then download it from `linux-firmware git repository <http://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qed>`_
Not available here either
doc/guides/nics/qede.rst Supported QLogic Adapters · line 86
Quoted 1 line
doc/guides/nics/qede.rst +0
-0or `QLogic Driver Download Center <http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/DefaultNewSearch.aspx>`_.
Maybe here? 8.37 is the latest elsewhere.
Quoted 11 lines · Kevin Traynor
Quoted 9 lines · Rasesh Mody
In our testing we have identified a critical FW bug. Performance is degraded significantly for certain packet sizes with 8.40.25.0 FW.
This patch updates the FW to version 8.40.33.0. The updated FW has a fix to performance issue.
The patch also adds initialization for FW overlay RAM as part of hardware initialization which is required by the new FW.
Quoted 6 lines
Quoted 2 lines
Fixes 066f0d380a2f ("net/qede/base: update FW to 8.40.25.0")Hi Rasesh, it should be:
Fixes 21c959e2cb10 ("net/qede/base: update FW to 8.40.25.0")
# Updated the Fixes git id
# Added cc: [email protected]
# Changed the subject to "net/qede/base: update FW to 8.40.33.0"
Series applied to dpdk-next-net-mrvl/master. Thanks.
Quoted 1 line
Quoted 1 line
Signed-off-by Rasesh Mody <[email protected]>