net: qed disable aRFS in NPAR and 100G
Subsystems (3)
cover net: qed disable aRFS in NPAR and 100G
This patchset fixes some recent issues found by customers.
Dmitry Bogdanov (3):
net: qed: Disable aRFS for NPAR and 100G
net: qede: Disable aRFS for NPAR and 100G
qed: RDMA personality shouldn't fail VF load
drivers/net/ethernet/qlogic/qed/qed_dev.c | 11 ++++++++++- drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 +++ drivers/net/ethernet/qlogic/qed/qed_main.c | 2 ++ drivers/net/ethernet/qlogic/qed/qed_sriov.c | 1 + drivers/net/ethernet/qlogic/qede/qede_filter.c | 3 +++ drivers/net/ethernet/qlogic/qede/qede_main.c | 11 +++++------ include/linux/qed/qed_if.h | 1 + 7 files changed, 25 insertions(+), 7 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/3 net: qed: Disable aRFS for NPAR and 100G
In CMT and NPAR the PF is unknown when the GFS block processes the packet. Therefore cannot use searcher as it has a per PF database, and thus ARFS must be disabled.
--- drivers/net/ethernet/qlogic/qed/qed_dev.c | 11 ++++++++++- drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 +++ drivers/net/ethernet/qlogic/qed/qed_main.c | 2 ++ include/linux/qed/qed_if.h | 1 + 4 files changed, 16 insertions(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qed/qed_dev.c +10 -1
@@ -4253,7 +4253,8 @@ static int qed_hw_get_nvm_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) cdev->mf_bits =BIT (QED_MF_LLH_MAC_CLSS ) |BIT (QED_MF_LLH_PROTO_CLSS ) |BIT (QED_MF_LL2_NON_UNICAST ) | -BIT (QED_MF_INTER_PF_SWITCH ); +BIT (QED_MF_INTER_PF_SWITCH ) | +BIT (QED_MF_DISABLE_ARFS );break ;case NVM_CFG1_GLOB_MF_MODE_DEFAULT : cdev->mf_bits = BIT(QED_MF_LLH_MAC_CLSS) |
@@ -4266,6 +4267,14 @@ static int qed_hw_get_nvm_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)DP_INFO (p_hwfn,"Multi function mode is 0x%lx\n" , cdev->mf_bits); + +/* In CMT the PF is unknown when the GFS block processes the +* packet. Therefore cannot use searcher as it has a per PF +* database, and thus ARFS must be disabled. +* +*/ +if (QED_IS_CMT (cdev)) + cdev->mf_bits |=BIT (QED_MF_DISABLE_ARFS ); } DP_INFO(p_hwfn, "Multi function mode is 0x%lx\n",
drivers/net/ethernet/qlogic/qed/qed_l2.c +3 -0
@@ -1980,6 +1980,9 @@ void qed_arfs_mode_configure(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, struct qed_arfs_config_params *p_cfg_params) { + if (test_bit(QED_MF_DISABLE_ARFS, &p_hwfn->cdev->mf_bits)) + return; +if (p_cfg_params->mode !=QED_FILTER_CONFIG_MODE_DISABLE ) { qed_gft_config(p_hwfn, p_ptt, p_hwfn->rel_pf_id, p_cfg_params->tcp,
drivers/net/ethernet/qlogic/qed/qed_main.c +2 -0
@@ -444,6 +444,8 @@ int qed_fill_dev_info(struct qed_dev *cdev, dev_info->fw_eng =FW_ENGINEERING_VERSION ; dev_info->b_inter_pf_switch =test_bit (QED_MF_INTER_PF_SWITCH , &cdev->mf_bits); +if (!test_bit (QED_MF_DISABLE_ARFS , &cdev->mf_bits)) + dev_info->b_arfs_capable = true; dev_info->tx_switching = true;if (hw_info->b_wol_support ==QED_WOL_SUPPORT_PME )
include/linux/qed/qed_if.h +1 -0
@@ -623,6 +623,7 @@ struct qed_dev_info {#define QED_MFW_VERSION_3_OFFSET 24u32 flash_size; +bool b_arfs_capable;bool b_inter_pf_switch;bool tx_switching;bool rdma_supported;
Signature · 1 line
2.17.1
Re: [PATCH v2 net 1/3] net: qed: Disable aRFS for NPAR and 100G
Hi David,
Strangely I don't see this series from Dmitry on patchwork, but emails seems reached the list correctly:
https://lore.kernel.org/netdev/20200831094326.0mIWCNw1jJrHOif9nW17zot9j5BvO_ZP0orBrhmv6KE@z/
Could you please help with that?
Thanks,
Igor
Quoted 94 lines · Dmitry Bogdanov
In CMT and NPAR the PF is unknown when the GFS block processes the packet. Therefore cannot use searcher as it has a per PF database, and thus ARFS must be disabled.
Fixes d51e4af5c209 ("qed: aRFS infrastructure support")Signed-off-by Manish Chopra <[email protected]>Signed-off-by Igor Russkikh <[email protected]>Signed-off-by Michal Kalderon <[email protected]>Signed-off-by Dmitry Bogdanov <[email protected]>--- drivers/net/ethernet/qlogic/qed/qed_dev.c | 11 ++++++++++- drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 +++ drivers/net/ethernet/qlogic/qed/qed_main.c | 2 ++ include/linux/qed/qed_if.h | 1 + 4 files changed, 16 insertions(+), 1 deletion(-)drivers/net/ethernet/qlogic/qed/qed_dev.c +2
-1@@ -4253,7 +4253,8 @@ static int qed_hw_get_nvm_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) cdev->mf_bits =BIT (QED_MF_LLH_MAC_CLSS ) |BIT (QED_MF_LLH_PROTO_CLSS ) |BIT (QED_MF_LL2_NON_UNICAST ) | -BIT (QED_MF_INTER_PF_SWITCH ); +BIT (QED_MF_INTER_PF_SWITCH ) | +BIT (QED_MF_DISABLE_ARFS );break ;case NVM_CFG1_GLOB_MF_MODE_DEFAULT :drivers/net/ethernet/qlogic/qed/qed_dev.c +2
-0cdev->mf_bits = BIT(QED_MF_LLH_MAC_CLSS) |@@ -4266,6 +4267,14 @@ static int qed_hw_get_nvm_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)DP_INFO (p_hwfn,"Multi function mode is 0x%lx\n" , cdev->mf_bits); + +/* In CMT the PF is unknown when the GFS block processes the
drivers/net/ethernet/qlogic/qed/qed_dev.c +1
-0+* packet. Therefore cannot use searcher as it has a per PF
drivers/net/ethernet/qlogic/qed/qed_dev.c +5
-0+* database, and thus ARFS must be disabled. +* +*/ +if (QED_IS_CMT (cdev)) + cdev->mf_bits |=BIT (QED_MF_DISABLE_ARFS ); } DP_INFO(p_hwfn, "Multi function mode is 0x%lx\n",drivers/net/ethernet/qlogic/qed/qed_l2.c +3
-0@@ -1980,6 +1980,9 @@ void qed_arfs_mode_configure(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, struct qed_arfs_config_params *p_cfg_params) { +if (test_bit (QED_MF_DISABLE_ARFS , &p_hwfn->cdev->mf_bits)) +return ; +if (p_cfg_params->mode !=QED_FILTER_CONFIG_MODE_DISABLE ) { qed_gft_config(p_hwfn, p_ptt, p_hwfn->rel_pf_id,drivers/net/ethernet/qlogic/qed/qed_l2.c +0
-0p_cfg_params->tcp,drivers/net/ethernet/qlogic/qed/qed_main.c +2
-0@@ -444,6 +444,8 @@ int qed_fill_dev_info(struct qed_dev *cdev, dev_info->fw_eng =FW_ENGINEERING_VERSION ; dev_info->b_inter_pf_switch =test_bit (QED_MF_INTER_PF_SWITCH , &cdev->mf_bits); +if (!test_bit (QED_MF_DISABLE_ARFS , &cdev->mf_bits)) + dev_info->b_arfs_capable = true; dev_info->tx_switching = true;drivers/net/ethernet/qlogic/qed/qed_main.c +0
-0if (hw_info->b_wol_support ==QED_WOL_SUPPORT_PME )include/linux/qed/qed_if.h +1
-0@@ -623,6 +623,7 @@ struct qed_dev_info {#define QED_MFW_VERSION_3_OFFSET 24u32 flash_size; +bool b_arfs_capable;bool b_inter_pf_switch;bool tx_switching;bool rdma_supported;
PATCH 2/3 net: qede: Disable aRFS for NPAR and 100G
In reply to Dmitry BogdanovIn some configurations ARFS cannot be used, so disable it if device is not capable.
--- drivers/net/ethernet/qlogic/qede/qede_filter.c | 3 +++ drivers/net/ethernet/qlogic/qede/qede_main.c | 11 +++++------ 2 files changed, 8 insertions(+), 6 deletions(-)
drivers/net/ethernet/qlogic/qede/qede_filter.c +3 -0
@@ -311,6 +311,9 @@ int qede_alloc_arfs(struct qede_dev *edev) {int i; +if (!edev->dev_info.common.b_arfs_capable) +return -EINVAL ; + edev->arfs =vzalloc (sizeof (*edev->arfs));if (!edev->arfs)return -ENOMEM ;
drivers/net/ethernet/qlogic/qede/qede_main.c +5 -6
@@ -804,7 +804,7 @@ static void qede_init_ndev(struct qede_dev *edev)NETIF_F_IP_CSUM |NETIF_F_IPV6_CSUM |NETIF_F_TSO |NETIF_F_TSO6 |NETIF_F_HW_TC ; -if (!IS_VF (edev) && edev->dev_info.common.num_hwfns ==1 ) +if (edev->dev_info.common.b_arfs_capable) hw_features |=NETIF_F_NTUPLE ; if (edev->dev_info.common.vxlan_enable ||
@@ -2274,7 +2274,7 @@ static void qede_unload(struct qede_dev *edev, enum qede_unload_mode mode,qede_vlan_mark_nonconfigured (edev); edev->ops->fastpath_stop (edev->cdev); -if (!IS_VF (edev) && edev->dev_info.common.num_hwfns ==1 ) { +if (edev->dev_info.common.b_arfs_capable) {qede_poll_for_freeing_arfs_filters (edev);qede_free_arfs (edev); }
@@ -2341,10 +2341,9 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode,if (rc) goto err2; -if (!IS_VF (edev) && edev->dev_info.common.num_hwfns ==1 ) { - rc =qede_alloc_arfs (edev); -if (rc) -DP_NOTICE (edev,"aRFS memory allocation failed\n" ); +if (qede_alloc_arfs (edev)) { + edev->ndev->features &= ~NETIF_F_NTUPLE ; + edev->dev_info.common.b_arfs_capable = false; }qede_napi_add_enable (edev);
Signature · 1 line
2.17.1
David Miller
maintainerRe: [PATCH net 2/3] net: qede: Disable aRFS for NPAR and 100G
From: Dmitry Bogdanov <[email protected]>
Date: Wed, 19 Aug 2020 23:29:28 +0300
Quoted 1 line
Fixes e4917d46a65 ("qede: Add aRFS support")
This Fixes tag only has 11 digits of SHA1, when you should provide 12 like the other two patches in this series do.
Thank you.
PATCH 3/3 net: qed: RDMA personality shouldn't fail VF load
In reply to Dmitry BogdanovFix the assert during VF driver installation when the personality is iWARP
--- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/qlogic/qed/qed_sriov.c +1 -0
@@ -71,6 +71,7 @@ static int qed_sp_vf_start(struct qed_hwfn *p_hwfn, struct qed_vf_info *p_vf) p_ramrod->personality =PERSONALITY_ETH ;break ;case QED_PCI_ETH_ROCE : +case QED_PCI_ETH_IWARP : p_ramrod->personality =PERSONALITY_RDMA_AND_ETH ;break ;default :
Signature · 1 line
2.17.1
Forgot to indicate "v2" in the subject, please ignore it then. Will resend with v2 in the subject.
-----Original Message-----
From: Dmitry Bogdanov <[email protected]>
Sent: Thursday, August 20, 2020 2:08 PM
To: [email protected]; David S . Miller <[email protected]>
Cc: Dmitry Bogdanov <[email protected]>
Subject: [PATCH net 0/3] net: qed disable aRFS in NPAR and 100G
This patchset fixes some recent issues found by customers.
v2:
correct hash in Fixes tag
Dmitry Bogdanov (3):
net: qed: Disable aRFS for NPAR and 100G
net: qede: Disable aRFS for NPAR and 100G
qed: RDMA personality shouldn't fail VF load
drivers/net/ethernet/qlogic/qed/qed_dev.c | 11 ++++++++++- drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 +++ drivers/net/ethernet/qlogic/qed/qed_main.c | 2 ++ drivers/net/ethernet/qlogic/qed/qed_sriov.c | 1 + drivers/net/ethernet/qlogic/qede/qede_filter.c | 3 +++ drivers/net/ethernet/qlogic/qede/qede_main.c | 11 +++++------ include/linux/qed/qed_if.h | 1 + 7 files changed, 25 insertions(+), 7 deletions(-)
Signature · 1 line
2.17.1