[dpdk-dev] [PATCH v3 00/18] librte_table: add key mask for hash tables
Cristian Dumitrescu
cristian.dumitrescu at intel.com
Wed Oct 18 17:03:17 CEST 2017
Main changes:
1. The key_mask parameter is added to all the hash tables that were
previously missing it, as well to the hash compute function. This was
first started in DPDK 2.0, but was only implemented for a couple of
hash tables. The benefit of this approach is that it allows for better
performance for large keys (bigger than 16 bytes), while it preserves
the same performance for small keys [Q&A1].
2. The precomputed key signature (i.e. non-"do-sig") versions have been
removed for all the hash tables, so now the key signature is always
computed on every lookup. Note that this approach also allows for the
precomputed key signature scheme [Q&A2].
3. API cleanup: single parameter structure common for all hash tables.
Q&A:
Q1: How is better lookup performance achieved by using key mask approach
for hash tables?
A1: This approach eliminates the need to consolidate the lookup key in a
single contiguous buffer where the relevant packet fields are written
one by one, which is a very costly operation that also hash strong data
dependencies.
Q2: How can the pre-computed key signature scheme be implemented with
current approach?
A2: The application can implement a straightforward custom hash function
that simply reads the pre-computed key signature from a given offset
in the input key buffer where it has been stored prior to the lookup
operation.
Cristian Dumitrescu (18):
test: removing calls to deprecated hash tables
librte_table: remove deprecated 8-byte key hash tables
librte_table: remove deprecated 16-byte key hash tables
librte_table: remove deprecated variable size key ext hash tables
librte_table: remove deprecated variable size key lru hash tables
librte_table: rename cuckoo hash table ops
librte_table: add unified params structure and mask-based hash func
librte_table: rework variable size key ext hash tables
librte_table: rework variable size key lru hash table
librte_table: rework 8-byte key hash tables
librte_table: rework 16-byte key hash tables
librte_table: rework 32-byte key hash tables
librte_table: rework cuckoo hash table
test: add mask-based hash functions
librte_table: cosmetic enhancements in api file
librte_table: copyright cosmetic updates
librte_table: map file updates
doc: remove deprecation notice for librte_table
doc/guides/rel_notes/deprecation.rst | 6 -
examples/ip_pipeline/pipeline/hash_func.h | 176 +++--
.../pipeline/pipeline_flow_classification.c | 10 +-
.../pipeline/pipeline_flow_classification_be.c | 51 +-
.../ip_pipeline/pipeline/pipeline_passthrough_be.c | 10 +-
.../ip_pipeline/pipeline/pipeline_routing_be.c | 14 +-
lib/librte_table/rte_table_hash.h | 305 +--------
lib/librte_table/rte_table_hash_cuckoo.c | 205 +++---
lib/librte_table/rte_table_hash_ext.c | 417 ++++--------
lib/librte_table/rte_table_hash_key16.c | 750 ++++++---------------
lib/librte_table/rte_table_hash_key32.c | 436 +++++++-----
lib/librte_table/rte_table_hash_key8.c | 716 ++++++--------------
lib/librte_table/rte_table_hash_lru.c | 513 ++++++--------
lib/librte_table/rte_table_version.map | 23 +-
test/test-pipeline/main.h | 5 +-
test/test-pipeline/pipeline_hash.c | 107 +--
test/test/test_table.c | 1 +
test/test/test_table.h | 3 +-
test/test/test_table_combined.c | 137 ++--
test/test/test_table_tables.c | 150 ++---
20 files changed, 1440 insertions(+), 2595 deletions(-)
--
2.7.4
More information about the dev
mailing list