diff options
author | Matan Barak <matanb@mellanox.com> | 2017-05-28 10:58:40 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2017-08-24 16:02:58 +0300 |
commit | 8ebabaa02fe13e534ae5b0a8aa495762c25ef279 (patch) | |
tree | e5313d092847deee51835cf8e5c80dc6f5790dbe /drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | |
parent | 09800305504432eb00b8504645c05ac589f1c02c (diff) | |
download | linux-8ebabaa02fe13e534ae5b0a8aa495762c25ef279.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fs_core.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h index 9fb5a333df52..5fbae885558f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.h @@ -118,6 +118,7 @@ struct mlx5_flow_table { /* FWD rules that point on this flow table */ struct list_head fwd_rules; u32 flags; + struct ida fte_allocator; }; struct mlx5_fc_cache { @@ -183,7 +184,6 @@ struct mlx5_flow_group { struct mlx5_flow_group_mask mask; u32 start_index; u32 max_ftes; - u32 num_ftes; u32 id; }; |