From: Qi Zhang Date: Thu, 29 Aug 2019 02:36:56 +0000 (+0800) Subject: net/ice/base: ignore inverse switch recipes X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3ba381eb657612f64e48b4d960e6faed0f34280f;p=dpdk.git net/ice/base: ignore inverse switch recipes When looking for an existing recipes, never choose an inverse recipe as these are used for anti-spoofing. Choosing inverse recipes for source MAC address rules was causing errors while adding the rule. Signed-off-by: Dan Nowlin Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang Acked-by: Xiaolong Ye --- diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 59da7eaa8c..2437faeade 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -4709,6 +4709,11 @@ static u16 ice_find_recp(struct ice_hw *hw, struct ice_prot_lkup_ext *lkup_exts) &refresh_required)) continue; + /* Skip inverse action recipes */ + if (recp[i].root_buf && recp[i].root_buf->content.act_ctrl & + ICE_AQ_RECIPE_ACT_INV_ACT) + continue; + /* if number of words we are looking for match */ if (lkup_exts->n_val_words == recp[i].lkup_exts.n_val_words) { struct ice_fv_word *a = lkup_exts->fv_words;