| 11281 | } |
| 11282 | |
| 11283 | const struct mlx5_flow_tunnel * |
| 11284 | mlx5_get_tof(const struct rte_flow_item *item, |
| 11285 | const struct rte_flow_action *action, |
| 11286 | enum mlx5_tof_rule_type *rule_type) |
| 11287 | { |
| 11288 | for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) { |
| 11289 | if (item->type == (typeof(item->type)) |
| 11290 | MLX5_RTE_FLOW_ITEM_TYPE_TUNNEL) { |
| 11291 | *rule_type = MLX5_TUNNEL_OFFLOAD_MATCH_RULE; |
| 11292 | return flow_items_to_tunnel(item); |
| 11293 | } |
| 11294 | } |
| 11295 | for (; action->conf != RTE_FLOW_ACTION_TYPE_END; action++) { |
| 11296 | if (action->type == (typeof(action->type)) |
| 11297 | MLX5_RTE_FLOW_ACTION_TYPE_TUNNEL_SET) { |
| 11298 | *rule_type = MLX5_TUNNEL_OFFLOAD_SET_RULE; |
| 11299 | return flow_actions_to_tunnel(action); |
| 11300 | } |
| 11301 | } |
| 11302 | return NULL; |
| 11303 | } |
| 11304 | |
| 11305 | /** |
| 11306 | * tunnel offload functionality is defined for DV environment only |
no test coverage detected