]> 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)
commit70d12dc64f3ba572522c2552acaf7f8a32cf4505
tree2603dfaa88604a8656ca8ed41f47e02f9b4652b5
parent1512fb649f4c35adf547581dd01095adcc7fe4fe
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: 22b59b3c7509 ('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