net/mlx5: fix mismatch metadata flow with meter action
authorJiawei Wang <jiaweiw@nvidia.com>
Fri, 19 Nov 2021 13:02:01 +0000 (15:02 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Sun, 21 Nov 2021 14:38:06 +0000 (15:38 +0100)
commit144d222305407504c16433d5f997b2937c93af7e
treee6127d6cb2c74ad06401bfcec676a4c135d2d722
parent16f4aa57ca381c4283826cdfce2cd4e172744ca7
net/mlx5: fix mismatch metadata flow with meter action

The mlx5 PMD introduced the table id attribute to allow multiple
flow tables on the same table level for flow metering, there can be
multiple flow table objects with the same table level but different
table ids.

If the extended metadata mode is enabled, all flows containing
destination Queue/RSS actions are split into two subflows - prefix one
jumps to the MLX5_FLOW_MREG_CP_TABLE_GROUP flow table to copy
MARK action data, and suffix one to perform the destination Queue/RSS
action. The table_id for the jump in the metadata split prefix flow
is always 0.

If flow itself was the metering split suffix subflow the table id was
set to 1 in the flow split structure and the metadata split suffix
subflow was created in the table with wrong table id, causing the
metadata suffix flow mismatch.

This patch resets the table id to 0 while creating the metadata
suffix flows.

Fixes: 51ec04dc7bcf ("net/mlx5: connect meter policy to created flows")
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