mlx5en: Only delete installed VxLAN rules.

MFC after:	1 week
Sponsored by:	NVIDIA Networking
This commit is contained in:
Hans Petter Selasky 2022-02-01 16:20:10 +01:00
parent 6176a5e338
commit 9680b1ba71

View File

@ -1980,7 +1980,8 @@ mlx5e_del_vxlan_rule(struct mlx5e_priv *priv, sa_family_t family, u_int port)
return (0);
}
mlx5_del_flow_rule(el->vxlan_ft_rule);
if (el->installed)
mlx5_del_flow_rule(el->vxlan_ft_rule);
TAILQ_REMOVE(&priv->vxlan.head, el, link);
kvfree(el);
return (0);