net/ice/base: fix unexpected switch rule overwrite
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 8 Oct 2019 01:50:14 +0000 (09:50 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 23 Oct 2019 14:43:09 +0000 (16:43 +0200)
commit98ba06d0b772c74fbb2eb557c9dc3de5b5838b32
treeb01e2921d5a657ee2e80b4e31ed16d6f1e6800d9
parent40dceddab7c3ac11eb166aa788b66172a4615f6f
net/ice/base: fix unexpected switch rule overwrite

A switch rule with "drop" action will be overwritten by a
rule with same pattern match but with a "to queue" action.
While in an inversed flow creation sequence, the "to queue"
can't be overwritten by the "drop" rule.

The inconsistent behavior is not expected, the patch
fix the issue by preventing rule overwrite in both cases.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_switch.c