Lines Matching refs:ft_prio

1038 						      struct mlx5_ib_flow_prio *ft_prio,
1044 struct mlx5_flow_table *ft = ft_prio->flow_table;
1151 ft_prio->refcount++;
1152 handler->prio = ft_prio;
1155 ft_prio->flow_table = ft;
1166 struct mlx5_ib_flow_prio *ft_prio,
1170 return _create_flow_rule(dev, ft_prio, flow_attr, dst, 0, NULL);
1179 struct mlx5_ib_flow_prio *ft_prio,
1216 handler = create_flow_rule(dev, ft_prio,
1221 handler_ucast = create_flow_rule(dev, ft_prio,
1226 ft_prio->refcount--;
1284 struct mlx5_ib_flow_prio *ft_prio;
1347 ft_prio = get_flow_table(dev, flow_attr,
1349 if (IS_ERR(ft_prio)) {
1350 err = PTR_ERR(ft_prio);
1377 handler = _create_flow_rule(dev, ft_prio, flow_attr, dst,
1382 handler = create_leftovers_rule(dev, ft_prio, flow_attr, dst);
1385 handler = create_sniffer_rule(dev, ft_prio, ft_prio_tx, dst);
1405 put_flow_table(dev, ft_prio, false);
1515 struct mlx5_ib_flow_prio *ft_prio,
1525 struct mlx5_flow_table *ft = ft_prio->flow_table;
1551 ft_prio->refcount++;
1552 handler->prio = ft_prio;
1554 ft_prio->flow_table = ft;
1609 struct mlx5_ib_flow_prio *ft_prio;
1628 ft_prio = _get_flow_table(dev, fs_matcher->priority,
1630 if (IS_ERR(ft_prio)) {
1631 err = PTR_ERR(ft_prio);
1660 handler = _create_raw_flow_rule(dev, ft_prio, dst_num ? dst : NULL,
1678 put_flow_table(dev, ft_prio, false);
2027 struct mlx5_ib_flow_prio *ft_prio,
2034 if (ft_prio->anchor.ft)
2051 ft_prio->anchor.ft = ft;
2056 static void steering_anchor_destroy_ft(struct mlx5_ib_flow_prio *ft_prio)
2058 if (ft_prio->anchor.ft) {
2059 mlx5_destroy_flow_table(ft_prio->anchor.ft);
2060 ft_prio->anchor.ft = NULL;
2065 steering_anchor_create_fg_drop(struct mlx5_ib_flow_prio *ft_prio)
2072 if (ft_prio->anchor.fg_drop)
2082 fg = mlx5_create_flow_group(ft_prio->anchor.ft, flow_group_in);
2088 ft_prio->anchor.fg_drop = fg;
2097 steering_anchor_destroy_fg_drop(struct mlx5_ib_flow_prio *ft_prio)
2099 if (ft_prio->anchor.fg_drop) {
2100 mlx5_destroy_flow_group(ft_prio->anchor.fg_drop);
2101 ft_prio->anchor.fg_drop = NULL;
2106 steering_anchor_create_fg_goto_table(struct mlx5_ib_flow_prio *ft_prio)
2113 if (ft_prio->anchor.fg_goto_table)
2120 fg = mlx5_create_flow_group(ft_prio->anchor.ft, flow_group_in);
2125 ft_prio->anchor.fg_goto_table = fg;
2134 steering_anchor_destroy_fg_goto_table(struct mlx5_ib_flow_prio *ft_prio)
2136 if (ft_prio->anchor.fg_goto_table) {
2137 mlx5_destroy_flow_group(ft_prio->anchor.fg_goto_table);
2138 ft_prio->anchor.fg_goto_table = NULL;
2143 steering_anchor_create_rule_drop(struct mlx5_ib_flow_prio *ft_prio)
2148 if (ft_prio->anchor.rule_drop)
2151 flow_act.fg = ft_prio->anchor.fg_drop;
2154 handle = mlx5_add_flow_rules(ft_prio->anchor.ft, NULL, &flow_act,
2159 ft_prio->anchor.rule_drop = handle;
2164 static void steering_anchor_destroy_rule_drop(struct mlx5_ib_flow_prio *ft_prio)
2166 if (ft_prio->anchor.rule_drop) {
2167 mlx5_del_flow_rules(ft_prio->anchor.rule_drop);
2168 ft_prio->anchor.rule_drop = NULL;
2173 steering_anchor_create_rule_goto_table(struct mlx5_ib_flow_prio *ft_prio)
2179 if (ft_prio->anchor.rule_goto_table)
2184 flow_act.fg = ft_prio->anchor.fg_goto_table;
2187 dest.ft = ft_prio->flow_table;
2189 handle = mlx5_add_flow_rules(ft_prio->anchor.ft, NULL, &flow_act,
2194 ft_prio->anchor.rule_goto_table = handle;
2200 steering_anchor_destroy_rule_goto_table(struct mlx5_ib_flow_prio *ft_prio)
2202 if (ft_prio->anchor.rule_goto_table) {
2203 mlx5_del_flow_rules(ft_prio->anchor.rule_goto_table);
2204 ft_prio->anchor.rule_goto_table = NULL;
2209 struct mlx5_ib_flow_prio *ft_prio,
2214 err = steering_anchor_create_ft(dev, ft_prio, ns_type);
2218 err = steering_anchor_create_fg_drop(ft_prio);
2222 err = steering_anchor_create_fg_goto_table(ft_prio);
2226 err = steering_anchor_create_rule_drop(ft_prio);
2230 err = steering_anchor_create_rule_goto_table(ft_prio);
2237 steering_anchor_destroy_rule_drop(ft_prio);
2239 steering_anchor_destroy_fg_goto_table(ft_prio);
2241 steering_anchor_destroy_fg_drop(ft_prio);
2243 steering_anchor_destroy_ft(ft_prio);
2248 static void mlx5_steering_anchor_destroy_res(struct mlx5_ib_flow_prio *ft_prio)
2250 steering_anchor_destroy_rule_goto_table(ft_prio);
2251 steering_anchor_destroy_rule_drop(ft_prio);
2252 steering_anchor_destroy_fg_goto_table(ft_prio);
2253 steering_anchor_destroy_fg_drop(ft_prio);
2254 steering_anchor_destroy_ft(ft_prio);
2267 if (!--obj->ft_prio->anchor.rule_goto_table_ref)
2268 steering_anchor_destroy_rule_goto_table(obj->ft_prio);
2270 put_flow_table(obj->dev, obj->ft_prio, true);
2408 struct mlx5_ib_flow_prio *ft_prio;
2436 ft_prio = _get_flow_table(dev, priority, ns_type, 0);
2437 if (IS_ERR(ft_prio)) {
2438 err = PTR_ERR(ft_prio);
2442 ft_prio->refcount++;
2444 if (!ft_prio->anchor.rule_goto_table_ref) {
2445 err = steering_anchor_create_res(dev, ft_prio, ns_type);
2450 ft_prio->anchor.rule_goto_table_ref++;
2452 ft_id = mlx5_flow_table_id(ft_prio->anchor.ft);
2463 obj->ft_prio = ft_prio;
2469 --ft_prio->anchor.rule_goto_table_ref;
2470 mlx5_steering_anchor_destroy_res(ft_prio);
2472 put_flow_table(dev, ft_prio, true);