* Flow driver translation API. This abstracts calling driver specific * functions. Parent flow (rte_flow) should have driver type (drv_type). It * translates a generic flow into a driver flow. flow_drv_prepare() must * precede. * * @note * dev_flow->layers could be filled as a result of parsing during translation * if needed by flow_drv_apply(). dev_flow->flow->actions can also be fille
| 4327 | * 0 on success, a negative errno value otherwise and rte_errno is set. |
| 4328 | */ |
| 4329 | static inline int |
| 4330 | flow_drv_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow, |
| 4331 | const struct rte_flow_attr *attr, |
| 4332 | const struct rte_flow_item items[], |
| 4333 | const struct rte_flow_action actions[], |
| 4334 | struct rte_flow_error *error) |
| 4335 | { |
| 4336 | const struct mlx5_flow_driver_ops *fops; |
| 4337 | enum mlx5_flow_drv_type type = dev_flow->flow->drv_type; |
| 4338 | |
| 4339 | MLX5_ASSERT(type > MLX5_FLOW_TYPE_MIN && type < MLX5_FLOW_TYPE_MAX); |
| 4340 | fops = flow_get_drv_ops(type); |
| 4341 | return fops->translate(dev, dev_flow, attr, items, actions, error); |
| 4342 | } |
| 4343 | |
| 4344 | /** |
| 4345 | * Flow driver apply API. This abstracts calling driver specific functions. |
no outgoing calls
no test coverage detected