[PATCH V2 0/6] pipeline: make the hash function configurable per table
Stephen Hemminger
stephen at networkplumber.org
Wed Aug 31 18:23:20 CEST 2022
On Fri, 19 Aug 2022 19:52:19 +0000
Cristian Dumitrescu <cristian.dumitrescu at 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.
More information about the dev
mailing list