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 <dan.now...@intel.com> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell...@intel.com> Signed-off-by: Qi Zhang <qi.z.zh...@intel.com> --- drivers/net/ice/base/ice_switch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 59da7eaa8..2437faead 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; -- 2.13.6