struct rte_flow_action actions_sfx[],
struct rte_flow_action actions_pre[])
{
- struct rte_flow_action *tag_action;
+ struct rte_flow_action *tag_action = NULL;
struct mlx5_rte_flow_action_set_tag *set_tag;
struct rte_flow_error error;
const struct rte_flow_action_raw_encap *raw_encap;
const struct rte_flow_action_raw_decap *raw_decap;
uint32_t tag_id;
- /* Add the extra tag action first. */
- tag_action = actions_pre;
- tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
- actions_pre++;
/* Prepare the actions for prefix and suffix flow. */
for (; actions->type != RTE_FLOW_ACTION_TYPE_END; actions++) {
switch (actions->type) {
case RTE_FLOW_ACTION_TYPE_METER:
+ /* Add the extra tag action first. */
+ tag_action = actions_pre;
+ tag_action->type = MLX5_RTE_FLOW_ACTION_TYPE_TAG;
+ actions_pre++;
+ memcpy(actions_pre, actions,
+ sizeof(struct rte_flow_action));
+ actions_pre++;
+ break;
case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP:
case RTE_FLOW_ACTION_TYPE_NVGRE_DECAP:
memcpy(actions_pre, actions,
*/
tag_id = flow_qrss_get_id(dev);
set_tag->data = tag_id << MLX5_MTR_COLOR_BITS;
+ assert(tag_action);
tag_action->conf = set_tag;
return tag_id;
}