[v2] net/ice: fix FDIR tunnel profile existence check

Message ID 20191105133721.18862-1-yahui.cao@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series [v2] net/ice: fix FDIR tunnel profile existence check |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues
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

Commit Message

Cao, Yahui Nov. 5, 2019, 1:37 p.m. UTC
  If first rule is issued and then the second rule is issued with the same
input set as first rule's, FDIR driver can't find there is an identical
input set.

Fixes: d5ea22e9f4a5 ("net/ice: configure HW FDIR rule")
Cc: beilei.xing@intel.com

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
---
 drivers/net/ice/ice_fdir_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Qi Zhang Nov. 7, 2019, 6:12 a.m. UTC | #1
> -----Original Message-----
> From: Cao, Yahui <yahui.cao@intel.com>
> Sent: Tuesday, November 5, 2019 9:37 PM
> To: Yang, Qiming <qiming.yang@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Cao, Yahui
> <yahui.cao@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Subject: [PATCH v2] net/ice: fix FDIR tunnel profile existence check
> 
> If first rule is issued and then the second rule is issued with the same input set
> as first rule's, FDIR driver can't find there is an identical input set.
> 
> Fixes: d5ea22e9f4a5 ("net/ice: configure HW FDIR rule")
> Cc: beilei.xing@intel.com
> 
> Signed-off-by: Yahui Cao <yahui.cao@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  
Xiaolong Ye Nov. 7, 2019, 7:49 a.m. UTC | #2
On 11/05, Yahui Cao wrote:
>If first rule is issued and then the second rule is issued with the same
>input set as first rule's, FDIR driver can't find there is an identical
>input set.
>
>Fixes: d5ea22e9f4a5 ("net/ice: configure HW FDIR rule")
>Cc: beilei.xing@intel.com
>
>Signed-off-by: Yahui Cao <yahui.cao@intel.com>
>---
> drivers/net/ice/ice_fdir_filter.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
>index 736ccd54e..685383c1a 100644
>--- a/drivers/net/ice/ice_fdir_filter.c
>+++ b/drivers/net/ice/ice_fdir_filter.c
>@@ -646,7 +646,7 @@ ice_fdir_hw_tbl_conf(struct ice_pf *pf, struct ice_vsi *vsi,
> 			if (!memcmp(ori_seg, seg, sizeof(*seg)))
> 				return -EAGAIN;
> 		} else {
>-			if (!memcmp(ori_seg, &seg[1], sizeof(*seg)))
>+			if (!memcmp(&ori_seg[1], &seg[1], sizeof(*seg)))
> 				return -EAGAIN;
> 		}
> 
>-- 
>2.17.1
>

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

Patch

diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 736ccd54e..685383c1a 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -646,7 +646,7 @@  ice_fdir_hw_tbl_conf(struct ice_pf *pf, struct ice_vsi *vsi,
 			if (!memcmp(ori_seg, seg, sizeof(*seg)))
 				return -EAGAIN;
 		} else {
-			if (!memcmp(ori_seg, &seg[1], sizeof(*seg)))
+			if (!memcmp(&ori_seg[1], &seg[1], sizeof(*seg)))
 				return -EAGAIN;
 		}