In order to find accurate recipe for switch filter, we
need to add mask as an element when searching for recipe.
If we create different rules with the same input set, but
using different masks, then proper recipes should use
those different mask.
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Nannan Lu <nannan.lu@intel.com>
if (lkup_exts->n_val_words == recp[i].lkup_exts.n_val_words) {
struct ice_fv_word *a = lkup_exts->fv_words;
struct ice_fv_word *b = recp[i].lkup_exts.fv_words;
+ u16 *c = recp[i].lkup_exts.field_mask;
+ u16 *d = lkup_exts->field_mask;
bool found = true;
u8 p, q;
for (q = 0; q < recp[i].lkup_exts.n_val_words;
q++) {
if (a[p].off == b[q].off &&
- a[p].prot_id == b[q].prot_id)
+ a[p].prot_id == b[q].prot_id &&
+ d[p] == c[q])
/* Found the "p"th word in the
* given recipe
*/