DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/6] pipeline: make the hash function configurable per table
@ 2022-08-18 11:44 Cristian Dumitrescu
  2022-08-18 11:44 ` [PATCH 1/6] table: add hash function prototype Cristian Dumitrescu
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Cristian Dumitrescu @ 2022-08-18 11:44 UTC (permalink / raw)
  To: dev

The exact match and learner tables use a hash function for the lookup
operation. This patch set makes the hash function configurable and
removes some limitations.

The hash function previously used by these table types had the
following limitations:
a) Not configurable: An internally hardcoded version was used;
b) Mask-based: This prevents using most of the available
   hash functions, as they are not mask-based;
c) Key size limited to 64 bytes or less.

The new hash function is:
a) Configurable;
b) Not mask-based;
c) Not limited to key sizes to less than or equal to 64 bytes.

Also, since this flexibility has some performance cost, this patch set
also introduces key comparison functions specialized for each key size
value. Since the key size is fixed for each table, the key comparison
function can be selected at initialization as opposed to using a
generic function that can handle any key size. This strategy result in
a performance improvement for the table lookup operation of around 5%.

Depends-on: series-24117 ("pipeline: pipeline configuration and build improvements")

Cristian Dumitrescu (6):
  table: add hash function prototype
  table: add key comparison functions
  table: configure the hash function for regular tables
  pipeline: configure the hash function for regular tables
  table: configure the hash function for learner tables
  pipeline: configure the hash function for learner tables

 lib/pipeline/rte_swx_ctl.c               |   1 +
 lib/pipeline/rte_swx_ctl.h               |   3 +
 lib/pipeline/rte_swx_pipeline.c          |  22 ++
 lib/pipeline/rte_swx_pipeline.h          |  30 ++-
 lib/pipeline/rte_swx_pipeline_internal.h |   2 +
 lib/pipeline/rte_swx_pipeline_spec.c     |  70 +++++-
 lib/pipeline/rte_swx_pipeline_spec.h     |   2 +
 lib/table/meson.build                    |   2 +
 lib/table/rte_swx_hash_func.h            |  39 ++++
 lib/table/rte_swx_keycmp.c               | 166 ++++++++++++++
 lib/table/rte_swx_keycmp.h               |  49 +++++
 lib/table/rte_swx_table.h                |   8 +
 lib/table/rte_swx_table_em.c             | 266 ++++-------------------
 lib/table/rte_swx_table_learner.c        | 220 +++----------------
 lib/table/rte_swx_table_learner.h        |   6 +
 15 files changed, 450 insertions(+), 436 deletions(-)
 create mode 100644 lib/table/rte_swx_hash_func.h
 create mode 100644 lib/table/rte_swx_keycmp.c
 create mode 100644 lib/table/rte_swx_keycmp.h

-- 
2.34.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-09-23 15:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-18 11:44 [PATCH 0/6] pipeline: make the hash function configurable per table Cristian Dumitrescu
2022-08-18 11:44 ` [PATCH 1/6] table: add hash function prototype Cristian Dumitrescu
2022-08-18 11:44 ` [PATCH 2/6] table: add key comparison functions Cristian Dumitrescu
2022-08-18 11:44 ` [PATCH 3/6] table: configure the hash function for regular tables Cristian Dumitrescu
2022-08-18 11:44 ` [PATCH 4/6] pipeline: " Cristian Dumitrescu
2022-08-18 11:44 ` [PATCH 5/6] table: configure the hash function for learner tables Cristian Dumitrescu
2022-08-18 11:44 ` [PATCH 6/6] pipeline: " Cristian Dumitrescu
2022-08-19 19:52 ` [PATCH V2 0/6] pipeline: make the hash function configurable per table Cristian Dumitrescu
2022-08-19 19:52   ` [PATCH V2 1/6] table: add hash function prototype Cristian Dumitrescu
2022-08-19 19:52   ` [PATCH V2 2/6] table: add key comparison functions Cristian Dumitrescu
2022-08-19 19:52   ` [PATCH V2 3/6] table: configure the hash function for regular tables Cristian Dumitrescu
2022-08-19 19:52   ` [PATCH V2 4/6] pipeline: " Cristian Dumitrescu
2022-08-19 19:52   ` [PATCH V2 5/6] table: configure the hash function for learner tables Cristian Dumitrescu
2022-08-19 19:52   ` [PATCH V2 6/6] pipeline: " Cristian Dumitrescu
2022-08-31 16:23   ` [PATCH V2 0/6] pipeline: make the hash function configurable per table Stephen Hemminger
2022-09-01  8:11     ` Morten Brørup
2022-09-23 15:58   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).