net/mlx5: fix meter policy creation assert
authorShun Hao <shunh@nvidia.com>
Wed, 2 Mar 2022 10:33:01 +0000 (12:33 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Mon, 7 Mar 2022 10:43:11 +0000 (11:43 +0100)
commit9267617bb0a6918ee049b1a16062bf0185e2e843
tree99dbab44038a3e03754a0992feaa856f8f8f75e1
parentcff6aad7af61da8d31e146610f9b4a4875301ef4
net/mlx5: fix meter policy creation assert

The meter policy creation doesn't belong to flow rule creation
process, so thread workspace was not initialized and there will be
assert error when using it.

This patch removes the incorrect using of thread workspace in meter
policy creation, and adds a flag in policy instead. When creating
flow rule, can use the flag to set the mark flag in thread workspace.

Fixes: 082becbf1f35 ("net/mlx5: fix mark enabling for Rx")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow_dv.c