diff options
| author | Ido Schimmel <idosch@nvidia.com> | 2025-04-15 15:11:43 +0300 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2025-04-22 11:11:16 +0200 |
| commit | 1f763fa808e92a67feea8364ef80ca3065d74702 (patch) | |
| tree | cd739f09b082838ac58856be1d4ae36818834163 /drivers/net/vxlan/vxlan_private.h | |
| parent | f13f3b4157dd9a05a5b651dfd15a4efa2df06f67 (diff) | |
| download | linux-next-1f763fa808e92a67feea8364ef80ca3065d74702.tar.gz linux-next-1f763fa808e92a67feea8364ef80ca3065d74702.zip | |
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>
Diffstat (limited to 'drivers/net/vxlan/vxlan_private.h')
| -rw-r--r-- | drivers/net/vxlan/vxlan_private.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/vxlan/vxlan_private.h b/drivers/net/vxlan/vxlan_private.h index 3ca19e7167c9..d328aed9feef 100644 --- a/drivers/net/vxlan/vxlan_private.h +++ b/drivers/net/vxlan/vxlan_private.h @@ -31,7 +31,7 @@ struct vxlan_fdb_key { /* Forwarding table entry */ struct vxlan_fdb { - struct hlist_node hlist; /* linked list of entries */ + struct rhash_head rhnode; struct rcu_head rcu; unsigned long updated; /* jiffies */ unsigned long used; |
