From 39c6d43ee586404c19d103c0e79671b7bb3f3920 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Wed, 8 May 2019 11:08:21 +0000 Subject: [PATCH] Ensure the flowtable rules are not freed twice in mlx5en(4). This can happen when re-loading the driver. MFC after: 3 days Sponsored by: Mellanox Technologies --- sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 3 +++ 1 file changed, 3 insertions(+) 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 592d45e3cf2..88fb7f75374 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c @@ -131,6 +131,9 @@ mlx5e_del_eth_addr_from_flow_table(struct mlx5e_priv *priv, if (ai->tt_vec & (1 << MLX5E_TT_ANY)) mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_ANY]); + + /* ensure the rules are not freed again */ + ai->tt_vec = 0; } static int