Skip to contentSkip to conversation

net/mlx5: fix port id / push VLAN actions index incorrect

PATCH In review Li Zhang 3 participants 3 messages Mar 16, 2021 – Mar 17, 2021 Network drivers

lore
Share & tools
lore

Li Zhang

author
#0 lore raw

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.

Fixes 0fd5f82aaa0 ("net/mlx5: make port ID action cache thread safe")
Fixes 3422af2af2e ("net/mlx5: make push VLAN action cache thread safe")
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/mlx5/mlx5_flow_dv.c +2 -0
index 1a74d5ac2b..23e5849783 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
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 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.

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")
#2 lore raw
In reply to Li Zhang

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 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.

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")

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh