[v1,1/1] net/mlx5: fix port id / push VLAN actions index incorrect
Checks
Commit Message
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 <lizh@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
1 file changed, 2 insertions(+)
Comments
> -----Original Message-----
> From: Li Zhang <lizh@nvidia.com>
> Sent: Tuesday, March 16, 2021 14:05
> To: dev@dpdk.org; Ori Kam <orika@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Matan Azrad <matan@nvidia.com>; Suanming
> Mou <suanmingm@nvidia.com>
> Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; Raslan
> Darawsheh <rasland@nvidia.com>; stable@dpdk.org
> Subject: [PATCH v1 1/1] net/mlx5: fix port id / push VLAN actions index
> incorrect
>
> 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 <lizh@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Hi,
> -----Original Message-----
> From: Li Zhang <lizh@nvidia.com>
> Sent: Tuesday, March 16, 2021 2:05 PM
> To: dev@dpdk.org; Ori Kam <orika@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Matan Azrad <matan@nvidia.com>; Suanming
> Mou <suanmingm@nvidia.com>
> Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; Raslan
> Darawsheh <rasland@nvidia.com>; stable@dpdk.org
> Subject: [PATCH v1 1/1] net/mlx5: fix port id / push VLAN actions index
> incorrect
>
> 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 <lizh@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
@@ -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;
}