MCPcopy Create free account
hub / github.com/F-Stack/f-stack / flow_drv_prepare

Function flow_drv_prepare

dpdk/drivers/net/mlx5/mlx5_flow.c:4279–4298  ·  view source on GitHub ↗

* 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

Source from the content-addressed store, hash-verified

4277 * Pointer to device flow on success, otherwise NULL and rte_errno is set.
4278 */
4279static inline struct mlx5_flow *
4280flow_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

Callers 3

flow_create_split_innerFunction · 0.85
flow_list_createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected