@@ -222,6 +222,7 @@ static const struct rte_flow_expand_node mlx5_support_expansion[] = {
static struct rte_flow_shared_action *
mlx5_shared_action_create(struct rte_eth_dev *dev,
+ const struct rte_flow_shared_action_conf *conf,
const struct rte_flow_action *action,
struct rte_flow_error *error);
static int mlx5_shared_action_destroy
@@ -6544,23 +6545,26 @@ flow_drv_dv_ops_get(struct rte_eth_dev *dev,
/* Wrapper for driver action_validate op callback */
static int
flow_drv_action_validate(struct rte_eth_dev *dev,
+ const struct rte_flow_shared_action_conf *conf,
const struct rte_flow_action *action,
struct rte_flow_error *error)
{
const struct mlx5_flow_driver_ops *fops = flow_drv_dv_ops_get(dev,
"action registration unsupported", error);
- return (fops) ? fops->action_validate(dev, action, error) : -rte_errno;
+ return (fops) ? fops->action_validate(dev, conf, action, error)
+ : -rte_errno;
}
/* Wrapper for driver action_create op callback */
static struct rte_flow_shared_action *
flow_drv_action_create(struct rte_eth_dev *dev,
- const struct rte_flow_action *action,
- struct rte_flow_error *error)
+ const struct rte_flow_shared_action_conf *conf,
+ const struct rte_flow_action *action,
+ struct rte_flow_error *error)
{
const struct mlx5_flow_driver_ops *fops = flow_drv_dv_ops_get(dev,
"action registration unsupported", error);
- return (fops) ? fops->action_create(dev, action, error) : NULL;
+ return (fops) ? fops->action_create(dev, conf, action, error) : NULL;
}
/**
@@ -6618,12 +6622,13 @@ flow_drv_action_update(struct rte_eth_dev *dev,
*/
static struct rte_flow_shared_action *
mlx5_shared_action_create(struct rte_eth_dev *dev,
- const struct rte_flow_action *action,
- struct rte_flow_error *error)
+ const struct rte_flow_shared_action_conf *conf,
+ const struct rte_flow_action *action,
+ struct rte_flow_error *error)
{
- if (flow_drv_action_validate(dev, action, error))
+ if (flow_drv_action_validate(dev, conf, action, error))
return NULL;
- return flow_drv_action_create(dev, action, error);
+ return flow_drv_action_create(dev, conf, action, error);
}
/**
@@ -6663,7 +6668,7 @@ mlx5_shared_action_update(struct rte_eth_dev *dev,
NULL,
"update action type invalid");
}
- ret = flow_drv_action_validate(dev, action, error);
+ ret = flow_drv_action_validate(dev, NULL, action, error);
if (ret)
return ret;
return flow_drv_action_update(dev, shared_action, action->conf,
@@ -955,11 +955,14 @@ typedef int (*mlx5_flow_get_aged_flows_t)
void **context,
uint32_t nb_contexts,
struct rte_flow_error *error);
-typedef int (*mlx5_flow_action_validate_t)(struct rte_eth_dev *dev,
- const struct rte_flow_action *action,
- struct rte_flow_error *error);
+typedef int (*mlx5_flow_action_validate_t)
+ (struct rte_eth_dev *dev,
+ const struct rte_flow_shared_action_conf *conf,
+ const struct rte_flow_action *action,
+ struct rte_flow_error *error);
typedef struct rte_flow_shared_action *(*mlx5_flow_action_create_t)
(struct rte_eth_dev *dev,
+ const struct rte_flow_shared_action_conf *conf,
const struct rte_flow_action *action,
struct rte_flow_error *error);
typedef int (*mlx5_flow_action_destroy_t)