From: Suanming Mou Date: Wed, 19 Feb 2020 14:15:17 +0000 (+0200) Subject: net/mlx5: fix VLAN ID action offset X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;ds=sidebyside;h=bdcfb8a10bea8f56f5d89394ed1364735f1e3408;p=dpdk.git net/mlx5: fix VLAN ID action offset Currently, the set VLAN ID header modify action has already got the action pointer with offset from the header modify action array, but the configuration saves the detail to the memory of action with the offset again. It causes double offset to set the VLAN ID action to the wrong place in the header modify array. Remove the offset when get the action pointer to fix that issue. Fixes: 5f163d520cff ("net/mlx5: support modify VLAN ID on existing VLAN header") Cc: stable@dpdk.org Signed-off-by: Suanming Mou Acked-by: Dekel Peled Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 467d1ce6b1..99d668f5d3 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -573,7 +573,7 @@ flow_dv_convert_action_modify_vlan_vid const struct rte_flow_action_of_set_vlan_vid *conf = (const struct rte_flow_action_of_set_vlan_vid *)(action->conf); int i = resource->actions_num; - struct mlx5_modification_cmd *actions = &resource->actions[i]; + struct mlx5_modification_cmd *actions = resource->actions; struct field_modify_info *field = modify_vlan_out_first_vid; if (i >= MLX5_MAX_MODIFY_NUM)