net/mlx5e: Fix VXLAN synchronization after function reload
authorAya Levin <ayal@nvidia.com>
Wed, 23 Sep 2020 09:58:44 +0000 (12:58 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 5 Nov 2020 20:17:06 +0000 (12:17 -0800)
commitc5eb51adf06b2644fa28d4af886bfdcc53e288da
tree779ef534d5e08f83ee5a25a1bf3b5da5cfb1d093
parentae35859445607f7f18dd4f332749219cd636ed59
net/mlx5e: Fix VXLAN synchronization after function reload

During driver reload, perform firmware tear-down which results in
firmware losing the configured VXLAN ports. These ports are still
available in the driver's database. Fix this by cleaning up driver's
VXLAN database in the nic unload flow, before firmware tear-down. With
that, minimize mlx5_vxlan_destroy() to remove only what was added in
mlx5_vxlan_create() and warn on leftover UDP ports.

Fixes: 18a2b7f969c9 ("net/mlx5: convert to new udp_tunnel infrastructure")
Signed-off-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.c
drivers/net/ethernet/mellanox/mlx5/core/lib/vxlan.h