]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Properly handle FW errors while adding TC rules
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 10 Jan 2017 20:33:36 +0000 (22:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jan 2017 02:34:01 +0000 (21:34 -0500)
commite720e73a27eeb778edab90343a2afde13cca0cc5
tree634431349d26b61c3d70f934447b6c849f23547f
parent5548c474984361e7ceb54aff9142505d1e420d65
net/mlx5e: Properly handle FW errors while adding TC rules

When the firmware returns an error (common example is an attempt to
add twice the same rule which is refused by the some FWs), we are not
properly derefing/cleaning few resources allocated on the way.
Examples are vport vlan deref under eswitch vlan offloads, and encap
entry/neighbour deref under eswitch encapsulation offloads, fix that.

Fixes: 5962dab3383d ('net/mlx5e: Add basic TC tunnel set action for SRIOV offloads')
Fixes: 0a4e504ef574 ('net/mlx5e: Add TC vlan action for SRIOV offloads')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c