xref: /freebsd/sys/dev/mlx5/mlx5_core/fs_ft_pool.h (revision 2fb2c0351237aed71abedb7eb6d737b4390b490a)
1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2021 Mellanox Technologies. */
3 
4 #ifndef __MLX5_FS_FT_POOL_H__
5 #define __MLX5_FS_FT_POOL_H__
6 
7 #include <linux/module.h>
8 #include <dev/mlx5/driver.h>
9 #include <dev/mlx5/mlx5_core/fs_core.h>
10 #include <linux/compiler.h>
11 
12 #define POOL_NEXT_SIZE BIT(30)
13 
14 int mlx5_ft_pool_init(struct mlx5_core_dev *dev);
15 void mlx5_ft_pool_destroy(struct mlx5_core_dev *dev);
16 
17 int
18 mlx5_ft_pool_get_avail_sz(struct mlx5_core_dev *dev, enum fs_flow_table_type table_type,
19 			  int desired_size);
20 void
21 mlx5_ft_pool_put_sz(struct mlx5_core_dev *dev, int sz);
22 
23 #endif /* __MLX5_FS_FT_POOL_H__ */
24