net/ice/base: improve switch advanced rule
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 29 Aug 2019 02:36:20 +0000 (10:36 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:53 +0000 (15:00 +0200)
commit18a6dd522289b79c020fd546e1ac8534fd054e35
tree019fb993253afcae0192e98586affc32fc967a14
parentca9a2c69745419e9e0fbc4d591c74d14f95b4e94
net/ice/base: improve switch advanced rule

Correct algorithm to detect free field vector indexes to be
used for recipe line result values. The code now scans all
recipes that are associated with all the field vector being
targed for a new recipe to detect which result indexes are
unused.

Change recipe chaining code to place recipe on a single line
if it will fit, rather than looking to break things apart
according to preferred combinations.

These improvements fix a condition where recipes were getting
added with conflicting result index values.

Signed-off-by: Dan Nowlin <dan.nowlin@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: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/base/ice_bitops.h
drivers/net/ice/base/ice_switch.c
drivers/net/ice/base/ice_switch.h