diff options
author | Roi Dayan <roid@mellanox.com> | 2016-11-30 17:59:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-02 10:47:02 -0500 |
commit | 86a33ae1ca06a58629c4d0d80ac6d099ff932ae0 (patch) | |
tree | 5430f302eef368dfa12925b5399baee0fa2b09e0 /drivers | |
parent | 53636068d8d6a08ca99949e2094b2b04ececa2d8 (diff) | |
download | linux-86a33ae1ca06a58629c4d0d80ac6d099ff932ae0.tar.bz2 |
net/mlx5e: Correct cleanup order when deleting offloaded TC rules
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: 8b32580df1cb ("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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index dd6d95473ade..4d71445d4a91 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -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)) { |