From: Li Zhang Date: Tue, 16 Mar 2021 12:05:17 +0000 (+0200) Subject: net/mlx5: fix flow actions index in cache X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d406aba8f1e8568c1bf0b1aad1d5756cead5df21;p=dpdk.git net/mlx5: fix flow actions index in cache 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: 0fd5f82aaa07 ("net/mlx5: make port ID action cache thread safe") Fixes: 3422af2af2e4 ("net/mlx5: make push VLAN action cache thread safe") Cc: stable@dpdk.org Signed-off-by: Li Zhang Acked-by: Viacheslav Ovsiienko --- 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; }