1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. */
3 
4 #ifndef __MLX5_LIB_SMFS_H__
5 #define __MLX5_LIB_SMFS_H__
6 
7 #include "steering/mlx5dr.h"
8 #include "steering/dr_types.h"
9 
10 struct mlx5dr_matcher *
11 mlx5_smfs_matcher_create(struct mlx5dr_table *table, u32 priority, struct mlx5_flow_spec *spec);
12 
13 void
14 mlx5_smfs_matcher_destroy(struct mlx5dr_matcher *matcher);
15 
16 struct mlx5dr_table *
17 mlx5_smfs_table_get_from_fs_ft(struct mlx5_flow_table *ft);
18 
19 struct mlx5dr_action *
20 mlx5_smfs_action_create_dest_table(struct mlx5dr_table *table);
21 
22 struct mlx5dr_action *
23 mlx5_smfs_action_create_flow_counter(u32 counter_id);
24 
25 void
26 mlx5_smfs_action_destroy(struct mlx5dr_action *action);
27 
28 struct mlx5dr_rule *
29 mlx5_smfs_rule_create(struct mlx5dr_matcher *matcher, struct mlx5_flow_spec *spec,
30 		      size_t num_actions, struct mlx5dr_action *actions[],
31 		      u32 flow_source);
32 
33 void
34 mlx5_smfs_rule_destroy(struct mlx5dr_rule *rule);
35 
36 #endif /* __MLX5_LIB_SMFS_H__ */
37