net/mlx5: optimize meter profile lookup
authorShun Hao <shunh@nvidia.com>
Fri, 2 Jul 2021 09:14:43 +0000 (12:14 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 8 Jul 2021 20:09:24 +0000 (22:09 +0200)
commita295c69a8b24f34f9d98959853265b31bcbcc133
tree42ef09d10bc223711f061065978c0e1571d9a9ea
parente60561cc955ac01512a35ca309793e351cef3c9b
net/mlx5: optimize meter profile lookup

Currently a list is used to save all meter profile ids, which is
not efficient when looking up profile from huge amount of profiles.

This changes to use an l3 table instead to save meter profile ids,
so as to improve the lookup performance.

Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_flow_meter.c
drivers/net/mlx5/windows/mlx5_os.c