[dpdk-stable] [PATCH v1 1/1] net/mlx5: fix port id / push VLAN actions index incorrect

Li Zhang lizh at nvidia.com
Tue Mar 16 13:05:17 CET 2021


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 at dpdk.org

Signed-off-by: Li Zhang <lizh at nvidia.com>
---
 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



More information about the stable mailing list