summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/vxlan.c
diff options
context:
space:
mode:
authorOr Gerlitz2017-03-14 15:49:04 +0100
committerSaeed Mahameed2017-03-28 14:34:00 +0200
commitaa0cbbae5d360ea23a15038d24f6f7c9573eecaf (patch)
tree592639dc245ad4afb02229fc37c10c882683e6db /drivers/net/ethernet/mellanox/mlx5/core/vxlan.c
parentnet/mlx5e: Add intermediate struct for TC flow parsing attributes (diff)
downloadkernel-qcow2-linux-aa0cbbae5d360ea23a15038d24f6f7c9573eecaf.tar.gz
kernel-qcow2-linux-aa0cbbae5d360ea23a15038d24f6f7c9573eecaf.tar.xz
kernel-qcow2-linux-aa0cbbae5d360ea23a15038d24f6f7c9573eecaf.zip
net/mlx5e: Properly deal with resource cleanup when adding TC flow fails
The code for adding tc fdb flows leaves things half set when it fails in the middle. Currently we are not leaking things (e.g eswitch vlan reference, encap reference and HW resources) since the main code to add flower rules does a cleanup by calling mlx5e_tc_del_flow(). This cleanup further works just b/c we're checking there if the HW rule for the flow we are attempting to delete is valid before touching it, and since under the current possible combinations of supported actions it's okay to go and blidnly deref or delete all the action related resources (encap, vlan). Instead, do things properly, namely make sure that if add flow fails we clean all what was allocated or referenced. Now, the flow delete code can blindly deref/deallocate both the rule and the actions related resources and when more action combinations are introduced (such as the upcoming header re-write) we are fine with clear and robust code. While here, align all of nic/fdb parse actions/add flow functions to get mlx5e_tc_flow struct param and pick the attributes or whatever else needed from there. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/vxlan.c')
0 files changed, 0 insertions, 0 deletions