diff options
author | Andrew Yourtchenko <ayourtch@gmail.com> | 2018-05-26 19:02:34 +0200 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-05-27 09:25:33 +0000 |
commit | e64386ec4b307c5fbb623a8cd3e060c235a245ad (patch) | |
tree | 90679c16145680fdbcd2d7c19fc4ab55f6c73ef4 /src/vnet.am | |
parent | 525c9d0f8645ef9901316f042c195adc970b4546 (diff) |
acl-plugin: use clib_bihash_search_inline_2_40_8 rather than clib_bihash_search_40_8 for session lookups
Use inline version rather than calling the function, this gives slightly better performance.
The straighforward diff uncovered an interesting problem: the stateful ACL IPv4 unit tests would fail
for the "make test" but succeed in "make test-debug". Also, they would succeed even in "make test",
if before calling the clib_bihash_search_inline_2_40_8 we would change the code
to store the key in a temporary variable.
Debugging revealed that the generated optimized code is not what one would expect:
the zeroing of the u64s overlaying the memcpy into ipv4 value of ip46_address_t
made the optimizer not notice the latter, and think that those fields should be
always zero in the bihash, thus generating incorrect assembly for the bihash key
comparison for the ipv4 nodes.
Changing the zeroing to be non-overlapping by zeroing only the pad fields resulted
in the optimizer generating the correct code and the tests pass.
Change-Id: Ib0f55cef2b5fe70c931d17ca4dc32a5755d160cd
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/vnet.am')
0 files changed, 0 insertions, 0 deletions