2f372ab5c9
Reported by Zi Hu: " cat test_data/rule1 @192.168.0.0/24 192.168.0.0/24 400 : 500 0 : 52 6/0xff @192.168.0.0/24 192.168.0.0/24 400 : 500 54 : 65280 6/0xff @192.168.0.0/24 192.168.0.0/24 400 : 500 0 : 65535 6/0xff cat test_data/trace1 0xc0a80005 0xc0a80009 450 53 0x06 I run the test by: sudo ./testacl -n 2 -c 4 -- --rulesf=./test_data/rule1 --tracef=./test_data/trace1 The result shows that the packet matches the second rule, which is wrong. The dest port of the pkt is 53, so it should match the third rule. " Indeed there is problem at ACL build stage. Sometimes acl_merge_trie() is too aggressive in trying to conserve space at build time. So it takes a wrong assumptions and didn't duplicate a node, even when it should. The easiest and safest fix seems to always duplicate a left non-root/non-leaf node first, and let the further code to destroy the node, if it is not needed. Reported-by: Zi Hu <huzilucky@gmail.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> |
||
---|---|---|
.. | ||
acl_bld.c | ||
acl_gen.c | ||
acl_run_avx2.c | ||
acl_run_avx2.h | ||
acl_run_scalar.c | ||
acl_run_sse.c | ||
acl_run_sse.h | ||
acl_run.h | ||
acl_vect.h | ||
acl.h | ||
Makefile | ||
rte_acl_osdep.h | ||
rte_acl_version.map | ||
rte_acl.c | ||
rte_acl.h | ||
tb_mem.c | ||
tb_mem.h |