net/ice: fix flow director tunnel profile existence check
authorYahui Cao <yahui.cao@intel.com>
Tue, 5 Nov 2019 13:37:21 +0000 (21:37 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Nov 2019 22:15:05 +0000 (23:15 +0100)
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: 109e8e06249e ("net/ice: configure HW flow director rule")

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_fdir_filter.c

index fbbc41f..6052bed 100644 (file)
@@ -634,7 +634,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;
                }