acl-plugin: tm: optimize multi-lookups and prepare to add tuplemerge 61/13161/8
authorAndrew Yourtchenko <ayourtch@gmail.com>
Wed, 20 Jun 2018 13:28:15 +0000 (15:28 +0200)
committerDamjan Marion <dmarion@me.com>
Tue, 26 Jun 2018 13:35:24 +0000 (13:35 +0000)
commit8d2e9bd8d80e7bcc703189f5796733be24c6d0a6
tree64a0c1300994df719639e5415c9df2eab3193ba0
parentd16ba6295b666a1b3d92c3b043ea1c008d2722c6
acl-plugin: tm: optimize multi-lookups and prepare to add tuplemerge

- instantiate the per-use mask type entry for a given hash ACE
  this prepares to adding tuplemerge where the applied ACE may
  have a different mask type due to relaxing of the tuples

- store the vector of the colliding rules for linear lookups
  rather than traversing the linked list.

- store the lowest rule index for a given mask type inside
  the structure. This allows to skip looking up at the later
  mask types if we already matched an entry that is in front
  of the very first entry in the new candidate mask type,
  thus saving a worthless hash table lookup.

- use a vector of mask type indices rather than bitmap,
  in the sorted order (by construction) of ascending
  lowest rule index - this allows to terminate the lookups
  early.

- adapt the debug cli outputs accordingly to show the data

- propagate the is_ip6 into the inner calls

Change-Id: I7a67b271e66785c6eab738b632b432d5886a0a8a
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
src/plugins/acl/acl.h
src/plugins/acl/hash_lookup.c
src/plugins/acl/hash_lookup_private.h
src/plugins/acl/hash_lookup_types.h
src/plugins/acl/public_inlines.h
src/plugins/acl/types.h [new file with mode: 0644]