From: Leyi Rong Date: Wed, 19 Jun 2019 15:18:13 +0000 (+0800) Subject: net/ice/base: check new FD filter duplication X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5e83abaefe23aac5c309aa15bcc3a203f368575b;p=dpdk.git 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 Signed-off-by: Paul M Stillwell Jr Signed-off-by: Leyi Rong Acked-by: Qi Zhang --- diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c index bde676a8fd..9ef91b3b80 100644 --- a/drivers/net/ice/base/ice_fdir.c +++ b/drivers/net/ice/base/ice_fdir.c @@ -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; + } } }