]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4: Avoid leaking steering rules on flow creation error flow
authorOr Gerlitz <ogerlitz@mellanox.com>
Thu, 30 Oct 2014 13:59:28 +0000 (15:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Oct 2014 23:48:58 +0000 (19:48 -0400)
commitf1dc4c1eb0e8dee3e0eaf5835ed2ebf67cabe61c
treed82bbe2467a939416ef1e8726e4305ad9e7aad4d
parent0c12133c87dc52f93a0c452e538cddcde7a7cf50
mlx4: Avoid leaking steering rules on flow creation error flow

If mlx4_ib_create_flow() attempts to create > 1 rules with the
firmware, and one of these registrations fail, we leaked the
already created flow rules.

One example of the leak is when the registration of the VXLAN ghost
steering rule fails, we didn't unregister the original rule requested
by the user, introduced in commit 81d729dc5858 "mlx4: Set
user-space raw Ethernet QPs to properly handle VXLAN traffic".

While here, add dump of the VXLAN portion of steering rules
so it can actually be seen when flow creation fails.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/hw/mlx4/main.c
drivers/net/ethernet/mellanox/mlx4/mcg.c