enum {
        MLX5E_TC_FLOW_ESWITCH   = BIT(0),
        MLX5E_TC_FLOW_NIC       = BIT(1),
+       MLX5E_TC_FLOW_OFFLOADED = BIT(2),
 };
 
 struct mlx5e_tc_flow {
        struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
        struct mlx5_esw_flow_attr *attr = flow->esw_attr;
 
-       mlx5_eswitch_del_offloaded_rule(esw, flow->rule, flow->esw_attr);
+       if (flow->flags & MLX5E_TC_FLOW_OFFLOADED)
+               mlx5_eswitch_del_offloaded_rule(esw, flow->rule, flow->esw_attr);
 
        mlx5_eswitch_del_vlan_action(esw, flow->esw_attr);
 
                goto err_free;
        }
 
+       flow->flags |= MLX5E_TC_FLOW_OFFLOADED;
        err = rhashtable_insert_fast(&tc->ht, &flow->node,
                                     tc->ht_params);
        if (err)
        if (!flow)
                return -EINVAL;
 
+       if (!(flow->flags & MLX5E_TC_FLOW_OFFLOADED))
+               return 0;
+
        counter = mlx5_flow_rule_counter(flow->rule);
        if (!counter)
                return 0;