DPDK patches and discussions
 help / color / mirror / Atom feed
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Subject: [PATCH 0/6] pipeline: make the hash function configurable per table
Date: Thu, 18 Aug 2022 11:44:43 +0000	[thread overview]
Message-ID: <20220818114449.1408226-1-cristian.dumitrescu@intel.com> (raw)

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


             reply	other threads:[~2022-08-18 11:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 11:44 Cristian Dumitrescu [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220818114449.1408226-1-cristian.dumitrescu@intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).