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

Function mlx5_flow_validate

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

* Validate a flow supported by the NIC. * * @see rte_flow_validate() * @see rte_flow_ops */

Source from the content-addressed store, hash-verified

7709 * @see rte_flow_ops
7710 */
7711int
7712mlx5_flow_validate(struct rte_eth_dev *dev,
7713 const struct rte_flow_attr *attr,
7714 const struct rte_flow_item items[],
7715 const struct rte_flow_action original_actions[],
7716 struct rte_flow_error *error)
7717{
7718 int hairpin_flow;
7719 struct mlx5_translated_action_handle
7720 indir_actions[MLX5_MAX_INDIRECT_ACTIONS];
7721 int indir_actions_n = MLX5_MAX_INDIRECT_ACTIONS;
7722 const struct rte_flow_action *actions;
7723 struct rte_flow_action *translated_actions = NULL;
7724 int ret = flow_action_handles_translate(dev, original_actions,
7725 indir_actions,
7726 &indir_actions_n,
7727 &translated_actions, error);
7728
7729 if (ret)
7730 return ret;
7731 actions = translated_actions ? translated_actions : original_actions;
7732 hairpin_flow = flow_check_hairpin_split(dev, attr, actions);
7733 ret = flow_drv_validate(dev, attr, items, actions,
7734 true, hairpin_flow, error);
7735 rte_free(translated_actions);
7736 return ret;
7737}
7738
7739static int
7740mlx5_flow_cache_flow_info(struct rte_eth_dev *dev,

Callers

nothing calls this directly

Calls 4

flow_check_hairpin_splitFunction · 0.85
flow_drv_validateFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected