netfilter: nf_set_pipapo_avx2: fix initial map fill
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | netfilter: nf_set_pipapo_avx2: fix initial map fillnet/ | +20 | 2 replies | |
| 2/3 | selftests: netfilter: nft_concat_range.sh: prefer per element counters for testingtools/ | +30 | 0 replies | |
| 3/3 | selftests: netfilter: nft_concat_range.sh: add datapath check for map fill bugtools/ | +58 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Stefano Brivio |
|---|---|
| Series | R-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH nf-next 0/3] netfilter: nf_set_pipapo_avx2: fix initial map fill
The avx2 implementation suffers from the same bug fixed in the C implementation with 791a615b7ad2
("netfilter: nf_set_pipapo: fix initial map fill").
If the first field isn't the largest one, there will be mismatches, i.e. a wrong match will be returned.
First patch fixes this bug.
Because the selftest data path test does:
.... @test counter name ...
.. and then checks if the counter has been incremented, the selftest first needs to be reworked to use per-element counters.
Otherwise, we can only differentiate between 'no entry matches' and 'some entry matches', but its imperative we can also validate that the lookup did return the correct element.
The second patch does reworks the selftest accordingly.
Last patch adds extends the existing regression test for this bug class by also validating the datapath, rather than just the control plane.
Florian Westphal (3):
netfilter: nf_set_pipapo_avx2: fix initial map fill
selftests: netfilter: nft_concat_range.sh: prefer per element counters
for testing
selftests: netfilter: nft_concat_range.sh: add datapath check for map
fill bug
net/netfilter/nft_set_pipapo_avx2.c | 21 +++- .../net/netfilter/nft_concat_range.sh | 102 +++++++++++++++--- 2 files changed, 108 insertions(+), 15 deletions(-)
Signature · 1 line
2.49.0