ipsec: use hash lookup with signatures in SAD lookup
authorVladimir Medvedkin <vladimir.medvedkin@intel.com>
Mon, 20 Apr 2020 18:27:05 +0000 (19:27 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sat, 25 Apr 2020 17:26:47 +0000 (19:26 +0200)
commita5a4d86d1e35936e5320afdceab4af98c759e603
tree38c3871d859d118f0a32b29bcc4b71b77b255cbd
parent14b8ab57623548dbe5e632f98e379b1a7c923da0
ipsec: use hash lookup with signatures in SAD lookup

Change hash function from jhash to crc.
Precalculate hash signatures for a bulk of keys and then
use rte_hash_lookup_with_hash_bulk_data() to speed up sad lookup
Also use rte_hash_add_key_with_hash and _del_key_with_hash with
precalculated hash signature for a key in rte_ipsec_sad_add and
rte_ipsec_sad_del

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
lib/librte_ipsec/ipsec_sad.c