From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99443A0555; Wed, 19 Feb 2020 15:15:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 668401BF9A; Wed, 19 Feb 2020 15:15:27 +0100 (CET) Received: from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130]) by dpdk.org (Postfix) with ESMTP id B0EF81B13C; Wed, 19 Feb 2020 15:15:25 +0100 (CET) From: Suanming Mou To: viacheslavo@mellanox.com, matan@mellanox.com, dekelp@mellanox.com Cc: dev@dpdk.org, rasland@mellanox.com, stable@dpdk.org Date: Wed, 19 Feb 2020 16:15:17 +0200 Message-Id: <1582121717-53976-1-git-send-email-suanmingm@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix incorrect set VLAN ID action offset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/net/mlx5/mlx5_flow_dv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 359a037..5950274 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -637,7 +637,7 @@ struct field_modify_info modify_tcp[] = { 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) -- 1.8.3.1