aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h
diff options
context:
space:
mode:
authorGal Pressman <galp@mellanox.com>2017-12-03 13:58:50 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2017-12-19 23:24:03 +0200
commit23f4cc2cd9ed92570647220aca60d0197d8c1fa9 (patch)
tree7c51d35d7824b06a12e443e1cca739638553f603 /drivers/net/ethernet/mellanox/mlx5/core/vxlan.h
parentnet/mlx5e: Fix possible deadlock of VXLAN lock (diff)
downloadlinux-dev-23f4cc2cd9ed92570647220aca60d0197d8c1fa9.tar.xz
linux-dev-23f4cc2cd9ed92570647220aca60d0197d8c1fa9.zip
net/mlx5e: Add refcount to VXLAN structure
A refcount mechanism must be implemented in order to prevent unwanted scenarios such as: - Open an IPv4 VXLAN interface - Open an IPv6 VXLAN interface (different socket) - Remove one of the interfaces With current implementation, the UDP port will be removed from our VXLAN database and turn off the offloads for the other interface, which is still active. The reference count mechanism will only allow UDP port removals once all consumers are gone. Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/vxlan.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h
index 5def12c048e3..5ef6ae7d568a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/vxlan.h
@@ -36,6 +36,7 @@
#include "en.h"
struct mlx5e_vxlan {
+ atomic_t refcount;
u16 udp_port;
};