MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mlx5_get_tof

Function mlx5_get_tof

dpdk/drivers/net/mlx5/mlx5_flow.c:11283–11303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11281}
11282
11283const struct mlx5_flow_tunnel *
11284mlx5_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

Callers 2

flow_dv_validateFunction · 0.85
flow_dv_translateFunction · 0.85

Calls 2

flow_items_to_tunnelFunction · 0.85
flow_actions_to_tunnelFunction · 0.85

Tested by

no test coverage detected