net/ice/base: check new FD filter duplication

Function ice_fdir_is_dup_fltr tests if new Flow Director rule
is not a duplicate.

Signed-off-by: Karol Kolacinski <karol.kolacinski@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
Leyi Rong 2019-06-19 23:18:13 +08:00 committed by Ferruh Yigit
parent 9c710f2ad0
commit 5e83abaefe

View File

@ -692,8 +692,13 @@ bool ice_fdir_is_dup_fltr(struct ice_hw *hw, struct ice_fdir_fltr *input)
ret = ice_fdir_comp_rules(rule, input, false);
else
ret = ice_fdir_comp_rules(rule, input, true);
if (ret)
break;
if (ret) {
if (rule->fltr_id == input->fltr_id &&
rule->q_index != input->q_index)
ret = false;
else
break;
}
}
}