net/mlx5: fix port id / push VLAN actions index incorrect
PATCH 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.
--- drivers/net/mlx5/mlx5_flow_dv.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/mlx5/mlx5_flow_dv.c +2 -0
@@ -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; }
Signature · 1 line
2.21.0
Quoted 17 lines
-----Original Message-----
From: Li Zhang <[email protected]>
Sent: Tuesday, March 16, 2021 14:05
To: [email protected]; Ori Kam <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; Suanming Mou <[email protected]>
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; Raslan Darawsheh <[email protected]>; [email protected]
Subject: [PATCH v1 1/1] net/mlx5: fix port id / push VLAN actions index incorrectWhen 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.
Quoted 5 lines
Fixes 0fd5f82aaa0 ("net/mlx5: make port ID action cache thread safe")Fixes 3422af2af2e ("net/mlx5: make push VLAN action cache thread safe")Signed-off-by Li Zhang <[email protected]>
Hi,
Quoted 17 lines
-----Original Message-----
From: Li Zhang <[email protected]>
Sent: Tuesday, March 16, 2021 2:05 PM
To: [email protected]; Ori Kam <[email protected]>; Slava Ovsiienko <[email protected]>; Matan Azrad <[email protected]>; Suanming Mou <[email protected]>
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; Raslan Darawsheh <[email protected]>; [email protected]
Subject: [PATCH v1 1/1] net/mlx5: fix port id / push VLAN actions index incorrectWhen 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.
Quoted 5 lines
Fixes 0fd5f82aaa0 ("net/mlx5: make port ID action cache thread safe")Fixes 3422af2af2e ("net/mlx5: make push VLAN action cache thread safe")Signed-off-by Li Zhang <[email protected]>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh