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.
Showing the changes to include/linux (1 of 8 files). Show all
Unified · Split
| @@ -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 | ||
| 148 | struct mlx5_flow_table * | ||
| 149 | mlx5_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 | |||
| 156 | struct mlx5_flow_table_attr { | 148 | struct 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 | ||
| 163 | struct mlx5_flow_table * | 159 | struct mlx5_flow_table * |
| 164 | mlx5_create_flow_table(struct mlx5_flow_namespace *ns, | 160 | mlx5_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 | ||
| 163 | struct mlx5_flow_table * | ||
| 164 | mlx5_create_auto_grouped_flow_table(struct mlx5_flow_namespace *ns, | ||
| 165 | struct mlx5_flow_table_attr *ft_attr); | ||
| 166 | |||
| 167 | struct mlx5_flow_table * | 167 | struct mlx5_flow_table * |
| 168 | mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns, | 168 | mlx5_create_vport_flow_table(struct mlx5_flow_namespace *ns, |
| 169 | int prio, | 169 | int prio, |