[v3,16/16] net/mlx5: fix METER_MARK indirection list callback
Checks
Commit Message
Indirect action list METER_MARK handle and configuration parameters
can be independently masked or non-masked in actions template.
Non-masked configuration state is saved in the
`mlx5_action_construct_data::shared_meter` object.
The patch moves indirect action list callback from
`mlx5_action_construct_data` types union to prevent it's collision
with shared_meter.
Fixes: 82641ccee69d ("net/mlx5: support indirect list METER_MARK action")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.h | 4 +---
drivers/net/mlx5/mlx5_flow_hw.c | 5 +++--
2 files changed, 4 insertions(+), 5 deletions(-)
@@ -1271,6 +1271,7 @@ struct mlx5_action_construct_data {
uint32_t idx; /* Data index. */
uint16_t action_src; /* rte_flow_action src offset. */
uint16_t action_dst; /* mlx5dr_rule_action dst offset. */
+ indirect_list_callback_t indirect_list_cb;
union {
struct {
/* encap data len. */
@@ -1312,9 +1313,6 @@ struct mlx5_action_construct_data {
uint32_t id;
uint32_t conf_masked:1;
} shared_meter;
- struct {
- indirect_list_callback_t cb;
- } indirect_list;
};
};
@@ -605,7 +605,7 @@ flow_hw_act_data_indirect_list_append(struct mlx5_priv *priv,
act_data = __flow_hw_act_data_alloc(priv, type, action_src, action_dst);
if (!act_data)
return -1;
- act_data->indirect_list.cb = cb;
+ act_data->indirect_list_cb = cb;
LIST_INSERT_HEAD(&acts->act_list, act_data, next);
return 0;
}
@@ -2538,7 +2538,8 @@ flow_hw_actions_construct(struct rte_eth_dev *dev,
(int)action->type == act_data->type);
switch ((int)act_data->type) {
case RTE_FLOW_ACTION_TYPE_INDIRECT_LIST:
- act_data->indirect_list.cb(dev, act_data, actions, rule_acts);
+ act_data->indirect_list_cb(dev, act_data, actions,
+ &rule_acts[act_data->action_dst]);
break;
case RTE_FLOW_ACTION_TYPE_INDIRECT:
if (flow_hw_shared_action_construct