net/mlx5: fix flow mark with sampling and metering
authorJiawei Wang <jiaweiw@nvidia.com>
Mon, 22 Nov 2021 14:22:52 +0000 (16:22 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 23 Nov 2021 13:24:17 +0000 (14:24 +0100)
commit693c7d4b1e12024cd429ef563e9df5cc2c477aee
tree1239311515f94085fe593e766973a7024c406322
parentd564eea7ce7fe66f6b4210956b8907f663d30734
net/mlx5: fix flow mark with sampling and metering

If there are sample action and the meter action in the same flow,
mlx5 PMD performs several levels of splitting. For example, sampling
feature splits the original flow into prefix subflow with sample action,
and suffix subflow with the rest of actions. Then, metering feature
splits the sampling suffix subflow into its own meter subflows.
If mark action was added before the sample and meter action, the
flow mark flag was kept in the sample subflows but reset on
handling the metering split, causing the flow mark value missed.

This patch keeps the flow mark flag of previous subflow, and then
the following meter subflows handle the flow mark correctly.

Fixes: 9ade91dfe85d ("net/mlx5: fix group value of sample suffix flow")
Cc: stable@dpdk.org
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