git: 95854550de77 - stable/13 - mlx5en: Only delete installed VxLAN rules.

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Tue, 08 Feb 2022 15:13:59 UTC
The branch stable/13 has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=95854550de77b1e0701742e6db08717e9df171e5

commit 95854550de77b1e0701742e6db08717e9df171e5
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-02-08 15:08:52 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-02-08 15:08:52 +0000

    mlx5en: Only delete installed VxLAN rules.
    
    Sponsored by:   NVIDIA Networking
    
    (cherry picked from commit 9680b1ba71e4bd9a8d4c1b0e2aec4874635e561d)
---
 sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
index ad317c15d729..fc337cde04a1 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
@@ -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);