net/qede: add flush support to rte flow ops
PATCH 1/2 net/qede: add flush support to rte flow ops
This patch adds suppot to flush the RTE FLOWs.
--- drivers/net/qede/qede_filter.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/net/qede/qede_filter.c +22 -0
@@ -1486,10 +1486,32 @@ qede_flow_destroy(struct rte_eth_dev *eth_dev,return rc; } +static int +qede_flow_flush (struct rte_eth_dev *eth_dev, +struct rte_flow_error *error) +{ +struct qede_dev *qdev =QEDE_INIT_QDEV (eth_dev); +struct qede_arfs_entry *tmp =NULL ; +int rc =0 ; + +while (!SLIST_EMPTY (&qdev->arfs_info.arfs_list_head)) { + tmp =SLIST_FIRST (&qdev->arfs_info.arfs_list_head); + + rc =qede_config_arfs_filter (eth_dev, tmp, false); +if (rc <0 ) +rte_flow_error_set (error, rc, +RTE_FLOW_ERROR_TYPE_HANDLE ,NULL , +"Failed to flush flow filter" ); + } + +return rc; +} +const struct rte_flow_ops qede_flow_ops = { .validate = qede_flow_validate, .create = qede_flow_create, .destroy = qede_flow_destroy, + .flush = qede_flow_flush, }; int qede_dev_filter_ctrl(struct rte_eth_dev *eth_dev,
Signature · 1 line
2.18.0
PATCH 2/2 net/qede: add support for get FW version
Add support for get firmware version operation.
Get and dump multi boot image (MBI) version as part of get firmware version string along with Management fimrware (MFW) version. Use qede_fw_version_get() for PMD info logs.
---
--- drivers/net/qede/base/ecore_mcp.c | 37 +++++++++++ drivers/net/qede/base/ecore_mcp_api.h | 12 ++++ drivers/net/qede/qede_ethdev.c | 96 ++++++++++++++++++--------- drivers/net/qede/qede_if.h | 9 +++ drivers/net/qede/qede_main.c | 3 + 5 files changed, 126 insertions(+), 31 deletions(-)
drivers/net/qede/base/ecore_mcp.c +37 -0
@@ -2245,6 +2245,43 @@ enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_hwfn *p_hwfn,return ECORE_SUCCESS ; } +int ecore_mcp_get_mbi_ver (struct ecore_hwfn *p_hwfn, +struct ecore_ptt *p_ptt,u32 *p_mbi_ver) +{ +u32 nvm_cfg_addr, nvm_cfg1_offset, mbi_ver_addr; + +#ifndef ASIC_ONLY +if (CHIP_REV_IS_EMUL (p_hwfn->p_dev) && !ecore_mcp_is_init (p_hwfn)) { +DP_INFO (p_hwfn,"Emulation: Can't get MBI version\n" ); +return -EOPNOTSUPP ; + } +#endif + +if (IS_VF (p_hwfn->p_dev)) +return -EINVAL ; + +/* Read the address of the nvm_cfg */ + nvm_cfg_addr =ecore_rd (p_hwfn, p_ptt,MISC_REG_GEN_PURP_CR0 ); +if (!nvm_cfg_addr) { +DP_NOTICE (p_hwfn, false,"Shared memory not initialized\n" ); +return -EINVAL ; + } + +/* Read the offset of nvm_cfg1 */ + nvm_cfg1_offset =ecore_rd (p_hwfn, p_ptt, nvm_cfg_addr +4 ); + + mbi_ver_addr =MCP_REG_SCRATCH + nvm_cfg1_offset + + offsetof(struct nvm_cfg1 , glob) + offsetof(struct nvm_cfg1_glob , + mbi_version); + *p_mbi_ver = +ecore_rd (p_hwfn, p_ptt, + mbi_ver_addr) & (NVM_CFG1_GLOB_MBI_VERSION_0_MASK | +NVM_CFG1_GLOB_MBI_VERSION_1_MASK | +NVM_CFG1_GLOB_MBI_VERSION_2_MASK ); + +return 0 ; +} +enum _ecore_status_t ecore_mcp_get_media_type (struct ecore_hwfn *p_hwfn,struct ecore_ptt *p_ptt,u32 *p_media_type)
drivers/net/qede/base/ecore_mcp_api.h +12 -0
@@ -587,6 +587,18 @@ enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_hwfn *p_hwfn, u32 *p_mfw_ver, u32 *p_running_bundle_id); +/** +* @brief Get the MBI version value +* +* @param p_hwfn +* @param p_ptt +* @param p_mbi_ver - A pointer to a variable to be filled with the MBI version. +* +* @return int - 0 - operation was successful. +*/ +int ecore_mcp_get_mbi_ver (struct ecore_hwfn *p_hwfn, +struct ecore_ptt *p_ptt,u32 *p_mbi_ver); +/** * @brief Get media type value of the port. *
drivers/net/qede/qede_ethdev.c +65 -31
144 lines not on this page · raw message
drivers/net/qede/qede_if.h +9 -0
@@ -45,6 +45,15 @@ struct qed_dev_info {bool smart_an; +/* MBI version */ +uint32_t mbi_version; +#define QED_MBI_VERSION_0_MASK 0x000000FF +#define QED_MBI_VERSION_0_OFFSET 0 +#define QED_MBI_VERSION_1_MASK 0x0000FF00 +#define QED_MBI_VERSION_1_OFFSET 8 +#define QED_MBI_VERSION_2_MASK 0x00FF0000 +#define QED_MBI_VERSION_2_OFFSET 16 +/* Out param for qede */ bool vxlan_enable;bool gre_enable;
drivers/net/qede/qede_main.c +3 -0
@@ -390,6 +390,9 @@ qed_fill_dev_info(struct ecore_dev *edev, struct qed_dev_info *dev_info)ecore_mcp_get_mfw_ver (ECORE_LEADING_HWFN (edev), ptt, &dev_info->mfw_rev,NULL ); +ecore_mcp_get_mbi_ver (ECORE_LEADING_HWFN (edev), ptt, + &dev_info->mbi_version); +ecore_mcp_get_flash_size (ECORE_LEADING_HWFN (edev), ptt, &dev_info->flash_size);
Signature · 1 line
2.18.1
Re: [dpdk-dev] [PATCH 2/2] net/qede: add support for get FW version
Quoted 10 lines · Rasesh Mody
Add support for get firmware version operation.
Get and dump multi boot image (MBI) version as part of get firmware version string along with Management fimrware (MFW) version. Use
qede_fw_version_get()for PMD info logs.Signed-off-by Yash Sharma <[email protected]>Signed-off-by Rasesh Mody <[email protected]>Signed-off-by Igor Russkikh <[email protected]>
Series applied to dpdk-next-net-mrvl/master. Thanks.