net/ice/base: fix advanced switch rule stale information
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 15 Jun 2020 02:04:53 +0000 (10:04 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jun 2020 17:21:08 +0000 (19:21 +0200)
commit94c81be833c82885fa2270d06904b7304634016d
tree2e5c2e896d83133d5f272cace7c4d23ddce91424
parent8a2989969a2349e000b92957f677a4126eb2969c
net/ice/base: fix advanced switch rule stale information

To avoid having stale information about "adv_rule" per recipe, when all
rules associated to a given recipe are deleted, reset the "adv_rule"
flag otherwise it causes problem later on when decisions about filter
rules being present or not are made based on "adv_rule" flag.

Removed setting "adv_rule = 1" when recipe is created. It is set
correctly when advanced switch rule is added referring to the recipe
which was created as a result of adding advanced switch rule.

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_switch.c