net/mlx5: optimize tunnel offload index pool
PATCH 1/1 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.
--- drivers/net/mlx5/mlx5.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/mlx5/mlx5.c +1 -0
@@ -265,6 +265,7 @@ static LIST_HEAD(, mlx5_dev_ctx_shared) mlx5_dev_ctx_list = }, [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",
Signature · 1 line
1.8.3.1
Hi,
Quoted 14 lines
-----Original Message-----
From: Suanming Mou <[email protected]>
Sent: Monday, December 7, 2020 7:59 AM
To: Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>
Cc: Raslan Darawsheh <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: optimize tunnel offload index poolCurrently, 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.
Quoted 6 lines
This commits changes the tunnel offload index pool trunk size to
MLX5_MAX_TUNNELSto save the memory.Signed-off-by Suanming Mou <[email protected]>Reviewed-by Gregory Etelson <[email protected]>Acked-by Matan Azrad <[email protected]>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh