Skip to content

Commit

Permalink
net/mlx5: fix flow actions index in cache
Browse files Browse the repository at this point in the history
[ upstream commit d406aba ]

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: 0fd5f82 ("net/mlx5: make port ID action cache thread safe")
Fixes: 3422af2 ("net/mlx5: make push VLAN action cache thread safe")

Signed-off-by: Li Zhang <lizh@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  • Loading branch information
Li Zhang authored and steevenlee committed May 8, 2021
1 parent 162f87f commit 2291013
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/mlx5/mlx5_flow_dv.c
Original file line number Diff line number Diff line change
Expand Up @@ -3039,6 +3039,7 @@ flow_dv_port_id_create_cb(struct mlx5_cache_list *list,
"cannot create action");
return NULL;
}
cache->idx = idx;
return &cache->entry;
}

Expand Down Expand Up @@ -3130,6 +3131,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;
}

Expand Down

0 comments on commit 2291013

Please sign in to comment.