* The last stage of splitting chain, just creates the subflow * without any modification. * * @param[in] dev * Pointer to Ethernet device. * @param[in] flow * Parent flow structure pointer. * @param[in, out] sub_flow * Pointer to return the created subflow, may be NULL. * @param[in] attr * Flow rule attributes. * @param[in] items * Pattern specification (list terminated by th
| 5597 | * 0 on success, negative value otherwise |
| 5598 | */ |
| 5599 | static int |
| 5600 | flow_create_split_inner(struct rte_eth_dev *dev, |
| 5601 | struct rte_flow *flow, |
| 5602 | struct mlx5_flow **sub_flow, |
| 5603 | const struct rte_flow_attr *attr, |
| 5604 | const struct rte_flow_item items[], |
| 5605 | const struct rte_flow_action actions[], |
| 5606 | struct mlx5_flow_split_info *flow_split_info, |
| 5607 | struct rte_flow_error *error) |
| 5608 | { |
| 5609 | struct mlx5_flow *dev_flow; |
| 5610 | struct mlx5_flow_workspace *wks = mlx5_flow_get_thread_workspace(); |
| 5611 | |
| 5612 | dev_flow = flow_drv_prepare(dev, flow, attr, items, actions, |
| 5613 | flow_split_info->flow_idx, error); |
| 5614 | if (!dev_flow) |
| 5615 | return -rte_errno; |
| 5616 | dev_flow->flow = flow; |
| 5617 | dev_flow->external = flow_split_info->external; |
| 5618 | dev_flow->skip_scale = flow_split_info->skip_scale; |
| 5619 | /* Subflow object was created, we must include one in the list. */ |
| 5620 | SILIST_INSERT(&flow->dev_handles, dev_flow->handle_idx, |
| 5621 | dev_flow->handle, next); |
| 5622 | /* |
| 5623 | * If dev_flow is as one of the suffix flow, some actions in suffix |
| 5624 | * flow may need some user defined item layer flags, and pass the |
| 5625 | * Metadata rxq mark flag to suffix flow as well. |
| 5626 | */ |
| 5627 | if (flow_split_info->prefix_layers) |
| 5628 | dev_flow->handle->layers = flow_split_info->prefix_layers; |
| 5629 | if (flow_split_info->prefix_mark) { |
| 5630 | MLX5_ASSERT(wks); |
| 5631 | wks->mark = 1; |
| 5632 | } |
| 5633 | if (sub_flow) |
| 5634 | *sub_flow = dev_flow; |
| 5635 | #ifdef HAVE_IBV_FLOW_DV_SUPPORT |
| 5636 | dev_flow->dv.table_id = flow_split_info->table_id; |
| 5637 | #endif |
| 5638 | return flow_drv_translate(dev, dev_flow, attr, items, actions, error); |
| 5639 | } |
| 5640 | |
| 5641 | /** |
| 5642 | * Get the sub policy of a meter. |
no test coverage detected