diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2014-10-30 14:59:28 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-31 00:48:58 +0100 |
commit | 571e1b2c7a4c2fd5faa1648462a6b65fa26530d7 (patch) | |
tree | d82bbe2467a939416ef1e8726e4305ad9e7aad4d /drivers/net | |
parent | net/mlx4_en: Don't attempt to TX offload the outer UDP checksum for VXLAN (diff) | |
download | linux-571e1b2c7a4c2fd5faa1648462a6b65fa26530d7.tar.xz linux-571e1b2c7a4c2fd5faa1648462a6b65fa26530d7.zip |
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 d2fce8a9060d "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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mcg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c index ca0f98c95105..872843179f44 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mcg.c +++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c @@ -955,6 +955,10 @@ static void mlx4_err_rule(struct mlx4_dev *dev, char *str, cur->ib.dst_gid_msk); break; + case MLX4_NET_TRANS_RULE_ID_VXLAN: + len += snprintf(buf + len, BUF_SIZE - len, + "VNID = %d ", be32_to_cpu(cur->vxlan.vni)); + break; case MLX4_NET_TRANS_RULE_ID_IPV6: break; |