summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h
diff options
context:
space:
mode:
authorPaul Blakey <paulb@nvidia.com>2021-03-08 14:16:02 +0200
committerSaeed Mahameed <saeedm@nvidia.com>2021-05-27 11:54:38 -0700
commit4a98544d182761873381d46bb1a498703ca85bf0 (patch)
tree8a41d77e6c390144adbf186afc59deeef789a860 /drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h
parent04745afb2ae3ee496d339a5511291def2be5c7c1 (diff)
downloadlinux-stable-4a98544d182761873381d46bb1a498703ca85bf0.tar.gz
linux-stable-4a98544d182761873381d46bb1a498703ca85bf0.tar.bz2
linux-stable-4a98544d182761873381d46bb1a498703ca85bf0.zip
net/mlx5: Move chains ft pool to be used by all firmware steering
Firmware FT pool is per device, but the software tracking of this pool only services fs_chains users, and if another layer takes a flow table, the pool will not be updated, and fs_chains will fail creating a flow table, with no recovery till the flow table is returned. Move FT pool to be global per device, and stored at the cmd level, so all layers can use it. Signed-off-by: Paul Blakey <paulb@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h
new file mode 100644
index 000000000000..25f4274b372b
--- /dev/null
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
+/* Copyright (c) 2021 Mellanox Technologies. */
+
+#ifndef __MLX5_FS_FT_POOL_H__
+#define __MLX5_FS_FT_POOL_H__
+
+#include <linux/mlx5/driver.h>
+#include "fs_core.h"
+
+#define POOL_NEXT_SIZE 0
+
+int mlx5_ft_pool_init(struct mlx5_core_dev *dev);
+void mlx5_ft_pool_destroy(struct mlx5_core_dev *dev);
+
+int
+mlx5_ft_pool_get_avail_sz(struct mlx5_core_dev *dev, enum fs_flow_table_type table_type,
+ int desired_size);
+void
+mlx5_ft_pool_put_sz(struct mlx5_core_dev *dev, int sz);
+
+#endif /* __MLX5_FS_FT_POOL_H__ */