]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5: Fix autogroups groups num not decreasing
authorPaul Blakey <paulb@mellanox.com>
Tue, 25 Oct 2016 15:36:27 +0000 (18:36 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Oct 2016 16:00:39 +0000 (12:00 -0400)
Autogroups groups num is increased when creating a new flow group,
but is never decreased.

Now decreasing it when deleting a flow group.

Fixes: 32bf999bc9f2 ('net/mlx5_core: Introduce flow steering autogrouped flow table')
Signed-off-by: Paul Blakey <paulb@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/fs_core.c

index 17559c84290553e90bfabed586a059ad822f6939..89696048b0454ea2acdaabd938e16f154c5e91cd 100644 (file)
@@ -436,6 +436,9 @@ static void del_flow_group(struct fs_node *node)
        fs_get_obj(ft, fg->node.parent);
        dev = get_dev(&ft->node);
 
+       if (ft->autogroup.active)
+               ft->autogroup.num_groups--;
+
        if (mlx5_cmd_destroy_flow_group(dev, ft, fg->id))
                mlx5_core_warn(dev, "flow steering can't destroy fg %d of ft %d\n",
                               fg->id, ft->id);