* Fill the flow with DV spec, lock free * (mutex should be acquired by caller). * * @param[in] dev * Pointer to rte_eth_dev structure. * @param[in, out] dev_flow * Pointer to the sub flow. * @param[in] attr * Pointer to the flow attributes. * @param[in] items * Pointer to the list of items. * @param[in] actions * Pointer to the list of actions. * @param[out] error * Point
| 14289 | * 0 on success, a negative errno value otherwise and rte_errno is set. |
| 14290 | */ |
| 14291 | static int |
| 14292 | flow_dv_translate(struct rte_eth_dev *dev, |
| 14293 | struct mlx5_flow *dev_flow, |
| 14294 | const struct rte_flow_attr *attr, |
| 14295 | const struct rte_flow_item items[], |
| 14296 | const struct rte_flow_action actions[], |
| 14297 | struct rte_flow_error *error) |
| 14298 | { |
| 14299 | struct mlx5_priv *priv = dev->data->dev_private; |
| 14300 | struct mlx5_sh_config *dev_conf = &priv->sh->config; |
| 14301 | struct rte_flow *flow = dev_flow->flow; |
| 14302 | struct mlx5_flow_handle *handle = dev_flow->handle; |
| 14303 | struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace(); |
| 14304 | struct mlx5_flow_rss_desc *rss_desc; |
| 14305 | uint64_t action_flags = 0; |
| 14306 | struct mlx5_flow_dv_matcher matcher = { |
| 14307 | .mask = { |
| 14308 | .size = sizeof(matcher.mask.buf), |
| 14309 | }, |
| 14310 | }; |
| 14311 | int actions_n = 0; |
| 14312 | bool actions_end = false; |
| 14313 | union { |
| 14314 | struct mlx5_flow_dv_modify_hdr_resource res; |
| 14315 | uint8_t len[sizeof(struct mlx5_flow_dv_modify_hdr_resource) + |
| 14316 | sizeof(struct mlx5_modification_cmd) * |
| 14317 | (MLX5_MAX_MODIFY_NUM + 1)]; |
| 14318 | } mhdr_dummy; |
| 14319 | struct mlx5_flow_dv_modify_hdr_resource *mhdr_res = &mhdr_dummy.res; |
| 14320 | const struct rte_flow_action_count *count = NULL; |
| 14321 | const struct rte_flow_action_age *non_shared_age = NULL; |
| 14322 | union flow_dv_attr flow_attr = { .attr = 0 }; |
| 14323 | uint32_t tag_be; |
| 14324 | union mlx5_flow_tbl_key tbl_key; |
| 14325 | uint32_t modify_action_position = UINT32_MAX; |
| 14326 | struct rte_vlan_hdr vlan = { 0 }; |
| 14327 | struct mlx5_flow_dv_dest_array_resource mdest_res; |
| 14328 | struct mlx5_flow_dv_sample_resource sample_res; |
| 14329 | void *sample_actions[MLX5_DV_MAX_NUMBER_OF_ACTIONS] = {0}; |
| 14330 | const struct rte_flow_action_sample *sample = NULL; |
| 14331 | struct mlx5_flow_sub_actions_list *sample_act; |
| 14332 | uint32_t sample_act_pos = UINT32_MAX; |
| 14333 | uint32_t age_act_pos = UINT32_MAX; |
| 14334 | uint32_t num_of_dest = 0; |
| 14335 | int tmp_actions_n = 0; |
| 14336 | uint32_t table; |
| 14337 | int ret = 0; |
| 14338 | const struct mlx5_flow_tunnel *tunnel = NULL; |
| 14339 | struct flow_grp_info grp_info = { |
| 14340 | .external = !!dev_flow->external, |
| 14341 | .transfer = !!attr->transfer, |
| 14342 | .fdb_def_rule = !!priv->fdb_def_rule, |
| 14343 | .skip_scale = dev_flow->skip_scale & |
| 14344 | (1 << MLX5_SCALE_FLOW_GROUP_BIT), |
| 14345 | .std_tbl_fix = true, |
| 14346 | }; |
| 14347 | |
| 14348 | if (!wks) |
nothing calls this directly
no test coverage detected