net/mlx5: fix count actions query in sample flow
authorJiawei Wang <jiaweiw@nvidia.com>
Tue, 26 Jan 2021 15:37:56 +0000 (17:37 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:11 +0000 (18:16 +0100)
commit84382dfadf2e5de23db750c6bf61bde725b1dc8d
tree031625da463b3fbfa295c0ad707a967436e078dc
parent4b86050aabc00495ad9e1a6d4a10d409824dd46b
net/mlx5: fix count actions query in sample flow

If the count action was presented in sample actions list, MLX5 PMD
created the counter resource and saved the index of counter in the
sample resource only, the counter index of flow was not updated.

This patch removes the counter index in the sampler resource and
saves it into the flow, and adds the checking to make sure only one
count be created once per flow, it's used for all sample sub flows.

Fixes: 0756228b2704 ("net/mlx5: update translate function for sample action")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c