Commit 891b8f33 authored by Paul Blakey's avatar Paul Blakey Committed by Saeed Mahameed

net/mlx5: Allocate smaller size tables for ft offload

Instead of giving ft tables one of the largest tables available - 4M,
give it a more reasonable size - 64k. Especially since it will
always be created as a miss hook in the following patch.
Signed-off-by: default avatarPaul Blakey <paulb@mellanox.com>
Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent d9fb932f
...@@ -34,6 +34,7 @@ static const unsigned int ESW_POOLS[] = { 4 * 1024 * 1024, ...@@ -34,6 +34,7 @@ static const unsigned int ESW_POOLS[] = { 4 * 1024 * 1024,
1 * 1024 * 1024, 1 * 1024 * 1024,
64 * 1024, 64 * 1024,
128 }; 128 };
#define ESW_FT_TBL_SZ (64 * 1024)
struct mlx5_esw_chains_priv { struct mlx5_esw_chains_priv {
struct rhashtable chains_ht; struct rhashtable chains_ht;
...@@ -201,7 +202,9 @@ mlx5_esw_chains_create_fdb_table(struct mlx5_eswitch *esw, ...@@ -201,7 +202,9 @@ mlx5_esw_chains_create_fdb_table(struct mlx5_eswitch *esw,
ft_attr.flags |= (MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT | ft_attr.flags |= (MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT |
MLX5_FLOW_TABLE_TUNNEL_EN_DECAP); MLX5_FLOW_TABLE_TUNNEL_EN_DECAP);
sz = mlx5_esw_chains_get_avail_sz_from_pool(esw, POOL_NEXT_SIZE); sz = (chain == mlx5_esw_chains_get_ft_chain(esw)) ?
mlx5_esw_chains_get_avail_sz_from_pool(esw, ESW_FT_TBL_SZ) :
mlx5_esw_chains_get_avail_sz_from_pool(esw, POOL_NEXT_SIZE);
if (!sz) if (!sz)
return ERR_PTR(-ENOSPC); return ERR_PTR(-ENOSPC);
ft_attr.max_fte = sz; ft_attr.max_fte = sz;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment