* Flow driver preparation API. This abstracts calling driver specific * functions. Parent flow (rte_flow) should have driver type (drv_type). It * calculates the size of memory required for device flow, allocates the memory, * initializes the device flow and returns the pointer. * * @note * This function initializes device flow structure such as dv or verbs in * struct mlx5_flow. Howeve
| 4277 | * Pointer to device flow on success, otherwise NULL and rte_errno is set. |
| 4278 | */ |
| 4279 | static inline struct mlx5_flow * |
| 4280 | flow_drv_prepare(struct rte_eth_dev *dev, |
| 4281 | const struct rte_flow *flow, |
| 4282 | const struct rte_flow_attr *attr, |
| 4283 | const struct rte_flow_item items[], |
| 4284 | const struct rte_flow_action actions[], |
| 4285 | uint32_t flow_idx, |
| 4286 | struct rte_flow_error *error) |
| 4287 | { |
| 4288 | const struct mlx5_flow_driver_ops *fops; |
| 4289 | enum mlx5_flow_drv_type type = flow->drv_type; |
| 4290 | struct mlx5_flow *mlx5_flow = NULL; |
| 4291 | |
| 4292 | MLX5_ASSERT(type > MLX5_FLOW_TYPE_MIN && type < MLX5_FLOW_TYPE_MAX); |
| 4293 | fops = flow_get_drv_ops(type); |
| 4294 | mlx5_flow = fops->prepare(dev, attr, items, actions, error); |
| 4295 | if (mlx5_flow) |
| 4296 | mlx5_flow->flow_idx = flow_idx; |
| 4297 | return mlx5_flow; |
| 4298 | } |
| 4299 | |
| 4300 | /** |
| 4301 | * Flow driver translation API. This abstracts calling driver specific |
no outgoing calls
no test coverage detected