net/mlx5: fix group value of sample suffix flow
authorJiawei Wang <jiaweiw@nvidia.com>
Wed, 4 Nov 2020 13:29:49 +0000 (15:29 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 18:43:25 +0000 (19:43 +0100)
commit9ade91dfe85d361b24d5242d7de9ca3d4f64e9d9
tree9f9a07d969f4730c7d7996122087f3af5b061048
parentcdbdcd46a2b915c0781ecb2f48f412237daf03da
net/mlx5: fix group value of sample suffix flow

mlx5 PMD split the sampling flow into prefix flow and suffix
flow. On the sample action translation function, the scaled
group value of suffix flow be attached into sample object and
saved into sample resource.

mlx5 PMD fetched the group value from the sample resource to
create the suffix flow. On the mlx5_flow_group_to_table
function the group value of suffix flow was scaled with table
factor again and translated into HW table. That caused the
incorrect group value of sample suffix flow.

The fix introduces a 'skip_scale' flag and sets it to 1 for the
sample suffix flow creation. On the mlx5_flow_group_to_table
function skips the scale with table factor to use the correct
group value.

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c
drivers/net/mlx5/mlx5_rxq.c