aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mlx5/mlx5_en/mlx5_en_main.c')
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
index 26bd5e00d22d..9a01940ca90c 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -3144,6 +3144,12 @@ mlx5e_open_locked(struct ifnet *ifp)
"mlx5e_add_all_vlan_rules failed, %d\n", err);
goto err_close_flow_table;
}
+ err = mlx5e_add_all_vxlan_rules(priv);
+ if (err) {
+ mlx5_en_err(ifp,
+ "mlx5e_add_all_vxlan_rules failed, %d\n", err);
+ goto err_del_vlan_rules;
+ }
set_bit(MLX5E_STATE_OPENED, &priv->state);
mlx5e_update_carrier(priv);
@@ -3151,6 +3157,9 @@ mlx5e_open_locked(struct ifnet *ifp)
return (0);
+err_del_vlan_rules:
+ mlx5e_del_all_vlan_rules(priv);
+
err_close_flow_table:
mlx5e_close_flow_table(priv);
@@ -3204,6 +3213,7 @@ mlx5e_close_locked(struct ifnet *ifp)
mlx5e_set_rx_mode_core(priv);
mlx5e_del_all_vlan_rules(priv);
+ mlx5e_del_all_vxlan_rules(priv);
if_link_state_change(priv->ifp, LINK_STATE_DOWN);
mlx5e_close_flow_table(priv);
mlx5e_close_tirs(priv, true);