net/mlx5: optimize tunnel offload index pool
authorSuanming Mou <suanmingm@nvidia.com>
Mon, 7 Dec 2020 05:58:34 +0000 (13:58 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:04 +0000 (16:03 +0100)
commit495b2ed40a39b2bc7c6c146535c511e983ae2b64
tree317fc7e24ccbe1e0fed6c2f4af6fc2716b494a9d
parentf5b0aed2df07d65398ab4dfd442ed27f8db1da6b
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 <suanmingm@nvidia.com>
Reviewed-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5.c