* @map: Previous match result, used as initial bitmap
* @fill: Destination bitmap to be filled with current match result
* @f: Field, containing lookup and mapping tables
- * @offset: Ignore buckets before the given index, no bits are filled there
* @pkt: Packet data, pointer to input nftables register
* @first: If this is the first field, don't source previous result
* @last: Last field: stop at the first match and return bit index
static int nft_pipapo_avx2_lookup_slow(const struct nft_pipapo_match *mdata,
unsigned long *map, unsigned long *fill,
const struct nft_pipapo_field *f,
- int offset, const u8 *pkt,
+ const u8 *pkt,
bool first, bool last)
{
- unsigned long bsize = f->bsize;
- int i, ret = -1, b;
-
if (first)
pipapo_resmap_init(mdata, map);
- for (i = offset; i < bsize; i++) {
- if (f->bb == 8)
- pipapo_and_field_buckets_8bit(f, map, pkt);
- else
- pipapo_and_field_buckets_4bit(f, map, pkt);
- NFT_PIPAPO_GROUP_BITS_ARE_8_OR_4;
-
- b = pipapo_refill(map, bsize, f->rules, fill, f->mt, last);
+ if (f->bb == 8)
+ pipapo_and_field_buckets_8bit(f, map, pkt);
+ else
+ pipapo_and_field_buckets_4bit(f, map, pkt);
+ NFT_PIPAPO_GROUP_BITS_ARE_8_OR_4;
- if (last)
- return b;
-
- if (ret == -1)
- ret = b / XSAVE_YMM_SIZE;
- }
-
- return ret;
+ return pipapo_refill(map, f->bsize, f->rules, fill, f->mt, last);
}
/**
NFT_SET_PIPAPO_AVX2_LOOKUP(8, 16);
} else {
ret = nft_pipapo_avx2_lookup_slow(m, res, fill, f,
- ret, data,
+ data,
first, last);
}
} else {
NFT_SET_PIPAPO_AVX2_LOOKUP(4, 32);
} else {
ret = nft_pipapo_avx2_lookup_slow(m, res, fill, f,
- ret, data,
+ data,
first, last);
}
}