net/mlx5: fix GRE protocol type translation
authorGregory Etelson <getelson@nvidia.com>
Sun, 14 Nov 2021 15:36:16 +0000 (17:36 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 16 Nov 2021 09:22:56 +0000 (10:22 +0100)
commitbe26e81bfc1cb681d3ee0764aa6733000869984a
treeed1dc705059a1282d8bb7d1868210258dd958157
parent690391dd0e8bc7a8d02a3aba844ffc3dffe7aecd
net/mlx5: fix GRE protocol type translation

When application creates several flows to match on GRE tunnel
without explicitly specifying GRE protocol type value in
flow rules, PMD will translate that to zero mask.
RDMA-CORE cannot distinguish between different inner flow types and
produces identical matchers for each zero mask.

The patch extracts inner header type from flow rule and forces it
in GRE protocol type, if application did not specify
any without explicitly specifying GRE protocol type value in
flow rules, protocol type value.

Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow_dv.c