net/mlx5: fix meter flow direction check
authorShun Hao <shunh@nvidia.com>
Fri, 2 Jul 2021 09:14:45 +0000 (12:14 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 8 Jul 2021 20:09:25 +0000 (22:09 +0200)
commit3c481324baf32b98a7b7ce669ecde98a0662f07c
treec0fd2e861f95b777f2ec455a179f3660bfd40271
parentefcce4dcdc7e4e16bb139b388c1855d937996a16
net/mlx5: fix meter flow direction check

When preparing prefix flow using ASO meter, if it's tx flow, need
to make meter action the first one.

Currently the check of flow direction in switch domain is incorrect
that it checks the flow dev port only.

This adds the fix for the check that if there's port_id match item
in flow, use that port_id as src port to determine flow direction.

Fixes: c99b4f8bc2f1 ("net/mlx5: support ASO meter action")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow.c