summaryrefslogtreecommitdiffstats
path: root/include/net/vxlan.h
diff options
context:
space:
mode:
authorLitao jiao <jiaolitao@raisecom.com>2019-06-06 11:57:58 +0200
committerDavid S. Miller <davem@davemloft.net>2019-06-06 20:08:55 +0200
commitfe1e0713bbe84c6796b01d50a55ce4e324141161 (patch)
tree2cd04c3b21deca45672f51015c0c1cb5ad3deede /include/net/vxlan.h
parentipv6: fix spelling mistake: "wtih" -> "with" (diff)
downloadlinux-fe1e0713bbe84c6796b01d50a55ce4e324141161.tar.xz
linux-fe1e0713bbe84c6796b01d50a55ce4e324141161.zip
vxlan: Use FDB_HASH_SIZE hash_locks to reduce contention
The monolithic hash_lock could cause huge contention when inserting/deletiing vxlan_fdbs into the fdb_head. Use FDB_HASH_SIZE hash_locks to protect insertions/deletions of vxlan_fdbs into the fdb_head hash table. Suggested-by: David S. Miller <davem@davemloft.net> Signed-off-by: Litao jiao <jiaolitao@raisecom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/vxlan.h')
-rw-r--r--include/net/vxlan.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index 83b5999a2587..dc1583a1fb8a 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -242,7 +242,7 @@ struct vxlan_dev {
struct vxlan_rdst default_dst; /* default destination */
struct timer_list age_timer;
- spinlock_t hash_lock;
+ spinlock_t hash_lock[FDB_HASH_SIZE];
unsigned int addrcnt;
struct gro_cells gro_cells;