From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EF10EA054F for ; Tue, 16 Mar 2021 13:05:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B45934003D; Tue, 16 Mar 2021 13:05:27 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by mails.dpdk.org (Postfix) with ESMTP id F1DEF4003D for ; Tue, 16 Mar 2021 13:05:25 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from lizh@nvidia.com) with SMTP; 16 Mar 2021 14:05:21 +0200 Received: from nvidia.com (c-235-17-1-009.mtl.labs.mlnx [10.235.17.9]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 12GC5LPW021923; Tue, 16 Mar 2021 14:05:21 +0200 From: Li Zhang To: dev@dpdk.org, orika@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com, suanmingm@nvidia.com Cc: thomas@monjalon.net, rasland@nvidia.com, stable@dpdk.org Date: Tue, 16 Mar 2021 14:05:17 +0200 Message-Id: <20210316120517.683168-1-lizh@nvidia.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v1 1/1] net/mlx5: fix port id / push VLAN actions index incorrect X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" When using port id or push VLAN action index to find the action in cache, it will fail to find actions. The root cause is the index is not saved in cache when creating the port id action or push vlan action. To fix these issues, update the index in cache when creating. Fixes: 0fd5f82aaa0 ("net/mlx5: make port ID action cache thread safe") Fixes: 3422af2af2e ("net/mlx5: make push VLAN action cache thread safe") Cc: stable@dpdk.org Signed-off-by: Li Zhang --- drivers/net/mlx5/mlx5_flow_dv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 1a74d5ac2b..23e5849783 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -3612,6 +3612,7 @@ flow_dv_port_id_create_cb(struct mlx5_cache_list *list, "cannot create action"); return NULL; } + cache->idx = idx; return &cache->entry; } @@ -3703,6 +3704,7 @@ flow_dv_push_vlan_create_cb(struct mlx5_cache_list *list, "cannot create push vlan action"); return NULL; } + cache->idx = idx; return &cache->entry; } -- 2.21.0