History

net/mlx5: Refactor mlx5_create_auto_grouped_flow_table

Refactor mlx5_create_auto_grouped_flow_table() to use ft_attr param which already carries the max_fte, prio and flags memebers, and is used the same in similar mlx5_create_flow_table() function.

Paul Blakey committed 7 years ago

Commit 61dc7b01 parent 827a8cb8 files · +52 −48Browse files

Showing the changes to include/linux (1 of 8 files). Show all

Unified · Split

include/linux/mlx5/fs.h+8−8
@@ -145,25 +145,25 @@ mlx5_get_flow_vport_acl_namespace(struct mlx5_core_dev *dev, · 144 unmodified lines
145 enum mlx5_flow_namespace_type type,145 enum mlx5_flow_namespace_type type,
146 int vport);146 int vport);
147 147
148struct mlx5_flow_table *
149mlx5_create_auto_grouped_flow_table(struct mlx5_flow_namespace *ns,
150 int prio,
151 int num_flow_table_entries,
152 int max_num_groups,
153 u32 level,
154 u32 flags);
155
156struct mlx5_flow_table_attr {148struct mlx5_flow_table_attr {
157 int prio;149 int prio;
158 int max_fte;150 int max_fte;
159 u32 level;151 u32 level;
160 u32 flags;152 u32 flags;
153
154 struct {
155 int max_num_groups;
156 } autogroup;
161};157};
162 158
163struct mlx5_flow_table *159struct mlx5_flow_table *
164mlx5_create_flow_table(struct mlx5_flow_namespace *ns,160mlx5_create_flow_table(struct mlx5_flow_namespace *ns,
165 struct mlx5_flow_table_attr *ft_attr);161 struct mlx5_flow_table_attr *ft_attr);
166 162
163struct mlx5_flow_table *
164mlx5_create_auto_grouped_flow_table(struct mlx5_flow_namespace *ns,
165 struct mlx5_flow_table_attr *ft_attr);
166
167struct mlx5_flow_table *167struct mlx5_flow_table *
168mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns,168mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns,
169 int prio,169 int prio,