]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Keep autogroups list ordered
authorPaul Blakey <paulb@mellanox.com>
Tue, 25 Oct 2016 15:36:26 +0000 (18:36 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Oct 2016 16:00:39 +0000 (12:00 -0400)
commit456709d31880394d083334adbe9df59f4b095aef
tree2603dfaa88604a8656ca8ed41f47e02f9b4652b5
parent862e4da21487e3bff3c117d1769a8dd747cedeea
net/mlx5: Keep autogroups list ordered

Finding a new autogroup range is done by going over a group list
sorted by each group start index. The search is stopped after finding
the first free range. Adding the newly created group to the list is
wrongly added to the end of the list regardless of its start index as
the parameter of where to insert it is ignored.

This commit makes sure to use that unused parameter to insert
it where requested.

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