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

Function flow_get_prefix_layer_flags

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

* Get layer flags from the prefix flow. * * Some flows may be split to several subflows, the prefix subflow gets the * match items and the suffix sub flow gets the actions. * Some actions need the user defined match item flags to get the detail for * the action. * This function helps the suffix flow to get the item layer flags from prefix * subflow. * * @param[in] dev_flow * Poi

Source from the content-addressed store, hash-verified

4752 * The layers get from prefix subflow.
4753 */
4754static inline uint64_t
4755flow_get_prefix_layer_flags(struct mlx5_flow *dev_flow)
4756{
4757 uint64_t layers = 0;
4758
4759 /*
4760 * Layers bits could be localization, but usually the compiler will
4761 * help to do the optimization work for source code.
4762 * If no decap actions, use the layers directly.
4763 */
4764 if (!(dev_flow->act_flags & MLX5_FLOW_ACTION_DECAP))
4765 return dev_flow->handle->layers;
4766 /* Convert L3 layers with decap action. */
4767 if (dev_flow->handle->layers & MLX5_FLOW_LAYER_INNER_L3_IPV4)
4768 layers |= MLX5_FLOW_LAYER_OUTER_L3_IPV4;
4769 else if (dev_flow->handle->layers & MLX5_FLOW_LAYER_INNER_L3_IPV6)
4770 layers |= MLX5_FLOW_LAYER_OUTER_L3_IPV6;
4771 /* Convert L4 layers with decap action. */
4772 if (dev_flow->handle->layers & MLX5_FLOW_LAYER_INNER_L4_TCP)
4773 layers |= MLX5_FLOW_LAYER_OUTER_L4_TCP;
4774 else if (dev_flow->handle->layers & MLX5_FLOW_LAYER_INNER_L4_UDP)
4775 layers |= MLX5_FLOW_LAYER_OUTER_L4_UDP;
4776 return layers;
4777}
4778
4779/**
4780 * Get metadata split action information.

Callers 3

flow_create_split_meterFunction · 0.85
flow_create_split_sampleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected