DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH V2 0/6] pipeline: make the hash function configurable per table
Date: Wed, 31 Aug 2022 09:23:20 -0700	[thread overview]
Message-ID: <20220831092320.64a3a42a@hermes.local> (raw)
In-Reply-To: <20220819195225.1483020-1-cristian.dumitrescu@intel.com>

On Fri, 19 Aug 2022 19:52:19 +0000
Cristian Dumitrescu <cristian.dumitrescu@intel.com> wrote:

> 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%.

I wonder if DPDK should start to adopt the Linux kernel optimizations
around indirect calls. For most all cases, the function pointer will be
a certain value and the cpu can do direct rather than indirect call.

As in:

     if (likely(hash_func == crc32_hash))
            crc32_hash(x, y)
     else
            (*hash_func)(x, y)

This was done in Linux kernel because of the overhead of the Spectre/Meltdown
mitigation's, but could apply more generally in DPDK.

  parent reply	other threads:[~2022-08-31 16:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 11:44 [PATCH " 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   ` Stephen Hemminger [this message]
2022-09-01  8:11     ` [PATCH V2 0/6] pipeline: make the hash function configurable per table 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=20220831092320.64a3a42a@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=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).