net/i40e: fix register setting for hash enable
PATCH 1/1 net/i40e: fix register setting for hash enable
From: Dapeng Yu <[email protected]>
The original code causes wrong value to be set into PFQF_HENA register because unnecessary calling to get translated pctype value for X722 NIC. The result is RSS cannot work.
So remove the unnecessary translation.
--- drivers/net/i40e/i40e_hash.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/i40e/i40e_hash.c +0 -4
@@ -678,10 +678,6 @@ i40e_hash_enable_pctype(struct i40e_hw *hw, {uint32_t reg, reg_val, mask; -/* For X722, get translated pctype in fd pctype register */ -if (hw->mac.type ==I40E_MAC_X722 ) - pctype =i40e_read_rx_ctl (hw,I40E_GLQF_FD_PCTYPES (pctype)); -if (pctype <32 ) { mask =BIT (pctype); reg =I40E_PFQF_HENA (0 );
Signature · 1 line
2.27.0
Quoted 30 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, January 26, 2021 5:52 PM
To: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH] net/i40e: fix register setting for hash enableFrom: Dapeng Yu <[email protected]>
The original code causes wrong value to be set into
PFQF_HENAregister because unnecessary calling to get translated pctype value for X722 NIC. The result is RSS cannot work.So remove the unnecessary translation.
Fixes ef4c16fd9148 ("net/i40e: refactor RSS flow")Signed-off-by Dapeng Yu <[email protected]>--- drivers/net/i40e/i40e_hash.c | 4 ---- 1 file changed, 4 deletions(-)drivers/net/i40e/i40e_hash.c index renamed from drivers/net/i40e/i40e_hash.c +0
-0
9271797a7..b1cb24f43100644
drivers/net/i40e/i40e_hash.c i40e_hash_enable_pctype(struct i40e_hw *hw, { · line 684
Quoted 7 lines
drivers/net/i40e/i40e_hash.c +0
-4@@ -678,10 +678,6 @@ i40e_hash_enable_pctype(struct i40e_hw *hw, {uint32_t reg, reg_val, mask; -/* For X722, get translated pctype in fd pctype register */ -if (hw->mac.type ==I40E_MAC_X722 ) - pctype =i40e_read_rx_ctl (hw, I40E_GLQF_FD_PCTYPES(pctype)); -
Did you check the latest X722 datasheet to confirm the behavior?
Quoted 5 lines
drivers/net/i40e/i40e_hash.c +0
-1if (pctype <32 ) { mask =BIT (pctype); reg =I40E_PFQF_HENA (0 ); --2.27.0
Hi Beilei,
The pctype translation is introduced by i40e RSS refactor commit: ef4c16fd9148 by mistake, its behavior is inconsistent with the implementation before the refactor.
This inconsistency can be gotten from the comparison of the running of the code.
I have also confirmed with the author of commit: ef4c16fd9148 that the adding of the translation is a mistake.
So actually even if without x722 datasheet, we can know the translation is unnecessary.
I cannot find x722 datasheet from Intel website. It will be great if you can share one. Thanks!
-----Original Message-----
From: Xing, Beilei
Sent: Wednesday, January 27, 2021 9:44 AM
To: Yu, DapengX <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: RE: [PATCH] net/i40e: fix register setting for hash enable
Quoted 29 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, January 26, 2021 5:52 PM
To: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH] net/i40e: fix register setting for hash enableFrom: Dapeng Yu <[email protected]>
The original code causes wrong value to be set into
PFQF_HENAregister because unnecessary calling to get translated pctype value for X722 NIC. The result is RSS cannot work.So remove the unnecessary translation.
Fixes ef4c16fd9148 ("net/i40e: refactor RSS flow")Signed-off-by Dapeng Yu <[email protected]>--- drivers/net/i40e/i40e_hash.c | 4 ---- 1 file changed, 4 deletions(-)(quoted diff) +0
-0
b/drivers/net/i40e/i40e_hash.cindex9271797a7..b1cb24f43100644
drivers/net/i40e/i40e_hash.c i40e_hash_enable_pctype(struct i40e_hw *hw, { · line 683
Quoted 6 lines
drivers/net/i40e/i40e_hash.c +0
-2@@ -678,10 +678,6 @@ i40e_hash_enable_pctype(struct i40e_hw *hw, {uint32_t reg, reg_val, mask; -/* For X722, get translated pctype in fd pctype register */ -if (hw->mac.type ==I40E_MAC_X722 ) -pctype =i40e_read_rx_ctl (hw,I40E_GLQF_FD_PCTYPES (pctype)); -
Did you check the latest X722 datasheet to confirm the behavior?
Quoted 5 lines
drivers/net/i40e/i40e_hash.c +0
-1if (pctype <32 ) { mask =BIT (pctype); reg =I40E_PFQF_HENA (0 ); --2.27.0
Quoted 15 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, January 26, 2021 5:52 PM
To: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH] net/i40e: fix register setting for hash enableFrom: Dapeng Yu <[email protected]>
The original code causes wrong value to be set into
PFQF_HENAregister because unnecessary calling to get translated pctype value for X722 NIC. The result is RSS cannot work.
Quoted 6 lines
So remove the unnecessary translation.
Fixes ef4c16fd9148 ("net/i40e: refactor RSS flow")Signed-off-by Dapeng Yu <[email protected]>
Zhang, Qi Z
AppliedQuoted 24 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Xing, Beilei
Sent: Wednesday, January 27, 2021 11:08 AM
To: Yu, DapengX <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix register setting for hash enableQuoted 13 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Tuesday, January 26, 2021 5:52 PM
To: Xing, Beilei <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH] net/i40e: fix register setting for hash enableFrom: Dapeng Yu <[email protected]>
The original code causes wrong value to be set into
PFQF_HENAregister because unnecessary calling to get translated pctype value for X722 NIC. The result is RSS cannot work.
Quoted 8 lines
Quoted 6 lines
So remove the unnecessary translation.
Fixes ef4c16fd9148 ("net/i40e: refactor RSS flow")Signed-off-by Dapeng Yu <[email protected]>Acked-by Beilei Xing <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi