net/ice/base: fix wrong symmetric hash configure

Message ID 20191031035521.45015-1-qi.z.zhang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series net/ice/base: fix wrong symmetric hash configure |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Qi Zhang Oct. 31, 2019, 3:55 a.m. UTC
  When a new hash profie is created, we need to reset all related
GLQF_HSYMM registers, otherwise unexpected hash behaviour may happens
on packet that hit that profile.

The patch fix the issue that we only do reset when symmetric hash
is required, but actually for non symmmetric hash we also need this,
since GLQF_HSYMM might be polluted by previous configuration.

Fixes: ddae0440353f ("net/ice/base: enable symmetric hash for RSS")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Simei Su <simei.su@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Qiming Yang Nov. 4, 2019, 3:16 a.m. UTC | #1
Hi,
Some typos.

> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Thursday, October 31, 2019 11:55 AM
> To: Yang, Qiming <qiming.yang@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH] net/ice/base: fix wrong symmetric hash configure
> 
> When a new hash profie is created, we need to reset all related

profie / profile

> GLQF_HSYMM registers, otherwise unexpected hash behaviour may happens

behaviour / behavior 

> on packet that hit that profile.
> 
> The patch fix the issue that we only do reset when symmetric hash is

Fix/fixes

> required, but actually for non symmmetric hash we also need this, since

symmmetric / symmetric

> GLQF_HSYMM might be polluted by previous configuration.
> 
> Fixes: ddae0440353f ("net/ice/base: enable symmetric hash for RSS")
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> Tested-by: Simei Su <simei.su@intel.com>
> ---
>  drivers/net/ice/base/ice_flow.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
> index d2dbb1177..797d7e6e6 100644
> --- a/drivers/net/ice/base/ice_flow.c
> +++ b/drivers/net/ice/base/ice_flow.c
> @@ -2199,8 +2199,6 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16
> vsi_handle, u64 hashed_flds,
>  	status = ice_add_rss_list(hw, vsi_handle, prof);
> 
>  	prof->cfg.symm = symm;
> -	if (!symm)
> -		goto exit;
> 
>  update_symm:
>  	ice_rss_update_symm(hw, prof);
> --
> 2.13.6
  
Xiaolong Ye Nov. 4, 2019, 3:19 a.m. UTC | #2
On 10/31, Qi Zhang wrote:
>When a new hash profie is created, we need to reset all related
>GLQF_HSYMM registers, otherwise unexpected hash behaviour may happens
>on packet that hit that profile.
>
>The patch fix the issue that we only do reset when symmetric hash
>is required, but actually for non symmmetric hash we also need this,
>since GLQF_HSYMM might be polluted by previous configuration.
>
>Fixes: ddae0440353f ("net/ice/base: enable symmetric hash for RSS")
>
>Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>Tested-by: Simei Su <simei.su@intel.com>
>---
> drivers/net/ice/base/ice_flow.c | 2 --
> 1 file changed, 2 deletions(-)
>
>diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
>index d2dbb1177..797d7e6e6 100644
>--- a/drivers/net/ice/base/ice_flow.c
>+++ b/drivers/net/ice/base/ice_flow.c
>@@ -2199,8 +2199,6 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
> 	status = ice_add_rss_list(hw, vsi_handle, prof);
> 
> 	prof->cfg.symm = symm;
>-	if (!symm)
>-		goto exit;
> 
> update_symm:
> 	ice_rss_update_symm(hw, prof);
>-- 
>2.13.6
>

Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel. Thanks.
  

Patch

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index d2dbb1177..797d7e6e6 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -2199,8 +2199,6 @@  ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 	status = ice_add_rss_list(hw, vsi_handle, prof);
 
 	prof->cfg.symm = symm;
-	if (!symm)
-		goto exit;
 
 update_symm:
 	ice_rss_update_symm(hw, prof);