Skip to content

Commit

Permalink
net/mlx5e: Correct cleanup order when deleting offloaded TC rules
Browse files Browse the repository at this point in the history
According to the reverse unwinding principle, on delete time we should
first handle deletion of the steering rule and later handle the vlan
deletion from the eswitch.

Fixes: 8b32580 ("net/mlx5e: Add TC vlan action for SRIOV offloads")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roi Dayan authored and David S. Miller committed Dec 2, 2016
1 parent 5363606 commit 86a33ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ static void mlx5e_tc_del_flow(struct mlx5e_priv *priv,

counter = mlx5_flow_rule_counter(rule);

mlx5_del_flow_rules(rule);

if (esw && esw->mode == SRIOV_OFFLOADS)
mlx5_eswitch_del_vlan_action(esw, attr);

mlx5_del_flow_rules(rule);

mlx5_fc_destroy(priv->mdev, counter);

if (!mlx5e_tc_num_filters(priv) && (priv->fs.tc.t)) {
Expand Down

0 comments on commit 86a33ae

Please sign in to comment.