* Validate a flow supported by the NIC. * * @see rte_flow_validate() * @see rte_flow_ops */
| 7709 | * @see rte_flow_ops |
| 7710 | */ |
| 7711 | int |
| 7712 | mlx5_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 | |
| 7739 | static int |
| 7740 | mlx5_flow_cache_flow_info(struct rte_eth_dev *dev, |
nothing calls this directly
no test coverage detected