From: Suanming Mou Date: Mon, 7 Dec 2020 05:58:34 +0000 (+0800) Subject: net/mlx5: optimize tunnel offload index pool X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=495b2ed40a39b2bc7c6c146535c511e983ae2b64;p=dpdk.git net/mlx5: optimize tunnel offload index pool Currently, when creating the index pool, if the trunk size is not configured, the index pool default trunk size will be 4096. The maximum tunnel offload supported now is 256(MLX5_MAX_TUNNELS), create the index pool with trunk size 4096 wastes the memory. This commits changes the tunnel offload index pool trunk size to MLX5_MAX_TUNNELS to save the memory. Signed-off-by: Suanming Mou Reviewed-by: Gregory Etelson Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 7d3f18c6f7..52a8a252d4 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -265,6 +265,7 @@ static const struct mlx5_indexed_pool_config mlx5_ipool_cfg[] = { }, [MLX5_IPOOL_TUNNEL_ID] = { .size = sizeof(struct mlx5_flow_tunnel), + .trunk_size = MLX5_MAX_TUNNELS, .need_lock = 1, .release_mem_en = 1, .type = "mlx5_tunnel_offload",