]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vxlan: Convert FDB table to rhashtable
authorIdo Schimmel <idosch@nvidia.com>
Tue, 15 Apr 2025 12:11:43 +0000 (15:11 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 22 Apr 2025 09:11:16 +0000 (11:11 +0200)
commit1f763fa808e92a67feea8364ef80ca3065d74702
treecd739f09b082838ac58856be1d4ae36818834163
parentf13f3b4157dd9a05a5b651dfd15a4efa2df06f67
vxlan: Convert FDB table to rhashtable

FDB entries are currently stored in a hash table with a fixed number of
buckets (256), resulting in performance degradation as the number of
entries grows. Solve this by converting the driver to use rhashtable
which maintains more or less constant performance regardless of the
number of entries.

Measured transmitted packets per second using a single pktgen thread
with varying number of entries when the transmitted packet always hits
the default entry (worst case):

Number of entries | Improvement
------------------|------------
1k                | +1.12%
4k                | +9.22%
16k               | +55%
64k               | +585%
256k              | +2460%

In addition, the change reduces the size of the VXLAN device structure
from 2584 bytes to 672 bytes.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250415121143.345227-16-idosch@nvidia.com
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/vxlan/vxlan_core.c
drivers/net/vxlan/vxlan_private.h
include/net/vxlan.h