net/mlx5: Convert linear search for free index to ida
authorMatan Barak <matanb@mellanox.com>
Sun, 28 May 2017 07:58:40 +0000 (10:58 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 24 Aug 2017 13:02:58 +0000 (16:02 +0300)
commit8ebabaa02fe13e534ae5b0a8aa495762c25ef279
treee5313d092847deee51835cf8e5c80dc6f5790dbe
parent09800305504432eb00b8504645c05ac589f1c02c
net/mlx5: Convert linear search for free index to ida

When allocating a flow table entry, we need to allocate a free index
in the flow group. Currently, this is done by traversing the existing
flow table entries in the flow group, until a free index is found.
Replacing this by using a ida, which allows us to find a free index
much faster.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h